From 788180db9302f59f1589559ae72be7b820eaface Mon Sep 17 00:00:00 2001 From: Haijiao Zhao Date: Thu, 9 May 2024 21:13:58 -0400 Subject: [PATCH] Fixup:marshal_from_address not found error VDPAXML class mistakenly moved some functions from PCIXML to itself.Move them back to fix the functions missing error. Signed-off-by: Haijiao Zhao --- virttest/libvirt_xml/nodedev_xml.py | 37 ++++++++++++++--------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/virttest/libvirt_xml/nodedev_xml.py b/virttest/libvirt_xml/nodedev_xml.py index 04d26ef0dd..5fb66dcd28 100644 --- a/virttest/libvirt_xml/nodedev_xml.py +++ b/virttest/libvirt_xml/nodedev_xml.py @@ -223,6 +223,24 @@ def __init__(self, virsh_instance=base.virsh): ) +class VDPAXML(CAPXML): + """ + class for capability whose type is vdpa. + """ + + # Example: + # + # /dev/vhost-vdpa-0 + # + + __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 = " " + + class PCIXML(CAPXML): """ @@ -318,25 +336,6 @@ def __init__(self, virsh_instance=base.virsh): super(PCIXML, self).__init__(virsh_instance=virsh_instance) self.xml = " " - -class VDPAXML(CAPXML): - - """ - class for capability whose type is vdpa. - """ - - # Example: - # - # /dev/vhost-vdpa-0 - # - - __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 = " " - class Address(base.LibvirtXMLBase): """