+1 from me.
Best,
Regards
Daisy (Ô˹úÁ«)
VSM Team, China Systems & Technology Labs (CSTL)
E-mail: yunguol@cn.ibm.com
TEL: (86)-21-60922403
Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203
libvirt-cim-bounces@redhat.com wrote on 2008-10-22
04:38:17:
> # HG changeset patch
> # User Kaitlin Rupert <karupert@us.ibm.com>
> # Date 1224620362 25200
> # Node ID 77c8b5955eb50d027ac97ce59f01462205b6115f
> # Parent 868aa0f5175568c5752787c1fcbd2b1df4001aad
> [TEST] Fix several negative test cases to work with older provider
versions.
>
> Signed-off-by: Kaitlin Rupert <karupert@us.ibm.com>
>
> diff -r 868aa0f51755 -r 77c8b5955eb5 suites/libvirt-
> cim/cimtest/LogicalDisk/03_ld_gi_errs.py
> --- a/suites/libvirt-cim/cimtest/LogicalDisk/03_ld_gi_errs.py
Tue
> Oct 21 01:31:11 2008 -0700
> +++ b/suites/libvirt-cim/cimtest/LogicalDisk/03_ld_gi_errs.py
Tue
> Oct 21 13:19:22 2008 -0700
> @@ -133,7 +133,7 @@
> from CimTest.ReturnCodes import PASS, FAIL
> from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS,
\
>
CIM_ERROR_GETINSTANCE
> -from XenKvmLib.const import do_main
> +from XenKvmLib.const import do_main, get_provider_version
>
> sup_types = ['Xen', 'KVM', 'XenFV']
>
> @@ -207,6 +207,13 @@
> global conn
> conn = assoc.myWBEMConnection('http://%s' % options.ip,
> (CIM_USER, CIM_PASS), CIM_NS)
>
> + rev, changeset = get_provider_version(options.virt,
options.ip)
> + if rev < 682:
> + old_ret = { 'rc' : pywbem.CIM_ERR_NOT_FOUND,
> + 'desc'
: "No such instance (INVALID_DevID_Keyvalue)"
> + }
> + expr_values["invalid_devid_keyvalue"]
= old_ret
> +
> global name_val
> name_val = [
> 'CreationClassName',
disk.CreationClassName,
> diff -r 868aa0f51755 -r 77c8b5955eb5 suites/libvirt-
> cim/cimtest/Processor/03_proc_gi_errs.py
> --- a/suites/libvirt-cim/cimtest/Processor/03_proc_gi_errs.py
Tue
> Oct 21 01:31:11 2008 -0700
> +++ b/suites/libvirt-cim/cimtest/Processor/03_proc_gi_errs.py
Tue
> Oct 21 13:19:22 2008 -0700
> @@ -131,7 +131,7 @@
> from XenKvmLib.test_doms import destroy_and_undefine_all
> from CimTest.ReturnCodes import PASS, FAIL
> from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS
> -from XenKvmLib.const import do_main
> +from XenKvmLib.const import do_main, get_provider_version
>
> sup_types = ['Xen', 'KVM', 'XenFV']
>
> @@ -207,6 +207,13 @@
> 'INVALID_SysName_Keyvalue'
: 'invalid_sysname'
> }
>
> + rev, changeset = get_provider_version(options.virt,
options.ip)
> + if rev < 682:
> + old_ret = { 'rc' : pywbem.CIM_ERR_NOT_FOUND,
> + 'desc'
: "No such instance (INVALID_DevID_Keyvalue)"
> + }
> + expr_values["invalid_devid_keyvalue"]
= old_ret
> +
> i = 0
> for field1, field2 in sorted(tc_scen.items()):
> retval = try_invalid_gi(i, field1,
field2)
> diff -r 868aa0f51755 -r 77c8b5955eb5 suites/libvirt-
> cim/cimtest/SettingsDefine/03_sds_fwd_errs.py
> --- a/suites/libvirt-cim/cimtest/SettingsDefine/03_sds_fwd_errs.py
> Tue Oct 21 01:31:11 2008 -0700
> +++ b/suites/libvirt-cim/cimtest/SettingsDefine/03_sds_fwd_errs.py
> Tue Oct 21 13:19:22 2008 -0700
> @@ -152,7 +152,7 @@
> from XenKvmLib.classes import get_typed_class
> from CimTest.ReturnCodes import PASS, FAIL
> from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS
> -from XenKvmLib.const import do_main
> +from XenKvmLib.const import do_main, get_provider_version
>
> sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
>
> @@ -246,6 +246,13 @@
> 'INVALID_SysName_Keyname',
'INVALID_SysName_Keyval'
> ]
>
> + rev, changeset = get_provider_version(options.virt,
options.ip)
> + if rev < 682:
> + old_ret = { 'rc' : pywbem.CIM_ERR_NOT_FOUND,
> + 'desc'
: "No such instance (INVALID_DevID_Keyval)"
> + }
> + expr_values["INVALID_DevID_Keyval"]
= old_ret
> +
> sccn = get_typed_class(options.virt, 'ComputerSystem')
> for classname, devid in sorted(class_id.items()):
> name_val = get_name_val(classname,
devid, sccn)
> diff -r 868aa0f51755 -r 77c8b5955eb5 suites/libvirt-cim/lib/XenKvmLib/const.py
> --- a/suites/libvirt-cim/lib/XenKvmLib/const.py Tue Oct 21
01:31:
> 11 2008 -0700
> +++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Tue Oct 21
13:19:
> 22 2008 -0700
> @@ -139,7 +139,7 @@
> if revision is None or changeset is None:
> return 0, "Unknown"
>
> - revision.strip("+")
> + revision = revision.strip("+")
> if revision.isdigit():
> revision = int(revision)
>
>
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim@redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim