[Libvirt-cim] [PATCH] [TEST] Fix VirtualSystemSnapshotService.01&02 to work with sblim base provider installed and without

Deepti B Kalakeri deeptik at linux.vnet.ibm.com
Wed Sep 24 13:24:53 UTC 2008


+1 for me.

yunguol at cn.ibm.com wrote:
> # HG changeset patch
> # User Guolian Yun <yunguol at cn.ibm.com>
> # Date 1222241113 25200
> # Node ID e8629ccc57322c25ee54826a59b53a88f092bfdb
> # Parent  d2ae228a60c34b78c3dd1e4f43f6a5413898980d
> [TEST] Fix VirtualSystemSnapshotService.01&02 to work with sblim base provider installed and without
>
> Signed-off-by: Guolian Yun <yunguol at cn.ibm.com>
>
> diff -r d2ae228a60c3 -r e8629ccc5732 suites/libvirt-cim/cimtest/VirtualSystemSnapshotService/01_enum.py
> --- a/suites/libvirt-cim/cimtest/VirtualSystemSnapshotService/01_enum.py	Mon Sep 22 11:28:02 2008 -0700
> +++ b/suites/libvirt-cim/cimtest/VirtualSystemSnapshotService/01_enum.py	Wed Sep 24 00:25:13 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[0].Name
> +        classname = linux_cs[0].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 d2ae228a60c3 -r e8629ccc5732 suites/libvirt-cim/cimtest/VirtualSystemSnapshotService/02_vs_sservice_gi_errs.py
> --- a/suites/libvirt-cim/cimtest/VirtualSystemSnapshotService/02_vs_sservice_gi_errs.py	Mon Sep 22 11:28:02 2008 -0700
> +++ b/suites/libvirt-cim/cimtest/VirtualSystemSnapshotService/02_vs_sservice_gi_errs.py	Wed Sep 24 00:25:13 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[0].Name
> +        sccn = linux_cs[0].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