virt-manager/776c1d97-fix-changing-USB-device-model.patch
Charles Arnold 53545deafa - Upstream bug fixes
776c1d97-fix-changing-USB-device-model.patch
  bbc4f83b-enable-qemu_ga-for-sles-11-sp4-and-newer.patch
  f8af2e6b-verify-HYPER-V-support-after-customization.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=234
2015-05-21 15:12:46 +00:00

42 lines
1.7 KiB
Diff

Subject: domain: Fix changing USB device model
From: Cole Robinson crobinso@redhat.com Tue May 19 13:21:36 2015 -0400
Date: Tue May 19 18:29:45 2015 -0400:
Git: 776c1d97c667628b03ad79d4e89457675f475dfb
Broken before v1.2.0
Index: virt-manager-1.2.0/virtManager/domain.py
===================================================================
--- virt-manager-1.2.0.orig/virtManager/domain.py
+++ virt-manager-1.2.0/virtManager/domain.py
@@ -953,23 +953,22 @@ class vmmDomain(vmmLibvirtObject):
def _change_model():
if editdev.type == "usb":
- guest = self._make_xmlobj_to_define()
- ctrls = guest.get_devices("controller")
+ ctrls = xmlobj.get_devices("controller")
ctrls = [x for x in ctrls if (x.type ==
VirtualController.TYPE_USB)]
for dev in ctrls:
- guest.remove_device(dev)
+ xmlobj.remove_device(dev)
if model == "ich9-ehci1":
for dev in VirtualController.get_usb2_controllers(
- guest.conn):
- guest.add_device(dev)
+ xmlobj.conn):
+ xmlobj.add_device(dev)
else:
- dev = VirtualController(guest.conn)
+ dev = VirtualController(xmlobj.conn)
dev.type = "usb"
if model != "default":
dev.model = model
- guest.add_device(dev)
+ xmlobj.add_device(dev)
elif editdev.type == "scsi":
if model == "default":