[virt-tools-list] [PATCH 1/3] checking libvirt version and UPDATE_CPU flag
Guannan Ren
gren at redhat.com
Tue Apr 16 11:02:14 UTC 2013
---
virtManager/connection.py | 7 +++++++
virtinst/support.py | 12 ++++++++++++
2 files changed, 19 insertions(+)
diff --git a/virtManager/connection.py b/virtManager/connection.py
index 40db90a..2d407e3 100644
--- a/virtManager/connection.py
+++ b/virtManager/connection.py
@@ -591,6 +591,13 @@ class vmmConnection(vmmGObject):
else:
logging.debug("Domain XML secure flag not supported.")
+ if virtinst.support.check_domain_support(vm,
+ virtinst.support.SUPPORT_DOMAIN_XML_UPDATE_CPU):
+ 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 b361ea2..453cf6c 100644
--- a/virtinst/support.py
+++ b/virtinst/support.py
@@ -45,6 +45,8 @@ 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
+SUPPORT_DOMAIN_XML_UPDATE_CPU = 1010
# Flags for check_pool_support
SUPPORT_STORAGE_CREATEVOLFROM = 2000
@@ -200,6 +202,16 @@ _support_dict = {
"version" : 9010,
},
+ SUPPORT_DOMAIN_CPU_HOST_MODEL : {
+ "version" : 9010,
+ },
+
+ SUPPORT_DOMAIN_XML_UPDATE_CPU : {
+ "function" : "virDomain.XMLDesc",
+ "args" : (),
+ "flag" : "VIR_DOMAIN_XML_UPDATE_CPU",
+ },
+
# 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