Skip to content

Commit

Permalink
add support for address in memory target
Browse files Browse the repository at this point in the history
Signed-off-by: nanli <[email protected]>
  • Loading branch information
nanli1 committed Dec 7, 2023
1 parent 3f16a5c commit 77568d9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion virttest/libvirt_xml/devices/memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ class Target(base.base.LibvirtXMLBase):
__slots__ = ('size', 'size_unit', 'node', 'label',
'requested_size', 'requested_unit',
'current_size', 'current_unit',
'block_size', 'block_unit', 'readonly')
'block_size', 'block_unit', 'readonly',
'address')

def __init__(self, virsh_instance=base.base.virsh):
accessors.XMLElementInt('size',
Expand Down Expand Up @@ -113,6 +114,11 @@ def __init__(self, virsh_instance=base.base.virsh):
'virsh_instance': virsh_instance})
accessors.XMLElementBool('readonly', self, parent_xpath='/',
tag_name='readonly')
accessors.XMLElementNest('address', self, parent_xpath='/',
tag_name='address', subclass=Memory.Address,
subclass_dargs={
'type_name': 'pci',
'virsh_instance': virsh_instance})
super(self.__class__, self).__init__(virsh_instance=virsh_instance)
self.xml = '<target/>'

Expand Down

0 comments on commit 77568d9

Please sign in to comment.