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

Cole Robinson crobinso at redhat.com
Thu Oct 6 18:07:03 UTC 2011


On 09/23/2011 11:13 AM, Marc-André Lureau wrote:
> ---
>  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)

Pushed this.

Thanks,
Cole




More information about the virt-tools-list mailing list