[Libvirt-cim] [PATCH] [TEST] #2Fix VirtualSystemSnapshotService.01&02 to work with sblim base provider installed and without
Deepti B Kalakeri
deeptik at linux.vnet.ibm.com
Thu Sep 25 10:03:06 UTC 2008
+1 for me
yunguol at cn.ibm.com wrote:
> # HG changeset patch
> # User Guolian Yun <yunguol at cn.ibm.com>
> # Date 1222313268 25200
> # Node ID 3305a480c2e2b117b9a45d2e7c7ede9fd24375bf
> # Parent 375ae129b8e910fe42a5e4434b67ada5589bc72f
> [TEST] #2Fix VirtualSystemSnapshotService.01&02 to work with sblim base provider installed and without
>
> Signed-off-by: Guolian Yun <yunguol at cn.ibm.com>
>
> diff -r 375ae129b8e9 -r 3305a480c2e2 suites/libvirt-cim/cimtest/VirtualSystemSnapshotService/01_enum.py
> --- a/suites/libvirt-cim/cimtest/VirtualSystemSnapshotService/01_enum.py Tue Sep 23 04:45:04 2008 -0700
> +++ b/suites/libvirt-cim/cimtest/VirtualSystemSnapshotService/01_enum.py Wed Sep 24 20:27:48 2008 -0700
> @@ -23,6 +23,7 @@
> # Date: 25-03-2008
> import sys
> from XenKvmLib import enumclass
> +from XenKvmLib.common_util import check_sblim
> from CimTest.Globals import CIM_ERROR_ENUMERATE, logger
> from CimTest.ReturnCodes import PASS, FAIL
> from XenKvmLib.const import do_main
> @@ -40,9 +41,14 @@ def main():
> # Expected results from enumeration
> cn = get_typed_class(options.virt, "VirtualSystemSnapshotService")
> Name = 'SnapshotService'
> - status, host_name, classname = get_host_info(options.ip, options.virt)
> - if status != PASS:
> - return status
> + status, linux_cs = check_sblim(options.ip, options.virt)
> + if status == PASS:
> + host_name = linux_cs.Name
> + classname = linux_cs.CreationClassName
> + else:
> + status, host_name, classname = get_host_info(options.ip, options.virt)
> + if status != PASS:
> + return status
> try:
> vs_sservice = enumclass.enumerate_inst(options.ip,
> "VirtualSystemSnapshotService",
> diff -r 375ae129b8e9 -r 3305a480c2e2 suites/libvirt-cim/cimtest/VirtualSystemSnapshotService/02_vs_sservice_gi_errs.py
> --- a/suites/libvirt-cim/cimtest/VirtualSystemSnapshotService/02_vs_sservice_gi_errs.py Tue Sep 23 04:45:04 2008 -0700
> +++ b/suites/libvirt-cim/cimtest/VirtualSystemSnapshotService/02_vs_sservice_gi_errs.py Wed Sep 24 20:27:48 2008 -0700
> @@ -28,6 +28,7 @@ import sys
> import sys
> import pywbem
> from XenKvmLib import assoc
> +from XenKvmLib.common_util import check_sblim
> from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS
> from CimTest.ReturnCodes import PASS
> from XenKvmLib.common_util import try_getinstance
> @@ -231,7 +232,12 @@ def main():
> conn = assoc.myWBEMConnection('http://%s' % options.ip, (CIM_USER, CIM_PASS), CIM_NS)
> ccn = get_typed_class(options.virt, "VirtualSystemSnapshotService")
> name = "SnapshotService"
> - status, sys_name, sccn = get_host_info(options.ip, options.virt)
> + status, linux_cs = check_sblim(options.ip, options.virt)
> + if status == PASS:
> + sys_name = linux_cs.Name
> + sccn = linux_cs.CreationClassName
> + else:
> + status, sys_name, sccn = get_host_info(options.ip, options.virt)
> if status != PASS:
> return status
> field = 'INVALID_CCName'
>
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim at redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim
>
More information about the Libvirt-cim
mailing list