# HG changeset patch
# User Deepti B. Kalakeri<deeptik(a)linux.vnet.ibm.com
# Date 1260446374 28800
# Node ID e95a3d156fc2284484f98f07c39fbfd65929a395
# Parent 683a8a57d54506032a659bdb9178b7558827ffde
[TEST] Fixing vsms/08_modifyresource.py
Tested with KVM and current sources on Fedora
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 683a8a57d545 -r e95a3d156fc2 suites/libvirt-cim/lib/XenKvmLib/vsms_util.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vsms_util.py Sat Dec 05 02:22:09 2009 -0200
+++ b/suites/libvirt-cim/lib/XenKvmLib/vsms_util.py Thu Dec 10 03:59:34 2009 -0800
@@ -120,9 +120,10 @@
cxml.dumpxml(server)
dom = cxml.xml_get_dom_name()
cpu = virsh_vcpuinfo(server, dom, virt)
- if cpu is None:
+ if int(cpu) < int(ncpu) or cpu is None:
logger.info("Unable to get vcpuinfo from virsh, using XML values")
cpu = cxml.xml_get_vcpu()
+
if int(cpu) != int(ncpu):
logger.error("Got %d, exp %d.", int(cpu), int(ncpu))
raise Exception('Error changing rs for vcpu')