virtinst: Add a compare_controller function for future use

Signed-off-by: Lin Ma <lma@suse.com>
This commit is contained in:
Lin Ma 2017-11-23 17:32:45 +08:00 committed by Cole Robinson
parent 0198db6d3f
commit 65db33fec0

View File

@ -72,6 +72,12 @@ class VirtualDeviceAddress(XMLBuilder):
raise ValueError(_("Could not determine or unsupported "
"format of '%s'") % addrstr)
def compare_controller(self, controller, dev_bus):
if (controller.type == dev_bus and
controller.index == self.controller):
return True
return False
type = XMLProperty("./@type")
# type=pci