Package virtualization :: Module domain_config :: Class DomainConfig
[hide private]
[frames] | no frames]

Class DomainConfig

source code

Instance Methods [hide private]
 
__init__(self, config_path, uuid) source code
 
save(self)
Saves any changes made to this configuration.
source code
 
getFileName(self)
Returns the path to the configuration file represented by this object.
source code
 
toXML(self)
Returns the XML representation of this configuration.
source code
 
getConfigItem(self, config_item) source code
 
hasConfigItem(self, config_item) source code
 
removeConfigItem(self, config_item) source code
 
setConfigItem(self, config_item, value)
Sets the value of an item in the tree.
source code
 
isInstallerConfig(self)
Returns true if this configuration indicates that the domain was started in a method that would put it into the installer.
source code
 
__getElementValue(self, start_tree, *tag_path) source code
 
__getElementAttribute(self, start_tree, *tag_path)
Returns the value of the requested XML attribute.
source code
 
__removeElementValue(self, start_tree, *tag_path) source code
 
__removeElementAttribute(self, start_tree, *tag_path) source code
 
__setElementValue(self, start_tree, value, *tag_path) source code
 
__setElementAttribute(self, start_tree, value, *tag_path) source code
 
__makeElement(self, start_tree, *tag_path) source code
 
__extractElement(self, start_tree, *tag_path) source code
Class Variables [hide private]
  NAME = DomainConfigItem("domain/name", DataType.VALUE)
  UUID = DomainConfigItem("domain/uuid", DataType.VALUE)
  BOOTLOADER = DomainConfigItem("domain/bootloader", DataType.VA...
  MEMORY = DomainConfigItem("domain/memory", DataType.VALUE)
  VCPU = DomainConfigItem("domain/vcpu", DataType.VALUE)
  OS = DomainConfigItem("domain/os", DataType.VALUE)
  OS_TYPE = DomainConfigItem("domain/os/type", DataType.VALUE)
  ROOT_DEVICE = DomainConfigItem("domain/os/root", DataType.VALUE)
  COMMAND_LINE = DomainConfigItem("domain/os/cmdline", DataType....
  KERNEL_PATH = DomainConfigItem("domain/os/kernel", DataType.VA...
  RAMDISK_PATH = DomainConfigItem("domain/os/initrd", DataType.V...
  DISK_IMAGE_PATH = DomainConfigItem("domain/devices/disk/source...
  DOMAIN_ID = DomainConfigItem("domain/id", DataType.ATTRIBUTE)
Method Details [hide private]

setConfigItem(self, config_item, value)

source code 

Sets the value of an item in the tree. If the item does not yet exist, it will be created.

__getElementAttribute(self, start_tree, *tag_path)

source code 

Returns the value of the requested XML attribute. The attribute name is the last value in the tag_path.


Class Variable Details [hide private]

BOOTLOADER

Value:
DomainConfigItem("domain/bootloader", DataType.VALUE)

COMMAND_LINE

Value:
DomainConfigItem("domain/os/cmdline", DataType.VALUE)

KERNEL_PATH

Value:
DomainConfigItem("domain/os/kernel", DataType.VALUE)

RAMDISK_PATH

Value:
DomainConfigItem("domain/os/initrd", DataType.VALUE)

DISK_IMAGE_PATH

Value:
DomainConfigItem("domain/devices/disk/source/file", DataType.ATTRIBUTE\
)