[virt-tools-list] [PATCH v2 1/3] check cpu host-model mode support
Guannan Ren
gren at redhat.com
Thu Apr 18 07:47:33 UTC 2013
UPDATE_CPU flag exists after v0.8.0, so libvirt that
supports HOST_MODEL should support UPDATE_CPU,
the earliest version we are going to check is v0.9.10.
---
virtManager/connection.py | 7 +++++++
virtinst/support.py | 5 +++++
2 files changed, 12 insertions(+)
diff --git a/virtManager/connection.py b/virtManager/connection.py
index cd340ac..a726ac3 100644
--- a/virtManager/connection.py
+++ b/virtManager/connection.py
@@ -547,6 +547,13 @@ class vmmConnection(vmmGObject):
else:
logging.debug("Domain XML secure flag not supported.")
+ if virtinst.support.check_domain_support(vm,
+ virtinst.support.SUPPORT_DOMAIN_CPU_HOST_MODEL):
+ inact |= libvirt.VIR_DOMAIN_XML_UPDATE_CPU
+ act |= libvirt.VIR_DOMAIN_XML_UPDATE_CPU
+ else:
+ logging.debug("Domain XML update flag not supported.")
+
return inact, act
return self._get_flags_helper(vm, key, check_func)
diff --git a/virtinst/support.py b/virtinst/support.py
index 614ae30..f998aff 100644
--- a/virtinst/support.py
+++ b/virtinst/support.py
@@ -45,6 +45,7 @@ SUPPORT_DOMAIN_JOB_INFO = 1005
SUPPORT_DOMAIN_MAXVCPUS_XML = 1006
SUPPORT_DOMAIN_CONSOLE_STREAM = 1007
SUPPORT_DOMAIN_SET_METADATA = 1008
+SUPPORT_DOMAIN_CPU_HOST_MODEL = 1009
# Flags for check_pool_support
SUPPORT_STORAGE_CREATEVOLFROM = 2000
@@ -200,6 +201,10 @@ _support_dict = {
"version" : 9010,
},
+ SUPPORT_DOMAIN_CPU_HOST_MODEL : {
+ "version" : 9010,
+ },
+
# Pool checks
# This can't ever require a pool object for back compat reasons
--
1.7.11.2
More information about the virt-tools-list
mailing list