Logo Search packages:      
Sourcecode: ganeti version File versions  Download package

def lib::config::ConfigWriter::AddInstance (   self,
  instance 
)

Add an instance to the config.

This should be used after creating a new instance.

Args:
  instance: the instance object

Definition at line 275 of file config.py.

00275                                  :
    """Add an instance to the config.

    This should be used after creating a new instance.

    Args:
      instance: the instance object
    """
    if not isinstance(instance, objects.Instance):
      raise errors.ProgrammerError("Invalid type passed to AddInstance")

    if instance.disk_template != constants.DT_DISKLESS:
      all_lvs = instance.MapLVsByNode()
      logger.Info("Instance '%s' DISK_LAYOUT: %s" % (instance.name, all_lvs))

    self._OpenConfig()
    self._config_data.instances[instance.name] = instance
    self._WriteConfig()

  def MarkInstanceUp(self, instance_name):


Generated by  Doxygen 1.6.0   Back to index