def __init__(self, type_name="hostdev", virsh_instance=base.base.virsh): accessors.XMLAttribute('type', self, parent_xpath='/', tag_name='hostdev', attribute='type') accessors.XMLAttribute('mode', self, parent_xpath='/', tag_name='hostdev', attribute='mode') accessors.XMLAttribute('model', self, parent_xpath='/', tag_name='hostdev', attribute='model') accessors.XMLAttribute('managed', self, parent_xpath='/', tag_name='hostdev', attribute='managed') accessors.XMLAttribute('sgio', self, parent_xpath='/', tag_name='hostdev', attribute='sgio') accessors.XMLAttribute('rawio', self, parent_xpath='/', tag_name='hostdev', attribute='rawio') accessors.XMLElementNest('source', self, parent_xpath='/', tag_name='source', subclass=self.Source, subclass_dargs={ 'virsh_instance': virsh_instance}) accessors.XMLAttribute('boot_order', self, parent_xpath='/', tag_name='boot', attribute='order') accessors.XMLElementBool('readonly', self, parent_xpath='/', tag_name='readonly') accessors.XMLElementBool('shareable', self, parent_xpath='/', tag_name='shareable') accessors.XMLElementDict('alias', self, parent_xpath='/', tag_name='alias') super(self.__class__, self).__init__(device_tag='hostdev', type_name=type_name, virsh_instance=virsh_instance)
def __init__(self, virsh_instance): accessors.XMLElementBool('bar', self, parent_xpath='/', tag_name='bar') accessors.XMLElementBool('baz', self, parent_xpath='/', tag_name='bar') super(Foo, self).__init__(virsh_instance=virsh_instance) self.xml = '<foo/>'
def __init__(self, virsh_instance): accessors.XMLElementBool('foo', self, parent_xpath='/l1', tag_name='foo') accessors.XMLElementBool('bar', self, parent_xpath='/l1/l2/l3', tag_name='bar') accessors.XMLElementBool('baz', self, parent_xpath='/l1/l2', tag_name='baz') super(Foo, self).__init__(virsh_instance=virsh_instance) self.xml = '<root/>'
def __init__(self, virsh_instance=base.virsh): accessors.XMLElementText('name', self, parent_xpath='/', tag_name='name') accessors.XMLElementText('key', self, parent_xpath='/', tag_name='key') accessors.XMLElementInt('capacity', self, parent_xpath='/', tag_name='capacity') accessors.XMLElementInt('allocation', self, parent_xpath='/', tag_name='allocation') accessors.XMLAttribute('format', self, parent_xpath='/target', tag_name='format', attribute='type') accessors.XMLAttribute('capacity_unit', self, parent_xpath='/', tag_name='capacity', attribute='unit') accessors.XMLElementNest( 'encryption', self, parent_xpath='/target', tag_name='encryption', subclass=self.Encryption, subclass_dargs={'virsh_instance': virsh_instance}) accessors.XMLElementText('path', self, parent_xpath='/target', tag_name='path') accessors.XMLElementInt('owner', self, parent_xpath='/target/permissions', tag_name='owner') accessors.XMLElementInt('group', self, parent_xpath='/target/permissions', tag_name='group') accessors.XMLElementText('mode', self, parent_xpath='/target/permissions', tag_name='mode') accessors.XMLElementText('label', self, parent_xpath='/target/permissions', tag_name='label') accessors.XMLElementText('compat', self, parent_xpath='/target', tag_name='compat') accessors.XMLElementBool('lazy_refcounts', self, parent_xpath='/target/features', tag_name='lazy_refcounts') super(VolXMLBase, self).__init__(virsh_instance=virsh_instance)
def __init__(self, virsh_instance=base.base.virsh): accessors.XMLElementInt('pagesize', self, parent_xpath='/', tag_name='pagesize') accessors.XMLAttribute(property_name="pagesize_unit", libvirtxml=self, forbidden=None, parent_xpath='/', tag_name='pagesize', attribute='unit') accessors.XMLElementText('nodemask', self, parent_xpath='/', tag_name='nodemask') accessors.XMLElementText('path', self, parent_xpath='/', tag_name='path') accessors.XMLElementInt('alignsize', self, parent_xpath='/', tag_name='alignsize') accessors.XMLAttribute(property_name="alignsize_unit", libvirtxml=self, forbidden=None, parent_xpath='/', tag_name='alignsize', attribute='unit') accessors.XMLElementBool('pmem', self, parent_xpath='/', tag_name='pmem') super(self.__class__, self).__init__(virsh_instance=virsh_instance) self.xml = '<source/>'
def __init__(self, virsh_instance=base.base.virsh): for slot in ('sha1', 'sha256', 'sha384', 'sha512'): accessors.XMLElementBool(slot, self, parent_xpath='/', tag_name=slot) accessors.AllForbidden(property_name="pcrbank_list", libvirtxml=self) super(self.__class__, self).__init__(virsh_instance=virsh_instance) self.xml = '<active_pcr_banks/>'
def __init__(self, virsh_instance=base.base.virsh): accessors.XMLElementInt('size', self, parent_xpath='/', tag_name='size') accessors.XMLAttribute(property_name="size_unit", libvirtxml=self, forbidden=None, parent_xpath='/', tag_name='size', attribute='unit') accessors.XMLElementInt('requested_size', self, parent_xpath='/', tag_name='requested') accessors.XMLAttribute(property_name="requested_unit", libvirtxml=self, forbidden=None, parent_xpath='/', tag_name='requested', attribute='unit') accessors.XMLElementInt('current_size', self, parent_xpath='/', tag_name='current') accessors.XMLAttribute(property_name="current_unit", libvirtxml=self, forbidden=None, parent_xpath='/', tag_name='current', attribute='unit') accessors.XMLElementInt('block_size', self, parent_xpath='/', tag_name='block') accessors.XMLAttribute(property_name="block_unit", libvirtxml=self, forbidden=None, parent_xpath='/', tag_name='block', attribute='unit') accessors.XMLElementInt('node', self, parent_xpath='/', tag_name='node') accessors.XMLElementNest( 'label', self, parent_xpath='/', tag_name='label', subclass=self.Label, subclass_dargs={'virsh_instance': virsh_instance}) accessors.XMLElementBool('readonly', self, parent_xpath='/', tag_name='readonly') super(self.__class__, self).__init__(virsh_instance=virsh_instance) self.xml = '<target/>'
def __init__(self, type_name='file', virsh_instance=base.base.virsh): accessors.XMLAttribute('device', self, parent_xpath='/', tag_name='disk', attribute='device') accessors.XMLAttribute('rawio', self, parent_xpath='/', tag_name='disk', attribute='rawio') accessors.XMLAttribute('sgio', self, parent_xpath='/', tag_name='disk', attribute='sgio') accessors.XMLAttribute('snapshot', self, parent_xpath='/', tag_name='disk', attribute='snapshot') accessors.XMLElementDict('driver', self, parent_xpath='/', tag_name='driver') accessors.XMLElementDict('target', self, parent_xpath='/', tag_name='target') accessors.XMLElementNest('address', self, parent_xpath='/', tag_name='address', subclass=self.Address, subclass_dargs={'type_name': 'drive', 'virsh_instance': virsh_instance}) accessors.XMLAttribute('boot', self, parent_xpath='/', tag_name='boot', attribute='order') accessors.XMLElementBool('readonly', self, parent_xpath='/', tag_name='readonly') accessors.XMLElementBool('transient', self, parent_xpath='/', tag_name='transient') accessors.XMLElementBool('share', self, parent_xpath='/', tag_name='shareable') accessors.XMLElementNest('source', self, parent_xpath='/', tag_name='source', subclass=self.DiskSource, subclass_dargs={ 'virsh_instance': virsh_instance}) ro = ['set', 'del'] accessors.XMLElementBool('mirror', self, forbidden=ro, parent_xpath='/', tag_name='mirror') accessors.XMLElementBool('ready', self, forbidden=ro, parent_xpath='/', tag_name='ready') accessors.XMLElementNest('iotune', self, parent_xpath='/', tag_name='iotune', subclass=self.IOTune, subclass_dargs={ 'virsh_instance': virsh_instance}) super(Disk, self).__init__(device_tag='disk', type_name=type_name, virsh_instance=virsh_instance)
def __init__(self, type_name='file', virsh_instance=base.base.virsh): accessors.XMLAttribute('device', self, parent_xpath='/', tag_name='disk', attribute='device') accessors.XMLAttribute('model', self, parent_xpath='/', tag_name='disk', attribute='model') accessors.XMLAttribute('rawio', self, parent_xpath='/', tag_name='disk', attribute='rawio') accessors.XMLAttribute('sgio', self, parent_xpath='/', tag_name='disk', attribute='sgio') accessors.XMLAttribute('snapshot', self, parent_xpath='/', tag_name='disk', attribute='snapshot') accessors.XMLElementText('wwn', self, parent_xpath='/', tag_name='wwn') accessors.XMLElementText('serial', self, parent_xpath='/', tag_name='serial') accessors.XMLElementText('vendor', self, parent_xpath='/', tag_name='vendor') accessors.XMLElementText('product', self, parent_xpath='/', tag_name='product') accessors.XMLElementDict('driver', self, parent_xpath='/', tag_name='driver') accessors.XMLElementDict('target', self, parent_xpath='/', tag_name='target') accessors.XMLElementDict('alias', self, parent_xpath='/', tag_name='alias') accessors.XMLElementDict('blockio', self, parent_xpath='/', tag_name='blockio') accessors.XMLElementDict('geometry', self, parent_xpath='/', tag_name='geometry') accessors.XMLElementNest('address', self, parent_xpath='/', tag_name='address', subclass=self.Address, subclass_dargs={ 'type_name': 'drive', 'virsh_instance': virsh_instance }) accessors.XMLAttribute('boot', self, parent_xpath='/', tag_name='boot', attribute='order') accessors.XMLElementBool('readonly', self, parent_xpath='/', tag_name='readonly') accessors.XMLElementBool('transient', self, parent_xpath='/', tag_name='transient') accessors.XMLElementBool('share', self, parent_xpath='/', tag_name='shareable') accessors.XMLElementNest( 'source', self, parent_xpath='/', tag_name='source', subclass=self.DiskSource, subclass_dargs={'virsh_instance': virsh_instance}) ro = ['set', 'del'] accessors.XMLElementBool('mirror', self, forbidden=ro, parent_xpath='/', tag_name='mirror') accessors.XMLElementBool('ready', self, forbidden=ro, parent_xpath='/', tag_name='ready') accessors.XMLElementNest( 'iotune', self, parent_xpath='/', tag_name='iotune', subclass=self.IOTune, subclass_dargs={'virsh_instance': virsh_instance}) accessors.XMLElementNest( 'encryption', self, parent_xpath='/', tag_name='encryption', subclass=self.Encryption, subclass_dargs={'virsh_instance': virsh_instance}) accessors.XMLElementNest( 'auth', self, parent_xpath='/', tag_name='auth', subclass=self.Auth, subclass_dargs={'virsh_instance': virsh_instance}) accessors.XMLElementNest( 'reservations', self, parent_xpath='/', tag_name='reservations', subclass=Disk.Reservations, subclass_dargs={'virsh_instance': virsh_instance}) accessors.XMLElementNest( 'backingstore', self, parent_xpath='/', tag_name='backingStore', subclass=self.BackingStore, subclass_dargs={'virsh_instance': virsh_instance}) super(Disk, self).__init__(device_tag='disk', type_name=type_name, virsh_instance=virsh_instance)