[PATCH] [TEST] Skipping 01_verify_refprof.py, 02_refprofile_errs.py tc if cim_rev is less than 501

# HG changeset patch # User Deepti B. Kalakeri <deeptik@linux.vnet.ibm.com> # Date 1210067342 25200 # Node ID 9116b5e9f5305739202e10c7a3f8b155fa9540a2 # Parent e19dd89679ab79ad10fee3632885816fd231b84d [TEST] Skipping 01_verify_refprof.py, 02_refprofile_errs.py tc if cim_rev is less than 501. Signed-off-by: Deepti B. Kalakeri <deeptik@linux.vnet.ibm.com> diff -r e19dd89679ab -r 9116b5e9f530 suites/libvirt-cim/cimtest/ReferencedProfile/01_verify_refprof.py --- a/suites/libvirt-cim/cimtest/ReferencedProfile/01_verify_refprof.py Mon May 05 23:47:38 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ReferencedProfile/01_verify_refprof.py Tue May 06 02:49:02 2008 -0700 @@ -78,9 +78,11 @@ from CimTest.Globals import logger, CIM_ from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, CIM_ERROR_ASSOCIATORS from CimTest.Globals import do_main from XenKvmLib.classes import get_typed_class -from CimTest.ReturnCodes import FAIL, PASS +from CimTest.ReturnCodes import FAIL, PASS, SKIP +from XenKvmLib.const import CIM_REV sup_types = ['Xen', 'KVM', 'XenFV'] +libvirtcim_rev = 501 def print_field_error(fieldname, ret_value, exp_value): logger.error("%s Mismatch", fieldname) @@ -94,7 +96,7 @@ def get_proflist(): proflist = enumclass.enumerate(server, reg_classname, key_list, virt) if len(proflist) < 5: logger.error("%s returned %i %s objects, expected atleast 5", - reg_classname, len(proflist), 'Profile') + reg_classname, len(proflist), 'Profile') status = FAIL except Exception, detail: @@ -139,7 +141,7 @@ def get_refprof_verify_info(proflist): for instid in proflist: try: assoc_info = Associators(server, assoc_name, reg_classname, virt, InstanceID = instid, - CreationClassName = reg_classname) + CreationClassName = reg_classname) if len(assoc_info) < 1: logger.error("%s returned %i %s objects, expected atleast 1", assoc_name, len(assoc_info), 'Profiles') @@ -165,6 +167,13 @@ def main(): virt = options.virt server = options.ip status = PASS + + # Referenced Profile was introduced as part of changeset 501 + # and is not available in the libvirt-cim rpm, hence skipping tc + # if CIM_REV 501 + if CIM_REV < libvirtcim_rev: + return SKIP + prev_namespace = Globals.CIM_NS Globals.CIM_NS = 'root/interop' reg_classname = get_typed_class(virt, 'RegisteredProfile') diff -r e19dd89679ab -r 9116b5e9f530 suites/libvirt-cim/cimtest/ReferencedProfile/02_refprofile_errs.py --- a/suites/libvirt-cim/cimtest/ReferencedProfile/02_refprofile_errs.py Mon May 05 23:47:38 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ReferencedProfile/02_refprofile_errs.py Tue May 06 02:49:02 2008 -0700 @@ -58,10 +58,13 @@ from CimTest.Globals import logger, CIM_ from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, CIM_ERROR_ASSOCIATORS from CimTest.Globals import do_main, CIM_USER, CIM_PASS from XenKvmLib.classes import get_typed_class -from CimTest.ReturnCodes import FAIL, PASS +from CimTest.ReturnCodes import FAIL, PASS, SKIP from XenKvmLib.common_util import try_assoc +from XenKvmLib.const import CIM_REV sup_types = ['Xen', 'KVM', 'XenFV'] +libvirtcim_rev = 501 + expr_values = { 'INVALID_Instid_KeyName' : { 'rc' : pywbem.CIM_ERR_FAILED, @@ -121,6 +124,12 @@ def main(): virt = options.virt server = options.ip status = PASS + # Referenced Profile was introduced as part of changeset 501 + # and is not available in the libvirt-cim rpm, hence skipping tc + # if CIM_REV 501 + if CIM_REV < libvirtcim_rev: + return SKIP + prev_namespace = Globals.CIM_NS Globals.CIM_NS = 'root/interop' reg_classname = get_typed_class(virt, 'RegisteredProfile')

Deepti B. Kalakeri wrote:
# HG changeset patch # User Deepti B. Kalakeri <deeptik@linux.vnet.ibm.com> # Date 1210067342 25200 # Node ID 9116b5e9f5305739202e10c7a3f8b155fa9540a2 # Parent e19dd89679ab79ad10fee3632885816fd231b84d [TEST] Skipping 01_verify_refprof.py, 02_refprofile_errs.py tc if cim_rev is less than 501.
This patch didn't apply for me. However, it looks good. No comments =) -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com
participants (2)
-
Deepti B. Kalakeri
-
Kaitlin Rupert