# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1222240659 -19800
# Node ID d06e48783aa9811d497f685e3bb0e4495da629bc
# Parent d2ae228a60c34b78c3dd1e4f43f6a5413898980d
[TEST] Updating the 03_ld_gi_errs.py, 03_proc_gi_errs.py, 03_sds_fwd_errs.py tc
Updating the exception message which was used to verify the error message when an invalid
device id is passed because of the changes that went in as part of
"Add a little debugging to the device path" patch.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r d2ae228a60c3 -r d06e48783aa9
suites/libvirt-cim/cimtest/LogicalDisk/03_ld_gi_errs.py
--- a/suites/libvirt-cim/cimtest/LogicalDisk/03_ld_gi_errs.py Mon Sep 22 11:28:02 2008
-0700
+++ b/suites/libvirt-cim/cimtest/LogicalDisk/03_ld_gi_errs.py Wed Sep 24 12:47:39 2008
+0530
@@ -138,15 +138,16 @@ sup_types = ['Xen', 'KVM', 'XenFV']
sup_types = ['Xen', 'KVM', 'XenFV']
expr_values = {
- "invalid_ccname" : {'rc' : pywbem.CIM_ERR_NOT_FOUND, \
- 'desc' : "No such instance
(CreationClassName)" }, \
- "invalid_devid_keyname" : {'rc' : pywbem.CIM_ERR_FAILED, \
- 'desc' : "No DeviceID specified" }, \
- "invalid_devid_keyvalue" : {'rc' : pywbem.CIM_ERR_NOT_FOUND, \
- 'desc' : "No such instance
(INVALID_DevID_Keyvalue)" },\
- "invalid_sccname" : {'rc' : pywbem.CIM_ERR_NOT_FOUND, \
- 'desc' : "No such instance
(SystemCreationClassName)" },\
- "invalid_sysname" : {'rc' : pywbem.CIM_ERR_NOT_FOUND, \
+ "invalid_ccname" : {'rc' : pywbem.CIM_ERR_NOT_FOUND,
+ 'desc' : "No such instance
(CreationClassName)" },
+ "invalid_devid_keyname" : {'rc' : pywbem.CIM_ERR_FAILED,
+ 'desc' : "No DeviceID specified" },
+ "invalid_devid_keyvalue" : {'rc' : pywbem.CIM_ERR_NOT_FOUND,
+ 'desc' : "No such instance "\
+ "(bad id INVALID_DevID_Keyvalue)" },
+ "invalid_sccname" : {'rc' : pywbem.CIM_ERR_NOT_FOUND,
+ 'desc' : "No such instance
(SystemCreationClassName)" },
+ "invalid_sysname" : {'rc' : pywbem.CIM_ERR_NOT_FOUND,
'desc' : "No such instance
(SystemName)" }
}
@@ -157,13 +158,13 @@ def try_invalid_gi(i, field1, field2):
temp = name_val[i]
name_val[i] = field1
keys = {
- name_val[0] : name_val[1], \
- name_val[2] : name_val[3], \
- name_val[4] : name_val[5], \
+ name_val[0] : name_val[1],
+ name_val[2] : name_val[3],
+ name_val[4] : name_val[5],
name_val[6] : name_val[7]
}
- ret_value = try_getinstance(conn, classname, keys, field_name=field1, \
- expr_values=expr_values[field2], bug_no="")
+ ret_value = try_getinstance(conn, classname, keys, field_name=field1,
+ expr_values=expr_values[field2], bug_no="")
if ret_value != PASS:
logger.error("------ FAILED: %s------" % field1)
name_val[i] = temp
@@ -208,19 +209,19 @@ def main():
global name_val
name_val = [
- 'CreationClassName', disk.CreationClassName, \
- 'DeviceID', disk.DeviceID, \
- 'SystemCreationClassName', disk.SystemCreationClassName, \
+ 'CreationClassName', disk.CreationClassName,
+ 'DeviceID', disk.DeviceID,
+ 'SystemCreationClassName', disk.SystemCreationClassName,
'SystemName', disk.SystemName
]
- tc_scen = { 'INVALID_CCName_Keyname' : 'invalid_ccname', \
- 'INVALID_CCName_Keyvalue' : 'invalid_ccname', \
- 'INVALID_DevID_Keyname' : 'invalid_devid_keyname', \
- 'INVALID_DevID_Keyvalue' : 'invalid_devid_keyvalue', \
- 'INVALID_SCCName_Keyname' : 'invalid_sccname', \
- 'INVALID_SCCName_Keyvalue' : 'invalid_sccname', \
- 'INVALID_SysName_Keyname' : 'invalid_sysname', \
+ tc_scen = { 'INVALID_CCName_Keyname' : 'invalid_ccname',
+ 'INVALID_CCName_Keyvalue' : 'invalid_ccname',
+ 'INVALID_DevID_Keyname' : 'invalid_devid_keyname',
+ 'INVALID_DevID_Keyvalue' : 'invalid_devid_keyvalue',
+ 'INVALID_SCCName_Keyname' : 'invalid_sccname',
+ 'INVALID_SCCName_Keyvalue' : 'invalid_sccname',
+ 'INVALID_SysName_Keyname' : 'invalid_sysname',
'INVALID_SysName_Keyvalue' : 'invalid_sysname'
}
diff -r d2ae228a60c3 -r d06e48783aa9
suites/libvirt-cim/cimtest/Processor/03_proc_gi_errs.py
--- a/suites/libvirt-cim/cimtest/Processor/03_proc_gi_errs.py Mon Sep 22 11:28:02 2008
-0700
+++ b/suites/libvirt-cim/cimtest/Processor/03_proc_gi_errs.py Wed Sep 24 12:47:39 2008
+0530
@@ -141,7 +141,8 @@ expr_values = {
"invalid_devid_keyname" : {'rc' : pywbem.CIM_ERR_FAILED,
'desc' : "No DeviceID specified" },
"invalid_devid_keyvalue" : {'rc' : pywbem.CIM_ERR_NOT_FOUND,
- 'desc' : "No such instance
(INVALID_DevID_Keyvalue)" },
+ 'desc' : "No such instance "\
+ "(bad id INVALID_DevID_Keyvalue)" },
"invalid_sccname" : {'rc' : pywbem.CIM_ERR_NOT_FOUND,
'desc' : "No such instance
(SystemCreationClassName)" },
"invalid_sysname" : {'rc' : pywbem.CIM_ERR_NOT_FOUND,
@@ -161,8 +162,8 @@ def try_invalid_gi(i, field1, field2):
k = j * 2
keys[name_val[k]] = name_val[k+1]
- ret_value = try_getinstance(conn, classname, keys, field_name=field1, \
- expr_values=expr_values[field2], bug_no="")
+ ret_value = try_getinstance(conn, classname, keys, field_name=field1,
+ expr_values=expr_values[field2], bug_no="")
if ret_value != PASS:
logger.error("------ FAILED: %s------" % field1)
name_val[i] = temp
diff -r d2ae228a60c3 -r d06e48783aa9
suites/libvirt-cim/cimtest/SettingsDefine/03_sds_fwd_errs.py
--- a/suites/libvirt-cim/cimtest/SettingsDefine/03_sds_fwd_errs.py Mon Sep 22 11:28:02
2008 -0700
+++ b/suites/libvirt-cim/cimtest/SettingsDefine/03_sds_fwd_errs.py Wed Sep 24 12:47:39
2008 +0530
@@ -161,30 +161,30 @@ test_vcpus = 1
test_vcpus = 1
expr_values = {
- "INVALID_DevID_Keyname" : { 'rc' : pywbem.CIM_ERR_FAILED, \
- 'desc' : 'No DeviceID specified' }, \
- "INVALID_DevID_Keyval" : { 'rc' : pywbem.CIM_ERR_NOT_FOUND, \
- 'desc' : 'No such instance (INVALID_DevID_Keyval)'},
\
- "INVALID_CCName_Keyname" : { 'rc' : pywbem.CIM_ERR_NOT_FOUND, \
- 'desc' : 'No such instance (CreationClassName)'}, \
- "INVALID_CCName_Keyval" : { 'rc' : pywbem.CIM_ERR_NOT_FOUND, \
- 'desc' : 'No such instance (CreationClassName)'}, \
- "INVALID_SCCName_Keyname" : { 'rc' : pywbem.CIM_ERR_NOT_FOUND, \
- 'desc' : 'No such instance
(SystemCreationClassName)'}, \
- "INVALID_SCCName_Keyval" : { 'rc' : pywbem.CIM_ERR_NOT_FOUND, \
- 'desc' : 'No such instance
(SystemCreationClassName)'}, \
- "INVALID_SysName_Keyname" : { 'rc' : pywbem.CIM_ERR_NOT_FOUND, \
- 'desc' : 'No such instance (SystemName)'}, \
- "INVALID_SysName_Keyval" : { 'rc' : pywbem.CIM_ERR_NOT_FOUND, \
+ "INVALID_DevID_Keyname" : { 'rc' : pywbem.CIM_ERR_FAILED,
+ 'desc' : 'No DeviceID specified' },
+ "INVALID_DevID_Keyval" : { 'rc' : pywbem.CIM_ERR_NOT_FOUND,
+ 'desc' : 'No such instance (bad id
INVALID_DevID_Keyval)'},
+ "INVALID_CCName_Keyname" : { 'rc' : pywbem.CIM_ERR_NOT_FOUND,
+ 'desc' : 'No such instance (CreationClassName)'},
+ "INVALID_CCName_Keyval" : { 'rc' : pywbem.CIM_ERR_NOT_FOUND,
+ 'desc' : 'No such instance (CreationClassName)'},
+ "INVALID_SCCName_Keyname" : { 'rc' : pywbem.CIM_ERR_NOT_FOUND,
+ 'desc' : 'No such instance
(SystemCreationClassName)'},
+ "INVALID_SCCName_Keyval" : { 'rc' : pywbem.CIM_ERR_NOT_FOUND,
+ 'desc' : 'No such instance
(SystemCreationClassName)'},
+ "INVALID_SysName_Keyname" : { 'rc' : pywbem.CIM_ERR_NOT_FOUND,
+ 'desc' : 'No such instance (SystemName)'},
+ "INVALID_SysName_Keyval" : { 'rc' : pywbem.CIM_ERR_NOT_FOUND,
'desc' : 'No such instance (SystemName)'}
}
def get_name_val(classname, device_id, sccn):
devid = "%s/%s" % (test_dom, device_id)
name_val = [
- 'DeviceID' , devid, \
- 'CreationClassName' , classname, \
- 'SystemCreationClassName' , sccn, \
+ 'DeviceID' , devid,
+ 'CreationClassName' , classname,
+ 'SystemCreationClassName' , sccn,
'SystemName' , test_dom
]
return name_val
@@ -197,8 +197,8 @@ def try_invalid_assoc(classname, name_va
k = j * 2
keys[name_val[k]] = name_val[k+1]
ac_classname = get_typed_class(virt, 'SettingsDefineState')
- ret_val = try_assoc(conn, classname, ac_classname, keys, field_name=field, \
- expr_values=expr_values[field], bug_no='')
+ ret_val = try_assoc(conn, classname, ac_classname, keys, field_name=field,
+ expr_values=expr_values[field], bug_no='')
if ret_val != PASS:
logger.error("------ FAILED: %s------" % field)
name_val[i] = temp
@@ -227,8 +227,8 @@ def main():
return FAIL
global conn
- conn = assoc.myWBEMConnection('http://%s' % options.ip, (CIM_USER, \
- CIM_PASS), CIM_NS)
+ conn = assoc.myWBEMConnection('http://%s' % options.ip, (CIM_USER,
+ CIM_PASS), CIM_NS)
if options.virt == 'LXC':
class_id = {get_typed_class(options.virt, 'Memory') :
'mem'}
else:
@@ -240,9 +240,9 @@ def main():
}
tc_scen = [
- 'INVALID_DevID_Keyname', 'INVALID_DevID_Keyval', \
- 'INVALID_CCName_Keyname', 'INVALID_CCName_Keyval', \
- 'INVALID_SCCName_Keyname', 'INVALID_SCCName_Keyval', \
+ 'INVALID_DevID_Keyname', 'INVALID_DevID_Keyval',
+ 'INVALID_CCName_Keyname', 'INVALID_CCName_Keyval',
+ 'INVALID_SCCName_Keyname', 'INVALID_SCCName_Keyval',
'INVALID_SysName_Keyname', 'INVALID_SysName_Keyval'
]