[PATCH] [TEST] Updating common_util.py library and fixing 01_verify_refprof.py tc

# HG changeset patch # User Deepti B. Kalakeri<deeptik@linux.vnet.ibm.com> # Date 1221057648 -19800 # Node ID b04a7bbf99f10942e9b10da87278738f335a12f4 # Parent aaa44481faee136c0ced9d400860d1eb1002df31 [TEST] Updating common_util.py library and fixing 01_verify_refprof.py tc. Including the modifications for "Central Class to profile" and "Update migration profile version" changes. Changes: -------- In common_util.py ----------------- 1) Updated the info in profile_init_list() to reflect the "Update migration profile version" changes. 2) Included new GRDV values in profile_init_list() to reflect the "Central Class to profile" changes. In 01_verify_refprof.py tc --------------------------- 1) Fixed the failure because of the "Central Class to profile" changes. 2) Updated the status value to FAIL as it was returning PASS even for fail conditions. 3) Fixed Indentation. Signed-off-by: Deepti B. Kalakeri <deeptik@linux.vnet.ibm.com> diff -r aaa44481faee -r b04a7bbf99f1 suites/libvirt-cim/cimtest/ReferencedProfile/01_verify_refprof.py --- a/suites/libvirt-cim/cimtest/ReferencedProfile/01_verify_refprof.py Mon Sep 08 23:44:21 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ReferencedProfile/01_verify_refprof.py Wed Sep 10 20:10:48 2008 +0530 @@ -107,15 +107,17 @@ def get_proflist(): return status, profiles_instid_list def verify_fields(assoc_info, sys_prof_info): - fieldnames = ["InstanceID", "RegisteredOrganization", "RegisteredName", "RegisteredVersion"] + fieldnames = ["InstanceID", "RegisteredOrganization", + "RegisteredName", "RegisteredVersion"] for f in fieldnames: if assoc_info[f] != sys_prof_info[f]: print_field_error(f, assoc_info[f], sys_prof_info[f]) return FAIL + return PASS def verify_ref_assoc_info(assoc_info, profilename): - status = PASS + status = FAIL profiles = profile_init_list() logger.info("Verifying profile: %s", profilename) for inst in assoc_info: diff -r aaa44481faee -r b04a7bbf99f1 suites/libvirt-cim/lib/XenKvmLib/common_util.py --- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Mon Sep 08 23:44:21 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Wed Sep 10 20:10:48 2008 +0530 @@ -270,8 +270,6 @@ def profile_init_list(): "RegisteredVersion" : "1.0.0a" } gen_dev_prof = { - "InstanceID" : - "CIM:DSP1059-GenericDeviceResourceVirtualization-1.0.0", "RegisteredOrganization" : 2, "RegisteredName" : "Generic Device Resource Virtualization", "RegisteredVersion" : "1.0.0" @@ -283,10 +281,10 @@ def profile_init_list(): "RegisteredVersion" : "1.0.0" } vs_mig_prof = { - "InstanceID" : "CIM:DSP1081-VirtualSystemMigration-1.0", + "InstanceID" : "CIM:DSP1081-VirtualSystemMigration-0.8.1", "RegisteredOrganization" : 2, "RegisteredName" : "Virtual System Migration", - "RegisteredVersion" : "1.0" + "RegisteredVersion" : "0.8.1" } profiles = { @@ -294,10 +292,14 @@ def profile_init_list(): 'DSP1042' : sys_prof_info, 'DSP1045' : mem_res_prof, 'DSP1057' : vs_prof, - 'DSP1059' : gen_dev_prof, 'DSP1081' : vs_mig_prof } - + gdrv_list = ['DSP1059-GenericDeviceResourceVirtualization-1.0.0_d', + 'DSP1059-GenericDeviceResourceVirtualization-1.0.0_n', + 'DSP1059-GenericDeviceResourceVirtualization-1.0.0_p' ] + for key in gdrv_list: + profiles[key] = gen_dev_prof.copy() + profiles[key]['InstanceID'] = 'CIM:' + key return profiles def conf_file():
participants (1)
-
Deepti B. Kalakeri