virt-manager/53a05e73-fix-edit-maxvcpus.patch
Charles Arnold 850019f018 - Upstream bug fixes
53ac1f8d-fix_show_err_typo.patch
  53ac1f8d-createnet-validate-last-page-before-creating-network.patch
- KVM: Don't check for /dev/kvm. It is now built into the kernel
  virtman-kvm.patch

- Upstream bug fix
  53a995cb-fix-usb-storage-removable-syntax.patch

- Upstream bug fixes
  5397b647-createnet-enable-specifying-29-subnet.patch
  539e8cca-createpool-fix-creation-of-gluster-pools.patch
  53a05e73-fix-edit-maxvcpus.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=184
2014-07-01 03:41:52 +00:00

57 lines
1.8 KiB
Diff

Subject: virt-manager: split EDIT_VCPUS and EDIT_MAXVCPUS
From: Giuseppe Scrivano gscrivan@redhat.com Tue Jun 17 14:13:30 2014 +0200
Date: Tue Jun 17 17:27:47 2014 +0200:
Git: 4ac49a1d66b12ae6f7d50ec4f368ff3d770e6b42
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1098040
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Index: virt-manager-1.0.1/virtManager/details.py
===================================================================
--- virt-manager-1.0.1.orig/virtManager/details.py
+++ virt-manager-1.0.1/virtManager/details.py
@@ -54,6 +54,7 @@ EDIT_DESC,
EDIT_IDMAP,
EDIT_VCPUS,
+EDIT_MAXVCPUS,
EDIT_CPUSET,
EDIT_CPU,
EDIT_TOPOLOGY,
@@ -104,7 +105,7 @@ EDIT_FS,
EDIT_HOSTDEV_ROMBAR,
-) = range(1, 43)
+) = range(1, 44)
# Columns in hw list model
@@ -1712,7 +1713,11 @@ class vmmDetails(vmmGObjectUI):
def config_maxvcpus_changed(self, ignore):
if self.widget("config-maxvcpus").get_sensitive():
self.config_cpu_topology_changed()
- self.enable_apply(EDIT_VCPUS)
+
+ # As this callback can be triggered by other events, set EDIT_MAXVCPUS
+ # only when the value is changed.
+ if self.config_get_maxvcpus() != self.vm.vcpu_max_count():
+ self.enable_apply(EDIT_MAXVCPUS)
def on_cpu_copy_host_clicked(self, src):
uiutil.set_grid_row_visible(
@@ -2004,9 +2009,11 @@ class vmmDetails(vmmGObjectUI):
if self.edited(EDIT_VCPUS):
kwargs["vcpus"] = self.config_get_vcpus()
- kwargs["maxvcpus"] = self.config_get_maxvcpus()
hotplug_args["vcpus"] = kwargs["vcpus"]
+ if self.edited(EDIT_MAXVCPUS):
+ kwargs["maxvcpus"] = self.config_get_maxvcpus()
+
if self.edited(EDIT_CPUSET):
kwargs["cpuset"] = self.get_text("config-vcpupin")