[PATCH] [TEST] Fix ComputerSystem/42_cs_gi_errs.py err desc for invalid name

# HG changeset patch # User Guolian Yun <yunguol@cn.ibm.com> # Date 1236243704 28800 # Node ID 73de8db2379fc26d7a0605464a1a77f961a75f4f # Parent c6f7256013b97dc57a31312897e45eb3cd8604a7 [TEST] Fix ComputerSystem/42_cs_gi_errs.py err desc for invalid name Updates tc to meet the provder updates Tested for KVM/LXC with current sources and rpm Signed-off-by: Guolian Yun<yunguol@cn.ibm.com> diff -r c6f7256013b9 -r 73de8db2379f suites/libvirt-cim/cimtest/ComputerSystem/42_cs_gi_errs.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/42_cs_gi_errs.py Tue Mar 03 08:47:40 2009 -0800 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/42_cs_gi_errs.py Thu Mar 05 01:01:44 2009 -0800 @@ -50,10 +50,11 @@ from CimTest.Globals import logger from XenKvmLib import vxml from XenKvmLib.classes import get_typed_class -from XenKvmLib.const import do_main +from XenKvmLib.const import do_main, get_provider_version from XenKvmLib.enumclass import GetInstance, CIM_CimtestClass, EnumInstances sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] +libvirt_err_changes = 821 expected_values = { "invalid_name" : {'rc' : CIM_ERR_NOT_FOUND, @@ -115,6 +116,11 @@ ref = CIMInstanceName(cn, keybindings=keys) + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) + if tc == 'invalid_name' and curr_cim_rev >= libvirt_err_changes: + expr_values['desc'] = "Referenced domain `invalid_name' \ +does not exist: Domain not found" + try: inst = CIM_CimtestClass(options.ip, ref)

+1 -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik@linux.vnet.ibm.com

@@ -115,6 +116,11 @@
ref = CIMInstanceName(cn, keybindings=keys)
+ curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) + if tc == 'invalid_name' and curr_cim_rev >= libvirt_err_changes: + expr_values['desc'] = "Referenced domain `invalid_name' \ +does not exist: Domain not found" +
Can you use something like the following instead: expr_values['desc'] = "Referenced domain `invalid_name'" + \ " does not exist: Domain not found" This is much cleaner since it doesn't span 80 characters. -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com
participants (3)
-
Deepti B Kalakeri
-
Kaitlin Rupert
-
yunguol@cn.ibm.com