# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1247507590 25200
# Node ID 46932b337bb4387cb8366cb9529d73e212e11c1d
# Parent de91439de07c3cc8e3ca5a5e398f3fad35d0a664
[TEST] Fix VSSS to work with older versions of libvirt-cim...
To work with versions that don't return a ResultingSnapshot result from
CreateSnapshot().
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r de91439de07c -r 46932b337bb4
suites/libvirt-cim/cimtest/VirtualSystemSnapshotService/03_create_snapshot.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemSnapshotService/03_create_snapshot.py Mon
Jul 13 10:45:38 2009 -0700
+++ b/suites/libvirt-cim/cimtest/VirtualSystemSnapshotService/03_create_snapshot.py Mon
Jul 13 10:53:10 2009 -0700
@@ -28,7 +28,7 @@
from pywbem import cim_types
from CimTest.Globals import logger
from CimTest.ReturnCodes import PASS, FAIL
-from XenKvmLib.const import do_main
+from XenKvmLib.const import do_main, get_provider_version
from XenKvmLib.vxml import get_class
from XenKvmLib.classes import get_typed_class, inst_to_mof
from XenKvmLib.enumclass import EnumNames, EnumInstances, GetInstance
@@ -41,6 +41,8 @@
SNAPSHOT = cim_types.Uint16(32769)
test_dom = "snapshot_vm"
+libvirt_cim_res_snap_rev = 876
+
def get_cs_ref(virt, ip):
cs_cn = get_typed_class(virt, "ComputerSystem")
@@ -130,7 +132,9 @@
if output[1]['Job'] is None:
raise Exception("CreateSnapshot failed to return a CIM job inst")
- if output[1]['ResultingSnapshot'] is None:
+ rev, changeset = get_provider_version(options.virt, options.ip)
+ if rev >= libvirt_cim_res_snap_rev and \
+ output[1]['ResultingSnapshot'] is None:
raise Exception("CreateSnapshot failed to return
ResultingSnapshot")
except Exception, detail:
Show replies by date
+1 for me.
--
Thanks and Regards,
Deepti B. Kalakeri
IBM Linux Technology Center
deeptik(a)linux.vnet.ibm.com