From 65db33fec0b3551040ffe8eb23a1b0b5c1f835c2 Mon Sep 17 00:00:00 2001 From: Lin Ma Date: Thu, 23 Nov 2017 17:32:45 +0800 Subject: [PATCH] virtinst: Add a compare_controller function for future use Signed-off-by: Lin Ma --- virtinst/device.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/virtinst/device.py b/virtinst/device.py index 4f9dcb2cf..c160378be 100644 --- a/virtinst/device.py +++ b/virtinst/device.py @@ -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