[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[virt-tools-list] [PATCH 2/2] virtinst: add Guest.add_usb_ich9_controllers helper



---
 virtinst/Guest.py |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/virtinst/Guest.py b/virtinst/Guest.py
index a28942c..f9faf40 100644
--- a/virtinst/Guest.py
+++ b/virtinst/Guest.py
@@ -1441,6 +1441,26 @@ class Guest(XMLBuilderDomain.XMLBuilderDomain):
             if hasattr(d, "virtinst_default"):
                 remove_func(d)
 
+    def add_usb_ich9_controllers(self):
+        ctrl = VirtualControllerUSB(self.conn,
+                                    model="ich9-ehci1")
+        self.add_device(ctrl)
+
+        ctrl = VirtualControllerUSB(self.conn,
+                                    model="ich9-uhci1")
+        ctrl.get_master().startport = 0
+        self.add_device(ctrl)
+
+        ctrl = VirtualControllerUSB(self.conn,
+                                    model="ich9-uhci2")
+        ctrl.get_master().startport = 2
+        self.add_device(ctrl)
+
+        ctrl = VirtualControllerUSB(self.conn,
+                                    model="ich9-uhci3")
+        ctrl.get_master().startport = 4
+        self.add_device(ctrl)
+
     def _set_defaults(self, devlist_func, remove_func, features):
         if self.installer.is_hvm():
             self._set_hvm_defaults(devlist_func, features)
-- 
1.7.6.2


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]