Skip to content

Commit

Permalink
Fixup:marshal_from_address not found error
Browse files Browse the repository at this point in the history
VDPAXML class mistakenly moved some functions from PCIXML to itself.Move
them back to fix the functions missing error.

Signed-off-by: Haijiao Zhao <[email protected]>
  • Loading branch information
chloerh committed May 10, 2024
1 parent 0c3a0a0 commit 788180d
Showing 1 changed file with 18 additions and 19 deletions.
37 changes: 18 additions & 19 deletions virttest/libvirt_xml/nodedev_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,24 @@ def __init__(self, virsh_instance=base.virsh):
)


class VDPAXML(CAPXML):
"""
class for capability whose type is vdpa.
"""

# Example:
# <capability type='vdpa'>
# <chardev>/dev/vhost-vdpa-0</chardev>
# </capability>

__slots__ = "chardev"

def __init__(self, virsh_instance=base.virsh):
accessors.XMLElementText("chardev", self, parent_xpath="/", tag_name="chardev")
super(VDPAXML, self).__init__(virsh_instance=virsh_instance)
self.xml = " <capability type='vdpa'></capability>"


class PCIXML(CAPXML):

"""
Expand Down Expand Up @@ -318,25 +336,6 @@ def __init__(self, virsh_instance=base.virsh):
super(PCIXML, self).__init__(virsh_instance=virsh_instance)
self.xml = " <capability type='pci'></capability>"


class VDPAXML(CAPXML):

"""
class for capability whose type is vdpa.
"""

# Example:
# <capability type='vdpa'>
# <chardev>/dev/vhost-vdpa-0</chardev>
# </capability>

__slots__ = "chardev"

def __init__(self, virsh_instance=base.virsh):
accessors.XMLElementText("chardev", self, parent_xpath="/", tag_name="chardev")
super(VDPAXML, self).__init__(virsh_instance=virsh_instance)
self.xml = " <capability type='vdpa'></capability>"

class Address(base.LibvirtXMLBase):

"""
Expand Down

0 comments on commit 788180d

Please sign in to comment.