CIM
Threads by month
- ----- 2026 -----
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
February 2009
- 4 participants
- 77 discussions
[PATCH] Enable KVM migration migration support in the migration_tester.py tool
by Kaitlin Rupert 06 Feb '09
by Kaitlin Rupert 06 Feb '09
06 Feb '09
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1233765304 28800
# Node ID 1f683477de1b1ba4bab65011aaee78b23d0778a5
# Parent 61209742da1d511a4b453d38432c2eeb35639a83
Enable KVM migration migration support in the migration_tester.py tool.
Also advertise the "other" migration type in the option parser.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 61209742da1d -r 1f683477de1b tools/migration_tester.py
--- a/tools/migration_tester.py Tue Jan 20 22:27:01 2009 -0800
+++ b/tools/migration_tester.py Wed Feb 04 08:35:04 2009 -0800
@@ -249,7 +249,7 @@
parser.add_option("-v", "--virt-type", dest="virt", default=None,
help="Virtualization type [ Xen | KVM ]")
parser.add_option("--migration-type", dest="type", default=None,
- help="Migration type: [ live | resume | restart ]")
+ help="Migration type:[ live | resume | restart | other ]")
parser.add_option("--disable-check", dest="disable_ck", action="store_true",
help="Disable migration pre-check")
@@ -282,10 +282,6 @@
print "Must specify virtualization type"
return 1
- if options.virt != "Xen":
- print "Only Xen migration is currently supported"
- return 1
-
if options.type != None:
msd = get_msd(options.type, options.virt)
if msd == None:
2
1
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1233687128 28800
# Node ID b8851323371c301a6357039b892bb8c1527a6b7d
# Parent 66e981e897ec37e8452c14a253c13db18c7a1952
Add KVM_MigrationJob class. Also fix migration uri.
The trailing slash (/) causes an error with the qemu connection type.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 66e981e897ec -r b8851323371c schema/VSMigrationService.mof
--- a/schema/VSMigrationService.mof Tue Feb 03 10:52:06 2009 -0800
+++ b/schema/VSMigrationService.mof Tue Feb 03 10:52:08 2009 -0800
@@ -68,6 +68,9 @@
class Xen_MigrationJob : CIM_ConcreteJob {
};
+class KVM_MigrationJob : CIM_ConcreteJob {
+};
+
[Provider("cmpi::Virt_VSMigrationService")]
class Xen_VirtualSystemMigrationService : CIM_VirtualSystemMigrationService {
};
diff -r 66e981e897ec -r b8851323371c src/Virt_VSMigrationService.c
--- a/src/Virt_VSMigrationService.c Tue Feb 03 10:52:06 2009 -0800
+++ b/src/Virt_VSMigrationService.c Tue Feb 03 10:52:08 2009 -0800
@@ -185,7 +185,15 @@
goto out;
}
- rc = asprintf(&uri, "%s+%s://%s/system/%s", prefix, tport, dest, param);
+ rc = asprintf(&uri, "%s+%s://%s/system", prefix, tport, dest);
+ if (rc == -1) {
+ uri = NULL;
+ goto out;
+ }
+
+ if (!STREQC(param, ""))
+ rc = asprintf(&uri, "%s/%s", uri, param);
+
if (rc == -1)
uri = NULL;
2
1
[PATCH] [TEST] #2 Update test cases to follow the new coding style
by yunguolï¼ cn.ibm.com 06 Feb '09
by yunguolï¼ cn.ibm.com 06 Feb '09
06 Feb '09
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1233914079 28800
# Node ID 263e285881acde9b99849cd133399298219c9d65
# Parent 3fc2b8a203339c6a59b5f0e2a159e3e0a802ea6d
[TEST] #2 Update test cases to follow the new coding style
Updates from 1 to 2:
1) fix the logger() call on line 62 in ElementCapabilities/05_hostsystem_cap.py
2) fix fix the logger() call on line 73 in HostSystem/04_hs_to_EAPF.py
1) Use commas instead of percent signs when passing parameters to logger.error() and logger.info()
2) Use percents When passing parameters to Exception()
Tested for KVM/LXC with current sources
Signed-off-by: Guolian Yun<yunguol(a)cn.ibm.com>
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/AllocationCapabilities/01_enum.py
--- a/suites/libvirt-cim/cimtest/AllocationCapabilities/01_enum.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/AllocationCapabilities/01_enum.py Fri Feb 06 01:54:39 2009 -0800
@@ -76,13 +76,13 @@
for inst in ac:
id = inst.InstanceID
if pools[id].ResourceType != inst.ResourceType:
- logger.error("%s ResourceType %s, Pool ResourceType %s" % (cn,
- inst.ResourceType, pools[id].ResourceType))
+ logger.error("%s ResourceType %s, Pool ResourceType %s",
+ cn, inst.ResourceType, pools[id].ResourceType)
return FAIL
except Exception, details:
- logger.error("%s returned instance with unexpected InstanceID %s" % (cn,
- details))
+ logger.error("%s returned instance with unexpected InstanceID %s",
+ cn, details)
return FAIL
return PASS
@@ -106,7 +106,7 @@
return status
if len(ac) != len(pools):
- logger.error("%d %s insts != %d pool insts" % (len(ac), cn, len(pools)))
+ logger.error("%d %s insts != %d pool insts", len(ac), cn, len(pools))
return FAIL
status = compare_pool_to_ac(ac, pools, cn)
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py
--- a/suites/libvirt-cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py Fri Feb 06 01:54:39 2009 -0800
@@ -62,7 +62,7 @@
for ac in enum_list:
pool, id, status = parse_instance_id(ac.InstanceID)
if status != PASS:
- logger.error("Unable to parse InstanceID: %s" % ac.InstanceID)
+ logger.error("Unable to parse InstanceID: %s", ac.InstanceID)
return ac_ids, FAIL
ac_ids.append("%s/invalid_id" % pool)
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Fri Feb 06 01:54:39 2009 -0800
@@ -49,12 +49,12 @@
del live_cs[idx]
except ValueError, detail:
Globals.logger.error("Provider reports system `%s', \
-but virsh does not" % name)
+but virsh does not", name)
status = FAIL
for system in live_cs:
Globals.logger.error("Provider does not report system `%s', \
-but virsh does" % system)
+but virsh does", system)
status = FAIL
except IndexError, detail:
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py Fri Feb 06 01:54:39 2009 -0800
@@ -60,7 +60,7 @@
return FAIL
if len(cs) != 0:
- logger.error("%s returned %d instead of empty list" % (cn, len(cs)))
+ logger.error("%s returned %d instead of empty list", cn, len(cs))
status = FAIL
else:
status = PASS
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/ComputerSystem/03_defineVS.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/03_defineVS.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/03_defineVS.py Fri Feb 06 01:54:39 2009 -0800
@@ -46,7 +46,7 @@
cxml = vxml.get_class(options.virt)(test_dom)
rc = cxml.cim_define(options.ip)
if not rc:
- Globals.logger.error(VIRSH_ERROR_DEFINE % test_dom)
+ Globals.logger.error(VIRSH_ERROR_DEFINE, test_dom)
return status
cs_class = get_typed_class(options.virt, 'ComputerSystem')
@@ -74,7 +74,7 @@
Globals.logger.error("Exception: %s", detail)
if status != PASS :
- Globals.logger.error("Error: property values are not set for VS %s" % test_dom)
+ Globals.logger.error("Error: property values are not set for VS %s", test_dom)
cxml.undefine(options.ip)
return status
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/ComputerSystem/04_defineStartVS.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/04_defineStartVS.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/04_defineStartVS.py Fri Feb 06 01:54:39 2009 -0800
@@ -47,12 +47,12 @@
try:
ret = cxml.cim_define(options.ip)
if not ret:
- logger.error("Unable to define %s" % test_dom)
+ logger.error("Unable to define %s", test_dom)
return FAIL
status = cxml.cim_start(options.ip)
if status != PASS:
- logger.error("Failed to Start the dom: %s" % test_dom)
+ logger.error("Failed to Start the dom: %s", test_dom)
logger.error("Property values not set properly for %s", test_dom)
except Exception, detail:
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py Fri Feb 06 01:54:39 2009 -0800
@@ -70,7 +70,7 @@
raise Exception("%s not in expected state" % test_dom)
except Exception, detail:
- logger.error("Exception: %s" % detail)
+ logger.error("Exception: %s", detail)
status = FAIL
cxml.cim_destroy(options.ip)
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/ComputerSystem/06_paused_active_suspend.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/06_paused_active_suspend.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/06_paused_active_suspend.py Fri Feb 06 01:54:39 2009 -0800
@@ -77,7 +77,7 @@
raise Exception("%s not in expected state" % test_dom)
except Exception, detail:
- logger.error("Exception variable: %s" % detail)
+ logger.error("Exception variable: %s", detail)
status = FAIL
cxml.destroy(server)
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/ComputerSystem/22_define_suspend.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/22_define_suspend.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/22_define_suspend.py Fri Feb 06 01:54:39 2009 -0800
@@ -53,14 +53,14 @@
# suspend the vs
status = cxml.cim_suspend(options.ip)
if status != PASS:
- logger.info("Suspending defined %s failed, as expected" % test_dom)
+ logger.info("Suspending defined %s failed, as expected", test_dom)
status = PASS
else:
raise Exception("Suspending defined %s should have failed" % \
test_dom)
except Exception, detail:
- logger.error("Error: %s" % detail)
+ logger.error("Error: %s", detail)
status = FAIL
cxml.undefine(options.ip)
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/ComputerSystem/41_cs_to_settingdefinestate.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/41_cs_to_settingdefinestate.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/41_cs_to_settingdefinestate.py Fri Feb 06 01:54:39 2009 -0800
@@ -121,7 +121,7 @@
for rasd in rasd_list:
guest, dev, status = parse_instance_id(rasd.InstanceID)
if status != PASS:
- logger.error("Unable to parse InstanceID: %s" % rasd.InstanceID)
+ logger.error("Unable to parse InstanceID: %s", rasd.InstanceID)
return rasd_insts, FAIL
if guest == test_dom:
@@ -272,7 +272,7 @@
status, cs_assoc_info = get_associators_info(server, cn, an,
cs_class, instid)
if status != PASS:
- raise Exception("Failed to get assoc info for dom: %s", test_dom)
+ raise Exception("Failed to get assoc info for dom: %s" % test_dom)
# verify the results of SettingsDefineState with the cs_values list
# that was built using the output of the GetInstance on ComputerSystem.
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/ComputerSystemIndication/01_created_indication.py
--- a/suites/libvirt-cim/cimtest/ComputerSystemIndication/01_created_indication.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystemIndication/01_created_indication.py Fri Feb 06 01:54:39 2009 -0800
@@ -58,7 +58,7 @@
dict['default_sysname'],
port)
sub.subscribe(dict['default_url'], dict['default_auth'])
- logger.info("Watching for %s" % iname)
+ logger.info("Watching for %s", iname)
ind_names[ind] = ind_name
sub_list[ind] = sub
@@ -98,12 +98,12 @@
if str(sub.server.indications[0]) == ind_name:
sub.unsubscribe(dict['default_auth'])
- logger.info("Cancelling subscription for %s" % ind_name)
+ logger.info("Cancelling subscription for %s", ind_name)
return PASS
else:
sub.server.indications.remove(sub.server.indications[0])
- logger.error("Did not recieve indication %s" % ind_name)
+ logger.error("Did not recieve indication %s", ind_name)
return FAIL
def poll_for_ind(pid, ind_name):
@@ -129,7 +129,7 @@
logger.error("Waited too long for %s indication", ind_name)
kill(pid, SIGKILL)
else:
- logger.error("Received indication error: %d" % pw[1])
+ logger.error("Received indication error: %d", pw[1])
status = FAIL
break
@@ -174,13 +174,13 @@
raise Exception(details)
except Exception, details:
- logger.error("Exception: %s" % details)
+ logger.error("Exception: %s", details)
status = FAIL
#Make sure all subscriptions are really unsubscribed
for ind, sub in sub_list.iteritems():
sub.unsubscribe(dict['default_auth'])
- logger.info("Cancelling subscription for %s" % ind_names[ind])
+ logger.info("Cancelling subscription for %s", ind_names[ind])
cxml.undefine(ip)
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/ElementAllocatedFromPool/01_forward.py
--- a/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/01_forward.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/01_forward.py Fri Feb 06 01:54:39 2009 -0800
@@ -67,11 +67,11 @@
inst = GetInstance(server, cn_name, key_list)
except Exception, details:
- logger.error("Exception %s" % details)
+ logger.error("Exception %s", details)
return None
if inst is None:
- logger.error("Expected at least one %s instance" % cn_name)
+ logger.error("Expected at least one %s instance", cn_name)
return None
return inst
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py
--- a/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Fri Feb 06 01:54:39 2009 -0800
@@ -130,7 +130,7 @@
elec = assoc.AssociatorNames(server, an, ccn, Name = system,
CreationClassName = ccn)
except Exception:
- logger.error(CIM_ERROR_ASSOCIATORNAMES % system)
+ logger.error(CIM_ERROR_ASSOCIATORNAMES, system)
cxml.undefine(server)
return FAIL
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py
--- a/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Fri Feb 06 01:54:39 2009 -0800
@@ -57,7 +57,7 @@
def filter(list, cn, exp_result):
new_list = assoc.filter_by_result_class(list, cn)
if len(new_list) != exp_result:
- logger.error("Expected %d host, got %d" % (exp_result, len(new_list)))
+ logger.error("Expected %d host, got %d", exp_result, len(new_list))
return FAIL, new_list
return PASS, new_list
@@ -154,7 +154,7 @@
cxml = virtxml(test_dom)
ret = cxml.cim_define(options.ip)
if not ret:
- logger.error("Failed to define the dom: %s" % test_dom)
+ logger.error("Failed to define the dom: %s", test_dom)
return FAIL
cs = domain_list(options.ip, options.virt)
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py
--- a/suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py Fri Feb 06 01:54:39 2009 -0800
@@ -51,14 +51,14 @@
logger.info("Got expected rc code and error string")
status = PASS
else:
- logger.error("Unexpected rc code %s and description %s\n" %(rc, desc))
+ logger.error("Unexpected rc code %s and description %s\n", rc, desc)
except Exception, details:
logger.error("Unknown exception happened")
logger.error(details)
if rc == 0:
logger.error("ElementCapabilities associator should NOT return excepted \
- result with a wrong key name and value of %s input" % ref_class)
+ result with a wrong key name and value of %s input", ref_class)
status = FAIL
return status
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/ElementCapabilities/04_reverse_errs.py
--- a/suites/libvirt-cim/cimtest/ElementCapabilities/04_reverse_errs.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ElementCapabilities/04_reverse_errs.py Fri Feb 06 01:54:39 2009 -0800
@@ -50,14 +50,14 @@
logger.info("Got expected rc code and error string")
status = PASS
else:
- logger.error("Unexpected rc code %s and description %s\n" %(rc, desc))
+ logger.error("Unexpected rc code %s and description %s\n", rc, desc)
except Exception, details:
logger.error("Unknown exception happened")
logger.error(details)
if rc == 0:
logger.error("ElementCapabilities associator should NOT return excepted result \
- with a wrong key name and value of %s input" % ref_class)
+ with a wrong key name and value of %s input", ref_class)
status = FAIL
return status
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/ElementCapabilities/05_hostsystem_cap.py
--- a/suites/libvirt-cim/cimtest/ElementCapabilities/05_hostsystem_cap.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ElementCapabilities/05_hostsystem_cap.py Fri Feb 06 01:54:39 2009 -0800
@@ -59,7 +59,7 @@
sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']
def print_err(err, detail, cn):
- logger.error(err % cn)
+ logger.error(err, cn)
logger.error("Exception: %s", detail)
def field_err(fieldname, exp_val, ret_value):
@@ -76,7 +76,7 @@
break
if ret != PASS:
- logger.error("%s with %s was not returned" % (cn, exp_val))
+ logger.error("%s with %s was not returned", cn, exp_val)
status = FAIL
return status, inst
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/ElementConforms/01_forward.py
--- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Fri Feb 06 01:54:39 2009 -0800
@@ -151,13 +151,13 @@
cxml = virt_xml(test_dom)
ret = cxml.cim_define(server)
if not ret:
- logger.error('Unable to define domain %s' % test_dom)
+ logger.error('Unable to define domain %s', test_dom)
return FAIL
ret = cxml.start(server)
if not ret:
cxml.undefine(server)
- logger.error('Unable to start domain %s' % test_dom)
+ logger.error('Unable to start domain %s', test_dom)
return FAIL
prev_namespace = Globals.CIM_NS
@@ -201,7 +201,7 @@
raise Exception("%s items weren't returned: %s" % (key, list))
except Exception, detail:
- logger.error("Exception: %s" % detail)
+ logger.error("Exception: %s", detail)
status = FAIL
Globals.CIM_NS = prev_namespace
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py
--- a/suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py Fri Feb 06 01:54:39 2009 -0800
@@ -93,7 +93,7 @@
ret = cxml.cim_define(server)
if not ret:
- logger.error("ERROR: Failed to Define the dom: %s" % test_dom)
+ logger.error("ERROR: Failed to Define the dom: %s", test_dom)
return status
inst_list = {}
@@ -102,7 +102,7 @@
if rc != 0:
cs = libvirt_cached_data_poll(server, virt, test_dom)
if sys is None:
- logger.error("Instance for %s not created" % test_dom)
+ logger.error("Instance for %s not created", test_dom)
cxml.undefine(server)
return FAIL
@@ -116,7 +116,7 @@
return status
except Exception, details:
- logger.error("DEBUG Exception: %s" % details)
+ logger.error("DEBUG Exception: %s", details)
cxml.undefine(server)
return FAIL
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/ElementConforms/03_ectp_fwd_errs.py
--- a/suites/libvirt-cim/cimtest/ElementConforms/03_ectp_fwd_errs.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ElementConforms/03_ectp_fwd_errs.py Fri Feb 06 01:54:39 2009 -0800
@@ -84,7 +84,7 @@
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)
+ logger.error("------ FAILED: %s------", field)
name_val[i] = temp
return ret_val
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py
--- a/suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py Fri Feb 06 01:54:39 2009 -0800
@@ -125,7 +125,7 @@
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)
+ logger.error("------ FAILED: %s------", field)
name_val[i] = temp
return ret_val
@@ -142,7 +142,7 @@
cxml = virt_xml(test_dom)
ret = cxml.cim_define(options.ip)
if not ret:
- logger.error('Unable to define domain %s' % test_dom)
+ logger.error('Unable to define domain %s', test_dom)
return FAIL
hs = get_typed_class(options.virt, "HostSystem")
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py
--- a/suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py Fri Feb 06 01:54:39 2009 -0800
@@ -72,11 +72,11 @@
inst = GetInstance(ip, cn, key_list)
except Exception, details:
- logger.error("Exception %s" % details)
+ logger.error("Exception %s", details)
return None
if inst is None:
- logger.error("Expected at least one %s instance" % cn)
+ logger.error("Expected at least one %s instance", cn)
return None
return inst
@@ -167,7 +167,7 @@
for cn, inst in inst_list.iteritems():
status = test_assoc(options.ip, esd_cn, cn, options.virt, inst)
if status != PASS:
- logger.error("Unable to get %s insts from %s" % (cn, esd_cn))
+ logger.error("Unable to get %s insts from %s", cn, esd_cn)
break
cxml.undefine(options.ip)
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/ElementSettingData/03_esd_assoc_with_rasd_errs.py
--- a/suites/libvirt-cim/cimtest/ElementSettingData/03_esd_assoc_with_rasd_errs.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ElementSettingData/03_esd_assoc_with_rasd_errs.py Fri Feb 06 01:54:39 2009 -0800
@@ -88,7 +88,7 @@
cxml = virtxml(test_dom, mac = test_mac)
ret = cxml.create(options.ip)
if not ret:
- logger.error("Failed to Create the dom: %s" % test_dom)
+ logger.error("Failed to Create the dom: %s", test_dom)
status = FAIL
return status
if options.virt == "XenFV":
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/HostSystem/01_enum.py
--- a/suites/libvirt-cim/cimtest/HostSystem/01_enum.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/HostSystem/01_enum.py Fri Feb 06 01:54:39 2009 -0800
@@ -50,7 +50,7 @@
try:
hs = enumclass.EnumInstances(options.ip, name)
except Exception, details:
- logger.error("%s %s: %s" % (CIM_ERROR_ENUMERATE, name, details))
+ logger.error("%s %s: %s", CIM_ERROR_ENUMERATE, name, details)
status = FAIL
if ret == PASS:
@@ -60,25 +60,25 @@
else:
if linux_cs.CreationClassName != 'Linux_ComputerSystem'\
or linux_cs.Name != host:
- logger.error("Exp Linux_ComputerSystem, got %s" \
- % linux_cs.CreationClassName)
- logger.error("Exp %s, got %s" % (host, system.Name))
+ logger.error("Exp Linux_ComputerSystem, got %s",
+ linux_cs.CreationClassName)
+ logger.error("Exp %s, got %s", host, system.Name)
return FAIL
else:
return PASS
else:
if len(hs) != 1:
- logger.error("Expected 1 %s instance returned" % name)
+ logger.error("Expected 1 %s instance returned", name)
return FAIL
system = hs[0]
if system.CreationClassName != name or system.Name != host:
- logger.error("Exp %s, got %s" % (name, system.CreationClassName))
- logger.error("Exp %s, got %s" % (host, system.Name))
+ logger.error("Exp %s, got %s", name, system.CreationClassName)
+ logger.error("Exp %s, got %s", host, system.Name)
status = FAIL
else:
- logger.info("%s is %s" % (name, host))
+ logger.info("%s is %s", name, host)
status = PASS
return status
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py
--- a/suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py Fri Feb 06 01:54:39 2009 -0800
@@ -96,7 +96,7 @@
return status, vsxml_info
def print_err(err, detail, cn):
- logger.error(err % cn)
+ logger.error(err, cn)
logger.error("Exception: %s", detail)
def get_inst_from_list(server, cn, cs_list, filter_name, exp_val, vsxml):
@@ -109,7 +109,7 @@
break
if ret != PASS:
- logger.error("%s with %s was not returned" % (cn, exp_val))
+ logger.error("%s with %s was not returned", cn, exp_val)
vsxml.undefine(server)
status = FAIL
@@ -165,7 +165,7 @@
SystemCreationClassName = sccn)
if len(assoc_info) != 1:
- logger.error("%s returned %i %s objects" % (an, len(assoc_info), cn))
+ logger.error("%s returned %i %s objects", an, len(assoc_info), cn)
status = FAIL
break
index = (len(assoc_info) - 1)
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py
--- a/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Fri Feb 06 01:54:39 2009 -0800
@@ -73,7 +73,7 @@
return status, vsxml
def print_err(err, detail, cn):
- logger.error(err % cn)
+ logger.error(err, cn)
logger.error("Exception: %s", detail)
def get_inst_from_list(cn, qcn, list, filter, exp_val):
@@ -82,7 +82,7 @@
inst = None
if len(list) < 1:
- logger.error("%s returned %i %s objects" % (qcn, len(list), cn))
+ logger.error("%s returned %i %s objects", qcn, len(list), cn)
return FAIL, None
for inst in list:
@@ -92,7 +92,7 @@
if ret != PASS:
status = FAIL
- logger.error("%s with %s was not returned" % (cn, exp_val))
+ logger.error("%s with %s was not returned", cn, exp_val)
return status, inst
@@ -107,7 +107,7 @@
logger.error("Hostname mismatch")
except Exception, detail:
- logger.error("Exception in %s : %s" % (cn, detail))
+ logger.error("Exception in %s : %s", cn, detail)
status = FAIL
return status, host_inst.Name, host_inst.CreationClassName
@@ -236,7 +236,7 @@
if status != PASS:
return status
else:
- logger.error("Unexpected instance type %s" % cn)
+ logger.error("Unexpected instance type %s", cn)
return FAIL
except Exception, detail:
@@ -248,10 +248,10 @@
def check_rasd_vals(inst, rt):
try:
if inst['ResourceType'] != rt:
- logger.error("In ResourceType for %s " % rt)
+ logger.error("In ResourceType for %s ", rt)
return FAIL
except Exception, detail:
- logger.error("Error checking RASD attribute values %s" % detail)
+ logger.error("Error checking RASD attribute values %s", detail)
return FAIL
return PASS
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py
--- a/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py Fri Feb 06 01:54:39 2009 -0800
@@ -70,7 +70,7 @@
libvirt_input_graphics_changeset = 757
def print_err(err, detail, cn):
- logger.error(err % cn)
+ logger.error(err, cn)
logger.error("Exception: %s", detail)
def pool_init_list(virt, pool_assoc, net_name, dp_InstID):
@@ -194,8 +194,8 @@
def check_len(an, assoc_list_info, qcn, exp_len):
if len(assoc_list_info) < exp_len:
- logger.error("%s returned %i %s objects" % (an,
- len(assoc_list_info), qcn))
+ logger.error("%s returned %i %s objects",
+ an, len(assoc_list_info), qcn)
return FAIL
return PASS
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/HostSystem/06_hs_to_vsms.py
--- a/suites/libvirt-cim/cimtest/HostSystem/06_hs_to_vsms.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/HostSystem/06_hs_to_vsms.py Fri Feb 06 01:54:39 2009 -0800
@@ -56,7 +56,7 @@
sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
def print_err(err, detail, cn):
- logger.error(err % cn)
+ logger.error(err, cn)
logger.error("Exception: %s", detail)
def print_field_error(fieldname, ret_value, exp_value):
@@ -76,7 +76,7 @@
# When no records are found.
if ret != PASS:
- logger.error("%s with %s was not returned" % (cn, exp_val))
+ logger.error("%s with %s was not returned", cn, exp_val)
status = FAIL
return status, inst
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/HostedDependency/02_reverse.py
--- a/suites/libvirt-cim/cimtest/HostedDependency/02_reverse.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/HostedDependency/02_reverse.py Fri Feb 06 01:54:39 2009 -0800
@@ -72,12 +72,12 @@
ret = cxml.cim_define(server)
if not ret:
- logger.error("Failed to define the dom: %s" % test_dom)
+ logger.error("Failed to define the dom: %s", test_dom)
return FAIL
rc = call_request_state_change(test_dom, server, 2, TIME, virt)
if rc != 0:
- logger.error("Failed to start the dom: %s" % test_dom)
+ logger.error("Failed to start the dom: %s", test_dom)
cxml.undefine(server)
return FAIL
@@ -126,7 +126,7 @@
if guest["Name"] in cs_names:
cs_names.remove(guest["Name"])
else:
- logger.error("HostedDependency returned unexpected guest %s" %
+ logger.error("HostedDependency returned unexpected guest %s",
guest["Name"])
status = FAIL
@@ -140,7 +140,7 @@
# not being returned by HostedDependency
for guest in cs_names:
- logger.error("HostedDependency did not return expected guest %s" %
+ logger.error("HostedDependency did not return expected guest %s",
guest["Name"])
status = FAIL
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/HostedDependency/03_enabledstate.py
--- a/suites/libvirt-cim/cimtest/HostedDependency/03_enabledstate.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/HostedDependency/03_enabledstate.py Fri Feb 06 01:54:39 2009 -0800
@@ -80,7 +80,7 @@
except Exception, detail:
logger.error(CIM_ERROR_GETINSTANCE, 'ComputerSystem')
- logger.error("Exception: %s" % detail)
+ logger.error("Exception: %s", detail)
status = FAIL
return status, dom_field_list
@@ -113,18 +113,18 @@
ret = cxml.cim_define(server)
if not ret:
- logger.error("Failed to define the dom: %s" % test_dom)
+ logger.error("Failed to define the dom: %s", test_dom)
return FAIL
rc = call_request_state_change(test_dom, server, 2, TIME, virt)
if rc != 0:
- logger.error("Failed to start the dom: %s" % test_dom)
+ logger.error("Failed to start the dom: %s", test_dom)
cxml.undefine(server)
return FAIL
rc = call_request_state_change(test_dom, server, 9, TIME, virt)
if rc != 0:
- logger.error("Failed to suspend the dom: %s" % test_dom)
+ logger.error("Failed to suspend the dom: %s", test_dom)
cxml.destroy(server)
cxml.undefine(server)
@@ -181,7 +181,7 @@
except Exception, detail:
logger.error(CIM_ERROR_ASSOCIATORS,'HostedDependency')
- logger.error("Exception: %s" % detail)
+ logger.error("Exception: %s", detail)
status = FAIL
cxml.destroy(server)
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/HostedDependency/04_reverse_errs.py
--- a/suites/libvirt-cim/cimtest/HostedDependency/04_reverse_errs.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/HostedDependency/04_reverse_errs.py Fri Feb 06 01:54:39 2009 -0800
@@ -91,7 +91,7 @@
ret = cxml.create(server)
if not ret:
- logger.error("Failed to Create the dom: %s" % test_dom)
+ logger.error("Failed to Create the dom: %s", test_dom)
return FAIL
conn = assoc.myWBEMConnection('http://%s' % server,
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py
--- a/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Fri Feb 06 01:54:39 2009 -0800
@@ -58,7 +58,7 @@
Name = host_sys,
CreationClassName = host_cn)
except Exception, details:
- logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES % assoc_cn)
+ logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES, assoc_cn)
logger.error("Exception:", details)
return FAIL
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py
--- a/suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py Fri Feb 06 01:54:39 2009 -0800
@@ -64,7 +64,7 @@
try:
assoc_host = AssociatorNames(options.ip, assoc_cn, k, InstanceID=v)
except Exception:
- logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES % assoc_cn)
+ logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES, assoc_cn)
return FAIL
if len(assoc_host) == 1:
if assoc_host[0].keybindings['Name'] != host_sys:
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/HostedService/01_forward.py
--- a/suites/libvirt-cim/cimtest/HostedService/01_forward.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/HostedService/01_forward.py Fri Feb 06 01:54:39 2009 -0800
@@ -58,7 +58,7 @@
Name = host_name)
except Exception, deatils:
- logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES % host_name)
+ logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES, host_name)
logger.error("Exception: details %s", details)
return FAIL
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/LogicalDisk/01_disk.py
--- a/suites/libvirt-cim/cimtest/LogicalDisk/01_disk.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/LogicalDisk/01_disk.py Fri Feb 06 01:54:39 2009 -0800
@@ -58,11 +58,11 @@
status = 0
if dev.Name != test_dev:
- logger.error("Name should be `%s' instead of `%s'" % (test_dev, dev.Name))
+ logger.error("Name should be `%s' instead of `%s'", test_dev, dev.Name)
status = 1
if status == 0:
- logger.info("Checked device %s" % dev.Name)
+ logger.info("Checked device %s", dev.Name)
vsxml.undefine(options.ip)
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/LogicalDisk/02_nodevs.py
--- a/suites/libvirt-cim/cimtest/LogicalDisk/02_nodevs.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/LogicalDisk/02_nodevs.py Fri Feb 06 01:54:39 2009 -0800
@@ -69,7 +69,7 @@
return FAIL
if len(devs) != 0:
- logger.error("%s returned %d instead of empty list" % (cn, len(devs)))
+ logger.error("%s returned %d instead of empty list", cn, len(devs))
status = FAIL
else:
status = PASS
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/Memory/01_memory.py
--- a/suites/libvirt-cim/cimtest/Memory/01_memory.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/Memory/01_memory.py Fri Feb 06 01:54:39 2009 -0800
@@ -63,11 +63,11 @@
capacity = dev.ConsumableBlocks * dev.BlockSize / 1024
if capacity != alloc_mem:
- logger.error("Capacity should be %i MB instead of %i MB" % (alloc_mem, capacity))
+ logger.error("Capacity should be %i MB instead of %i MB", alloc_mem, capacity)
status = 1
if status == 0:
- logger.info("Checked memory capacity: %s MB" % capacity)
+ logger.info("Checked memory capacity: %s MB", capacity)
vsxml.undefine(options.ip)
return status
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/Memory/02_defgetmem.py
--- a/suites/libvirt-cim/cimtest/Memory/02_defgetmem.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/Memory/02_defgetmem.py Fri Feb 06 01:54:39 2009 -0800
@@ -76,7 +76,7 @@
raise Exception("Memory inst for %s not as expected." % default_dom)
except Exception, detail:
- logger.error("Exception: %s" % detail)
+ logger.error("Exception: %s", detail)
status = FAIL
cxml.undefine(options.ip)
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/NetworkPort/01_netport.py
--- a/suites/libvirt-cim/cimtest/NetworkPort/01_netport.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/NetworkPort/01_netport.py Fri Feb 06 01:54:39 2009 -0800
@@ -80,12 +80,12 @@
dev = GetInstance(options.ip, net_class, key_list)
except Exception, detail:
- logger.error("Exception: %s" % detail)
+ logger.error("Exception: %s", detail)
vsxml.undefine(options.ip)
return FAIL
if dev.DeviceID == None:
- logger.error("Error retrieving instance for devid %s" % devid)
+ logger.error("Error retrieving instance for devid %s", devid)
vsxml.undefine(options.ip)
return FAIL
@@ -94,23 +94,23 @@
link_tech = get_linktech(options.ip, options.virt)
if dev.LinkTechnology != link_tech:
- logger.error("LinkTechnology should be set to `%i' instead of `%s'" % \
- (link_tech, dev.LinkTechnology))
+ logger.error("LinkTechnology should be set to `%i' instead of `%s'",
+ link_tech, dev.LinkTechnology)
status = FAIL
addrs = dev.NetworkAddresses
if len(addrs) != 1:
- logger.error("Too many NetworkAddress entries (%i instead of %i)" % \
- (len(addrs), 1))
+ logger.error("Too many NetworkAddress entries (%i instead of %i)",
+ len(addrs), 1)
status = FAIL
if addrs[0] != test_mac:
- logger.error("MAC address reported incorrectly (%s instead of %s)" % \
- (addrs[0], test_mac))
+ logger.error("MAC address reported incorrectly (%s instead of %s)",
+ addrs[0], test_mac)
status = FAIL
if status == FAIL:
- logger.error("Checked interface %s" % test_mac)
+ logger.error("Checked interface %s", test_mac)
vsxml.undefine(options.ip)
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/NetworkPort/03_user_netport.py
--- a/suites/libvirt-cim/cimtest/NetworkPort/03_user_netport.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/NetworkPort/03_user_netport.py Fri Feb 06 01:54:39 2009 -0800
@@ -45,7 +45,7 @@
cxml = KVMXML(test_dom, mac = test_mac, ntype='user')
ret = cxml.cim_define(options.ip)
if not ret:
- logger.error('Unable to define domain %s' % test_dom)
+ logger.error('Unable to define domain %s', test_dom)
return FAIL
devid = "%s/%s" % (test_dom, test_mac)
@@ -59,7 +59,7 @@
try:
dev = GetInstance(options.ip, 'KVM_NetworkPort', key_list)
except Exception, detail:
- logger.error("Exception: %s" % detail)
+ logger.error("Exception: %s", detail)
cxml.undefine(options.ip)
return FAIL
@@ -73,17 +73,17 @@
addrs = dev.NetworkAddresses
if len(addrs) != 1:
- logger.error("Too many NetworkAddress entries (%i instead of %i)" % \
- (len(addrs), 1))
+ logger.error("Too many NetworkAddress entries (%i instead of %i)",
+ len(addrs), 1)
status = FAIL
if addrs[0] != test_mac:
- logger.error("MAC address reported incorrectly (%s instead of %s)" % \
- (addrs[0], test_mac))
+ logger.error("MAC address reported incorrectly (%s instead of %s)",
+ addrs[0], test_mac)
status = FAIL
if status == FAIL:
- logger.error("Checked interface %s" % test_mac)
+ logger.error("Checked interface %s", test_mac)
cxml.undefine(options.ip)
return status
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/Processor/01_processor.py
--- a/suites/libvirt-cim/cimtest/Processor/01_processor.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/Processor/01_processor.py Fri Feb 06 01:54:39 2009 -0800
@@ -64,11 +64,11 @@
try:
dev = GetInstance(options.ip, proc_class, key_list)
if dev.DeviceID == devid:
- logger.info("Checked device %s" % devid)
+ logger.info("Checked device %s", devid)
else:
- logger.error("Mismatching device, returned %s instead %s" % (dev.DeviceID, devid))
+ logger.error("Mismatching device, returned %s instead %s", dev.DeviceID, devid)
except Exception, details:
- logger.error("Error check device %s: %s" % (devid, details))
+ logger.error("Error check device %s: %s", devid, details)
status = 1
vsxml.stop(options.ip)
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/Processor/02_definesys_get_procs.py
--- a/suites/libvirt-cim/cimtest/Processor/02_definesys_get_procs.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/Processor/02_definesys_get_procs.py Fri Feb 06 01:54:39 2009 -0800
@@ -86,7 +86,7 @@
% default_dom)
except Exception, detail:
- logger.error("Exception: %s" % detail)
+ logger.error("Exception: %s", detail)
status = FAIL
cxml.undefine(options.ip)
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/Profile/01_enum.py
--- a/suites/libvirt-cim/cimtest/Profile/01_enum.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/Profile/01_enum.py Fri Feb 06 01:54:39 2009 -0800
@@ -66,16 +66,16 @@
x.RegisteredName, x.RegisteredVersion] for x in proflist]
for exp_prof in explist:
if exp_prof in checklist:
- logger.info("Profile %s found" % exp_prof[0])
+ logger.info("Profile %s found", exp_prof[0])
else:
- logger.error("Profile %s is not found" % exp_prof[0])
+ logger.error("Profile %s is not found", exp_prof[0])
status = FAIL
break
if status == PASS:
- logger.info("Properties check for %s passed" % cn)
+ logger.info("Properties check for %s passed", cn)
else:
- logger.error("Properties check for %s failed" % cn)
+ logger.error("Properties check for %s failed", cn)
return status
if __name__ == "__main__":
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/Profile/02_profile_to_elec.py
--- a/suites/libvirt-cim/cimtest/Profile/02_profile_to_elec.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/Profile/02_profile_to_elec.py Fri Feb 06 01:54:39 2009 -0800
@@ -63,18 +63,18 @@
rc = csxml_info.cim_define(server)
if not rc:
- logger.error("Unable define domain %s using DefineSystem() " % test_dom)
+ logger.error("Unable define domain %s using DefineSystem() ", test_dom)
status = FAIL
except Exception, detail:
- logger.error("Exception defining domain %s" % test_dom)
+ logger.error("Exception defining domain %s", test_dom)
logger.error("Exception: %s", detail)
status = FAIL
return status, csxml_info
def print_err(err, detail, cn):
- logger.error(err % cn)
+ logger.error(err, cn)
logger.error("Exception: %s", detail)
def get_expected_inst(cn, list, property, exp):
@@ -84,7 +84,7 @@
return PASS, x
except Exception:
pass
- logger.error("%s with %s was not returned" % (cn, exp))
+ logger.error("%s with %s was not returned", cn, exp)
return FAIL, None
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/RedirectionService/03_RedirectionSAP_errs.py
--- a/suites/libvirt-cim/cimtest/RedirectionService/03_RedirectionSAP_errs.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/RedirectionService/03_RedirectionSAP_errs.py Fri Feb 06 01:54:39 2009 -0800
@@ -140,7 +140,7 @@
if status != PASS:
- logger.error(" -------------- FAILED %s ----------- : " % test_val)
+ logger.error(" -------------- FAILED %s ----------- : ", test_val)
break
cxml.cim_destroy(options.ip)
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py
--- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py Fri Feb 06 01:54:39 2009 -0800
@@ -82,7 +82,7 @@
for rasd in rasd_list:
guest, dev, status = parse_instance_id(rasd.InstanceID)
if status != PASS:
- logger.error("Unable to parse InstanceID: %s" % rasd.InstanceID)
+ logger.error("Unable to parse InstanceID: %s", rasd.InstanceID)
return rasd_insts, FAIL
if guest == guest_name:
@@ -108,7 +108,7 @@
for inst in list:
guest, id, status = parse_instance_id(inst.InstanceID)
if status != PASS:
- logger.error("Unable to parse InstanceID: %s" % inst.InstanceID)
+ logger.error("Unable to parse InstanceID: %s", inst.InstanceID)
return None, FAIL
if id == exp_id:
@@ -169,8 +169,8 @@
if rasd['InstanceID'] == exp_rasd.InstanceID:
status = PASS
else:
- logger.info("Got %s instead of %s" % (rasd['InstanceID'],
- exp_rasd.InstanceID))
+ logger.info("Got %s instead of %s", rasd['InstanceID'],
+ exp_rasd.InstanceID)
status = FAIL
if status != PASS:
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py
--- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py Fri Feb 06 01:54:39 2009 -0800
@@ -81,7 +81,7 @@
for rasd in rasd_list:
guest, dev, status = parse_instance_id(rasd.InstanceID)
if status != PASS:
- logger.error("Unable to parse InstanceID: %s" % rasd.InstanceID)
+ logger.error("Unable to parse InstanceID: %s", rasd.InstanceID)
return rasd_insts, FAIL
if guest == guest_name:
@@ -107,7 +107,7 @@
for inst in list:
guest, id, status = parse_instance_id(inst.InstanceID)
if status != PASS:
- logger.error("Unable to parse InstanceID: %s" % inst.InstanceID)
+ logger.error("Unable to parse InstanceID: %s", inst.InstanceID)
return None, FAIL
if id == exp_id:
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/ResourceAllocationFromPool/03_forward_errs.py
--- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/03_forward_errs.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/03_forward_errs.py Fri Feb 06 01:54:39 2009 -0800
@@ -65,13 +65,15 @@
logger.info("Got excepted rc code and error string")
status = PASS
else:
- logger.error("Unexpected rc code %s and description %s\n" %(rc, desc))
+ logger.error("Unexpected rc code %s and description %s\n", rc, desc)
except Exception, details:
logger.error("Unknown exception happened")
logger.error(details)
if rc == 0:
- logger.error("ResourceAllocationFromPool associator should NOT return excepted result with a wrong InstanceID value of %s input" %k)
+ logger.error("ResourceAllocationFromPool associator should NOT \
+ return excepted result with a wrong InstanceID \
+ value of %s input", k)
status = FAIL
return status
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/ResourceAllocationFromPool/04_reverse_errs.py
--- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/04_reverse_errs.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/04_reverse_errs.py Fri Feb 06 01:54:39 2009 -0800
@@ -63,13 +63,16 @@
logger.info("Got excepted rc code and error string")
status = PASS
else:
- logger.error("Unexpected rc code %s and description %s\n" %(rc, desc))
+ logger.error("Unexpected rc code %s and description %s\n",
+ rc, desc)
except Exception, details:
logger.error("Unknown exception happened")
logger.error(details)
if rc == 0:
- logger.error("ResourceAllocationSettingData should NOT return excepted result with a wrong InstanceID value of %s input" %k)
+ logger.error("ResourceAllocationSettingData should NOT return \
+ excepted result with a wrong InstanceID \
+ value of %s input", k)
status = FAIL
return status
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/ResourceAllocationFromPool/05_RAPF_err.py
--- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/05_RAPF_err.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/05_RAPF_err.py Fri Feb 06 01:54:39 2009 -0800
@@ -101,7 +101,7 @@
ret = PASS
if ret != PASS:
- logger.error("%s with %s was not returned" % (classname, exp_val))
+ logger.error("%s with %s was not returned", classname, exp_val)
vsxml.undefine(server)
status = FAIL
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/ResourcePool/01_enum.py
--- a/suites/libvirt-cim/cimtest/ResourcePool/01_enum.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ResourcePool/01_enum.py Fri Feb 06 01:54:39 2009 -0800
@@ -79,8 +79,8 @@
def verify_fields(pool_list, poolname, cn):
status = PASS
if len(poolname) < 1:
- logger.error("%s return %i instances, expected atleast 1 instance" \
- % (cn, len(poolname)))
+ logger.error("%s return %i instances, expected atleast 1 instance",
+ cn, len(poolname))
return FAIL
exp_value = pool_list[cn][0]
for i in range(0, len(poolname)):
@@ -119,14 +119,14 @@
try:
mempool = EnumInstances(ip, mp)
except Exception:
- logger.error(Globals.CIM_ERROR_ENUMERATE % mp)
+ logger.error(Globals.CIM_ERROR_ENUMERATE, mp)
return FAIL
status = verify_fields(pool_list, mempool, mp)
try:
propool = EnumInstances(ip, pp)
except Exception:
- logger.error(Globals.CIM_ERROR_ENUMERATE % pp)
+ logger.error(Globals.CIM_ERROR_ENUMERATE, pp)
return FAIL
status = verify_fields(pool_list, propool, pp)
@@ -134,14 +134,14 @@
try:
diskpool = EnumInstances(ip, dp)
except Exception:
- logger.error(Globals.CIM_ERROR_ENUMERATE % dp)
+ logger.error(Globals.CIM_ERROR_ENUMERATE, dp)
return FAIL
status = verify_fields(pool_list, diskpool, dp)
try:
netpool = EnumInstances(ip, np)
except Exception:
- logger.error(Globals.CIM_ERROR_ENUMERATE % np)
+ logger.error(Globals.CIM_ERROR_ENUMERATE, np)
return FAIL
status = verify_fields(pool_list, netpool, np)
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/ResourcePoolConfigurationCapabilities/01_enum.py
--- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationCapabilities/01_enum.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationCapabilities/01_enum.py Fri Feb 06 01:54:39 2009 -0800
@@ -43,7 +43,7 @@
if len(rpcc) != 1:
Globals.logger.error("%s_ResourcePoolConfigurationCapabilities return %i instances, \
- excepted only 1 instance" % (options.virt, len(rpcc)))
+ excepted only 1 instance", options.virt, len(rpcc))
return FAIL
if rpcc[0].InstanceID != "RPCC":
Globals.logger.error("error result of enum ResourcePoolConfigurationCapabilities")
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/01_enum.py
--- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/01_enum.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/01_enum.py Fri Feb 06 01:54:39 2009 -0800
@@ -51,7 +51,7 @@
try:
rpcservice = rpcs.enumerate(server, classname)
except Exception:
- logger.error(Globals.CIM_ERROR_ENUMERATE % classname)
+ logger.error(Globals.CIM_ERROR_ENUMERATE, classname)
return FAIL
valid_service = {"Name" : "RPCS",
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py
--- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Fri Feb 06 01:54:39 2009 -0800
@@ -72,8 +72,8 @@
logger.info("Error string is '%s'", desc)
return PASS
else:
- logger.error("Unexpected rc code %s and description %s\n" \
- %(err_no, desc))
+ logger.error("Unexpected rc code %s and description %s\n",
+ err_no, desc)
return FAIL
logger.error("The execution should not have reached here!!")
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/05_AddResourcesToResourcePool.py
--- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/05_AddResourcesToResourcePool.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/05_AddResourcesToResourcePool.py Fri Feb 06 01:54:39 2009 -0800
@@ -72,8 +72,8 @@
logger.info("Error string is '%s'", desc)
return PASS
else:
- logger.error("Unexpected rc code %s and description %s\n" \
- %(err_no, desc))
+ logger.error("Unexpected rc code %s and description %s\n",
+ err_no, desc)
print desc
return XFAIL_RC(bug)
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/06_RemoveResourcesFromResourcePool.py
--- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/06_RemoveResourcesFromResourcePool.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/06_RemoveResourcesFromResourcePool.py Fri Feb 06 01:54:39 2009 -0800
@@ -70,8 +70,8 @@
logger.info("Error string is '%s'", desc)
return PASS
else:
- logger.error("Unexpected rc code %s and description %s\n" \
- %(err_no, desc))
+ logger.error("Unexpected rc code %s and description %s\n",
+ err_no, desc)
return FAIL
logger.error("The execution should not have reached here!!")
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py
--- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py Fri Feb 06 01:54:39 2009 -0800
@@ -66,8 +66,8 @@
logger.info("Error string is '%s'", desc)
return PASS
else:
- logger.error("Unexpected rc code %s and description %s\n" \
- %(err_no, desc))
+ logger.error("Unexpected rc code %s and description %s\n",
+ err_no, desc)
return FAIL
logger.error("The execution should not have reached here!!")
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/SettingsDefine/01_forward.py
--- a/suites/libvirt-cim/cimtest/SettingsDefine/01_forward.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/SettingsDefine/01_forward.py Fri Feb 06 01:54:39 2009 -0800
@@ -77,7 +77,7 @@
for dev in dev_list:
guest, dev_id, status = parse_instance_id(dev.DeviceID)
if status != PASS:
- logger.error("Unable to parse InstanceID: %s" % dev.DeviceID)
+ logger.error("Unable to parse InstanceID: %s", dev.DeviceID)
return dev_insts, FAIL
if guest == guest_name:
@@ -102,7 +102,7 @@
for rasd in rasd_list:
guest, dev, status = parse_instance_id(rasd.InstanceID)
if status != PASS:
- logger.error("Unable to parse InstanceID: %s" % rasd.InstanceID)
+ logger.error("Unable to parse InstanceID: %s", rasd.InstanceID)
return rasd_insts, FAIL
if guest == guest_name:
@@ -126,8 +126,8 @@
if rasd['InstanceID'] == exp_rasd.InstanceID:
status = PASS
else:
- logger.info("Got %s instead of %s" % (rasd['InstanceID'],
- exp_rasd.InstanceID))
+ logger.info("Got %s instead of %s", rasd['InstanceID'],
+ exp_rasd.InstanceID)
status = FAIL
if status != PASS:
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/SettingsDefine/02_reverse.py
--- a/suites/libvirt-cim/cimtest/SettingsDefine/02_reverse.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/SettingsDefine/02_reverse.py Fri Feb 06 01:54:39 2009 -0800
@@ -104,7 +104,7 @@
for rasd in rasd_list:
guest, dev, status = parse_instance_id(rasd.InstanceID)
if status != PASS:
- logger.error("Unable to parse InstanceID: %s" % rasd.InstanceID)
+ logger.error("Unable to parse InstanceID: %s", rasd.InstanceID)
return rasd_insts, FAIL
if guest == guest_name:
@@ -124,7 +124,7 @@
for dev in dev_list:
guest, dev_id, status = parse_instance_id(dev.DeviceID)
if status != PASS:
- logger.error("Unable to parse InstanceID: %s" % dev.DeviceID)
+ logger.error("Unable to parse InstanceID: %s", dev.DeviceID)
return dev_insts, FAIL
if guest == guest_name:
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/SettingsDefine/03_sds_fwd_errs.py
--- a/suites/libvirt-cim/cimtest/SettingsDefine/03_sds_fwd_errs.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/SettingsDefine/03_sds_fwd_errs.py Fri Feb 06 01:54:39 2009 -0800
@@ -200,7 +200,7 @@
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)
+ logger.error("------ FAILED: %s------", field)
name_val[i] = temp
return ret_val
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py
--- a/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Fri Feb 06 01:54:39 2009 -0800
@@ -82,7 +82,7 @@
try:
instance = enumclass.GetInstance(ip, pool_class, key_list)
except Exception, detail:
- logger.error(CIM_ERROR_GETINSTANCE, '%s' % pool_class)
+ logger.error(CIM_ERROR_GETINSTANCE, '%s', pool_class)
logger.error("Exception: %s", detail)
sys.exit(FAIL)
return instance
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/SystemDevice/01_forward.py
--- a/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py Fri Feb 06 01:54:39 2009 -0800
@@ -63,7 +63,7 @@
ret = cxml.create(server)
if not ret:
- logger.error('Unable to create domain %s' % test_dom)
+ logger.error('Unable to create domain %s', test_dom)
return FAIL
sd_classname = get_typed_class(virt, 'SystemDevice')
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py
--- a/suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py Fri Feb 06 01:54:39 2009 -0800
@@ -63,7 +63,7 @@
try:
devs = enumclass.EnumInstances(options.ip, cn)
except Exception, detail:
- logger.error("Exception: %s" % detail)
+ logger.error("Exception: %s", detail)
cxml.destroy(options.ip)
cxml.undefine(options.ip)
return FAIL
@@ -81,7 +81,7 @@
SystemName=dev.SystemName,
SystemCreationClassName=dev.SystemCreationClassName)
except Exception, detail:
- logger.error("Exception: %s" % detail)
+ logger.error("Exception: %s", detail)
cxml.destroy(options.ip)
cxml.undefine(options.ip)
return FAIL
@@ -92,7 +92,7 @@
cxml.undefine(options.ip)
return FAIL
elif len(systems) != 1:
- logger.error("%s systems returned, expected 1" % len(systems))
+ logger.error("%s systems returned, expected 1", len(systems))
cxml.destroy(options.ip)
cxml.undefine(options.ip)
return FAIL
@@ -106,9 +106,9 @@
if system.Name == test_dom:
status = PASS
- logger.info("Examined %s %s" % (system.Name, dev.DeviceID))
+ logger.info("Examined %s %s", system.Name, dev.DeviceID)
else:
- logger.error("Association returned wrong system: %s" %
+ logger.error("Association returned wrong system: %s",
system.Name)
cxml.destroy(options.ip)
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/SystemDevice/03_fwderrs.py
--- a/suites/libvirt-cim/cimtest/SystemDevice/03_fwderrs.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/SystemDevice/03_fwderrs.py Fri Feb 06 01:54:39 2009 -0800
@@ -101,7 +101,7 @@
names[item] = ("DeviceID" , dev.DeviceID )
except Exception, details:
- logger.info("Exception %s for class %s" % (details , item))
+ logger.info("Exception %s for class %s", details , item)
return FAIL
if len(name) <=0 or len(names) <= 0:
@@ -150,10 +150,10 @@
if ((rc != exp_rc1 and desc.find(exp_desc1) <= 0) and
(rc != exp_rc2 and desc.find(exp_desc2) <= 0)):
status = FAIL
- logger.info("Class = %s , key = %s , keyval = %s " \
- % (item, i , keyval))
- logger.info("Unexpected rc %s and desc %s for %s"
- % (rc, desc, item))
+ logger.info("Class = %s , key = %s , keyval = %s ",
+ item, i, keyval)
+ logger.info("Unexpected rc %s and desc %s for %s",
+ rc, desc, item)
except Exception, details:
logger.info("Unknown exception happened")
@@ -162,8 +162,8 @@
if rc == 0:
logger.info("Success returned for wrong key and ID")
- logger.info("Class = %s , key = %s , keyval = %s " %
- (item, i , keyval))
+ logger.info("Class = %s , key = %s , keyval = %s ",
+ item, i , keyval)
return XFAIL_RC(bug)
except Exception, details:
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/VSSD/01_enum.py
--- a/suites/libvirt-cim/cimtest/VSSD/01_enum.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VSSD/01_enum.py Fri Feb 06 01:54:39 2009 -0800
@@ -67,28 +67,28 @@
break
if found == 1:
if vssd.ElementName != test_dom:
- logger.error("Invalid ElementName- expecting %s, go %s" %
+ logger.error("Invalid ElementName- expecting %s, go %s",
test_dom, vssd.ElementName)
vsxml.undefine(options.ip)
return FAIL
- logger.info("Examining VSSD class for the Guest %s" % test_dom)
+ logger.info("Examining VSSD class for the Guest %s", test_dom)
try:
name = vssd.ElementName
idx = live_cs.index(name)
del live_cs[idx]
except BaseException, details:
- logger.error("Exception %s" % details)
- logger.error("Provider reports VSSD `%s', but xm does not" %
+ logger.error("Exception %s", details)
+ logger.error("Provider reports VSSD `%s', but xm does not",
vssd.ElementName)
status = FAIL
else:
- logger.error("Missing VSSD instance for the system %s " % test_dom)
+ logger.error("Missing VSSD instance for the system %s ", test_dom)
status = FAIL
except BaseException, details:
- logger.error("Exception %s" % details)
+ logger.error("Exception %s", details)
status = FAIL
vsxml.undefine(options.ip)
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/VSSD/02_bootldr.py
--- a/suites/libvirt-cim/cimtest/VSSD/02_bootldr.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VSSD/02_bootldr.py Fri Feb 06 01:54:39 2009 -0800
@@ -66,14 +66,14 @@
name = system.ElementName
if name == test_dom :
if system.Bootloader == bootldr :
- logger.info("BootLoader for domain %s is %s" % (name, bootldr ))
+ logger.info("BootLoader for domain %s is %s", name, bootldr)
status = 0
else:
- logger.error("Bootloader is not set for VS %s" % test_dom)
+ logger.error("Bootloader is not set for VS %s", test_dom)
status = 1
except Exception, detail :
- logger.error("Exception : %s" % detail)
+ logger.error("Exception : %s", detail)
status = 1
xmlfile.undefine(options.ip)
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py
--- a/suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py Fri Feb 06 01:54:39 2009 -0800
@@ -101,7 +101,7 @@
# When no records are found.
if ret != PASS:
- logger.error("%s with %s was not returned" % (classname, exp_val))
+ logger.error("%s with %s was not returned", classname, exp_val)
status = FAIL
# We expect only one record to be returned.
@@ -153,7 +153,7 @@
InstanceID = instIdval)
if len(vssdc_assoc_info) == 1 and \
vssdc_assoc_info[0].classname == 'LXC_MemResourceAllocationSettingData':
- logger.info("%s returned expect objects" % assoc_cname)
+ logger.info("%s returned expect objects", assoc_cname)
elif len(vssdc_assoc_info) < 4:
logger.error("%s returned %i %s objects, expected 4",
assoc_cname, len(vssdc_assoc_info), qcn)
@@ -161,7 +161,7 @@
except Exception, details:
logger.error(CIM_ERROR_ASSOCIATORS, assoc_cname)
- logger.error("Exception : %s" % details)
+ logger.error("Exception : %s", details)
status = FAIL
return status, vssdc_assoc_info
@@ -202,7 +202,7 @@
logger.error("Mistmatching %s values", CCName )
break
except Exception, detail :
- logger.error("Exception in verify_rasd_values function: %s" % detail)
+ logger.error("Exception in verify_rasd_values function: %s", detail)
status = FAIL
return status
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/VirtualSystemManagementService/01_definesystem_name.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/01_definesystem_name.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/01_definesystem_name.py Fri Feb 06 01:54:39 2009 -0800
@@ -39,12 +39,12 @@
ret = cxml.cim_define(options.ip)
if not ret:
- logger.error("Unable to define %s" % default_dom)
+ logger.error("Unable to define %s", default_dom)
return FAIL
status = cxml.cim_start(options.ip)
if status != PASS:
- logger.error("Failed to start the defined domain: %s" % default_dom)
+ logger.error("Failed to start the defined domain: %s", default_dom)
cxml.cim_destroy(options.ip)
cxml.undefine(options.ip)
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/VirtualSystemManagementService/02_destroysystem.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/02_destroysystem.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/02_destroysystem.py Fri Feb 06 01:54:39 2009 -0800
@@ -76,7 +76,7 @@
list_after = domain_list(options.ip, options.virt)
if default_dom in list_after:
- logger.error("Domain %s not destroyed: provider didn't return error" % \
+ logger.error("Domain %s not destroyed: provider didn't return error",
default_dom)
cleanup_env(options.ip, cxml)
status = FAIL
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/VirtualSystemManagementService/05_destroysystem_neg.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/05_destroysystem_neg.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/05_destroysystem_neg.py Fri Feb 06 01:54:39 2009 -0800
@@ -73,7 +73,7 @@
logger.info('Got expected error desc: %s',err_desc)
return PASS
- logger.error('destroy_fail>> %s: Error executing DestroySystem' % tc)
+ logger.error('destroy_fail>> %s: Error executing DestroySystem', tc)
logger.error(details)
return FAIL
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/VirtualSystemManagementService/07_addresource_neg.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/07_addresource_neg.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/07_addresource_neg.py Fri Feb 06 01:54:39 2009 -0800
@@ -57,7 +57,7 @@
bad_inst = 'instance of what ever { dd = 3; //\ ]&'
ret = service.AddResourceSettings(AffectedConfiguration=vssd_ref,
ResourceSettings=[bad_inst])
- logger.info('ret[0] = %s' % ret[0])
+ logger.info('ret[0] = %s', ret[0])
if ret[0] == None:
logger.error('AddRS should NOT return OK with wrong RS input')
rc = 0
@@ -66,8 +66,8 @@
logger.info('Got expected rc code and error string.')
status = PASS
else:
- logger.error('Unexpected rc code %s and description:\n %s' %
- (rc, desc))
+ logger.error('Unexpected rc code %s and description:\n %s',
+ rc, desc)
status = FAIL
except Exception, details:
logger.error('Error invoking AddRS')
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py Fri Feb 06 01:54:39 2009 -0800
@@ -104,7 +104,7 @@
status = check_proc_sched(options.ip, options.virt)
if status != PASS:
- raise Exception("%s CPU scheduling not set properly", default_dom)
+ raise Exception("%s CPU scheduling not set properly" % default_dom)
status = PASS
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/VirtualSystemManagementService/10_hv_version.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/10_hv_version.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/10_hv_version.py Fri Feb 06 01:54:39 2009 -0800
@@ -50,14 +50,14 @@
local_ver = get_hv_ver(options.ip, options.virt)
if cim_ver != local_ver:
- logger.error("CIM says version is `%s', but libvirt says `%s'" \
- % (cim_ver, local_ver))
+ logger.error("CIM says version is `%s', but libvirt says `%s'",
+ cim_ver, local_ver)
if options.virt == 'LXC':
return XFAIL_RC(bug_libvirt)
else:
return FAIL
else:
- logger.info("Verified %s == %s" % (cim_ver, local_ver))
+ logger.info("Verified %s == %s", cim_ver, local_ver)
except Exception, details:
logger.error(details)
return FAIL
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py Fri Feb 06 01:54:39 2009 -0800
@@ -67,7 +67,7 @@
ret = cxml.cim_define(options.ip)
if not ret:
- logger.error("DefineSystem with (%s) units failed" % units)
+ logger.error("DefineSystem with (%s) units failed", units)
return FAIL
return PASS
@@ -94,10 +94,10 @@
cim_kb = int(the_rasd["VirtualQuantity"])
if cim_kb != mem_kb:
- logger.error("CIM reports %i KB instead of %i KB" % (cim_kb, mem_kb))
+ logger.error("CIM reports %i KB instead of %i KB", cim_kb, mem_kb)
return FAIL
- logger.info("Verified %i KB" % mem_kb)
+ logger.info("Verified %i KB", mem_kb)
return PASS
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/VirtualSystemManagementService/12_referenced_config.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/12_referenced_config.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/12_referenced_config.py Fri Feb 06 01:54:39 2009 -0800
@@ -50,12 +50,12 @@
def setup_first_guest(ip, virt, cxml):
ret = cxml.cim_define(ip)
if not ret:
- logger.error("Unable to define %s using DefineSystem()" % test_dom)
+ logger.error("Unable to define %s using DefineSystem()", test_dom)
return FAIL, None
status = cxml.cim_start(ip)
if status != PASS:
- logger.error("Unable to start %s" % test_dom)
+ logger.error("Unable to start %s", test_dom)
return FAIL, "define"
return PASS, "start"
@@ -98,7 +98,7 @@
ret = cxml2.cim_define(ip, ref_conf=ref)
if not ret:
- logger.error("Unable to define %s using DefineSystem()" % test_dom2)
+ logger.error("Unable to define %s using DefineSystem()", test_dom2)
return FAIL, None
return PASS, "define"
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/VirtualSystemManagementService/13_refconfig_additional_devs.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/13_refconfig_additional_devs.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/13_refconfig_additional_devs.py Fri Feb 06 01:54:39 2009 -0800
@@ -60,33 +60,33 @@
def verify_no_dups(ip, virt, cxml, dom):
if cxml.xml_get_disk_source() != cxml.dasd.Address:
- logger.error("%s: Exp disk source %s" % (dom, cxml.dasd.Address))
+ logger.error("%s: Exp disk source %s", dom, cxml.dasd.Address)
return FAIL
if cxml.xml_get_disk_dev() != cxml.dasd.VirtualDevice:
- logger.error("%s: Exp disk dev %s" % (dom, cxml.dasd.VirtualDevice))
+ logger.error("%s: Exp disk dev %s", dom, cxml.dasd.VirtualDevice)
return FAIL
if cxml.xml_get_net_type() != cxml.nasd.NetworkType:
- logger.error("%s: Exp net type %d" % (dom, cxml.nasd.NetworkType))
+ logger.error("%s: Exp net type %d", dom, cxml.nasd.NetworkType)
return FAIL
if cxml.xml_get_net_mac() != cxml.nasd.Address:
- logger.error("%s: Exp net mac %s" % (dom, cxml.nasd.Address))
+ logger.error("%s: Exp net mac %s", dom, cxml.nasd.Address)
return FAIL
vcpus = cxml.xml_get_vcpu()
if not vcpus.isdigit():
- logger.error("Unable to get vcpus value for %s" % dom)
+ logger.error("Unable to get vcpus value for %s", dom)
return FAIL
if int(vcpus) != cxml.pasd.VirtualQuantity:
- logger.error("%s: Exp vcpus %s" % (dom, cxml.pasd.VirtualQuantity))
+ logger.error("%s: Exp vcpus %s", dom, cxml.pasd.VirtualQuantity)
return FAIL
mem = cxml.xml_get_mem()
if not mem.isdigit():
- logger.error("Unable to get mem value for %s" % dom)
+ logger.error("Unable to get mem value for %s", dom)
return FAIL
if cxml.masd.AllocationUnits == "Bytes":
@@ -107,7 +107,7 @@
exp_mem <<= shift
if int(mem) != exp_mem:
- logger.error("%s: Exp mem %s" % (dom, exp_mem))
+ logger.error("%s: Exp mem %s", dom, exp_mem)
return FAIL
return PASS
@@ -123,7 +123,7 @@
try:
rc = cxml.cim_define(options.ip)
if not rc:
- logger.error("Unable define domain %s" % test_dom)
+ logger.error("Unable define domain %s", test_dom)
raise Exception("Unable to define domain %s" % test_dom)
ref = get_vssd_ref(options.ip, options.virt)
@@ -132,7 +132,7 @@
rc = cxml2.cim_define(options.ip, ref_conf=ref)
if not rc:
- logger.error("Unable define domain %s" % test_dom2)
+ logger.error("Unable define domain %s", test_dom2)
raise Exception("Unable to define %s" % test_dom2)
rc = call_request_state_change(test_dom2, options.ip,
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/VirtualSystemMigrationService/01_migratable_host.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/01_migratable_host.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/01_migratable_host.py Fri Feb 06 01:54:39 2009 -0800
@@ -48,7 +48,7 @@
cxml = virt_xml(guest_name)
ret = cxml.create(ip)
if not ret:
- logger.error("Error create domain %s" % guest_name)
+ logger.error("Error create domain %s", guest_name)
return FAIL, None, cxml
status, dom_cs = poll_for_state_change(ip, virt, guest_name,
@@ -104,8 +104,8 @@
status, ret = migrate_guest_to_host(service, cs_ref, target_ip)
if status == FAIL:
- logger.error("MigrateVirtualSystemToHost: unexpected list length %s"
- % len(ret))
+ logger.error("MigrateVirtualSystemToHost: unexpected list length %s",
+ len(ret))
cxml.destroy(options.ip)
cxml.undefine(options.ip)
return status
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/VirtualSystemMigrationService/02_host_migrate_type.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/02_host_migrate_type.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/02_host_migrate_type.py Fri Feb 06 01:54:39 2009 -0800
@@ -46,7 +46,7 @@
cxml = virt_xml(guest_name)
cxml.cim_define(ip)
except Exception:
- logger.error("Error define domain %s" % guest_name)
+ logger.error("Error define domain %s", guest_name)
return FAIL, None
classname = 'Xen_ComputerSystem'
@@ -106,7 +106,7 @@
return FAIL, None
except Exception:
- logger.error("Error start domain %s" % guest_name)
+ logger.error("Error start domain %s", guest_name)
return FAIL, None
return PASS, cxml
@@ -156,11 +156,11 @@
break
logger.info("Migrating guest with the following options:")
- logger.info("%s" % item)
+ logger.info("%s", item)
status, ret = migrate_guest_to_host(service, cs_ref, target_ip, item)
if status == FAIL:
- logger.error("MigrateVirtualSystemToHost: unexpected list length %s"
- % len(ret))
+ logger.error("MigrateVirtualSystemToHost: unexpected list length %s",
+ len(ret))
cxml.destroy(options.ip)
cxml.undefine(options.ip)
return status
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/VirtualSystemMigrationService/05_migratable_host_errs.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/05_migratable_host_errs.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/05_migratable_host_errs.py Fri Feb 06 01:54:39 2009 -0800
@@ -43,13 +43,13 @@
cxml = virt_xml(test_dom)
ret = cxml.cim_define(server)
if not ret:
- logger.error("Error define domain %s" % test_dom )
+ logger.error("Error define domain %s", test_dom )
return FAIL
status = cxml.cim_start(server)
if status != PASS:
cxml.undefine(server)
- logger.error("Error start domain %s" % test_dom )
+ logger.error("Error start domain %s", test_dom )
return status
status = FAIL
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/01_forward.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/01_forward.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/01_forward.py Fri Feb 06 01:54:39 2009 -0800
@@ -116,16 +116,16 @@
try:
if len(assoc_info) != 1:
- logger.error("%s returned %i resource objects for '%s'" % \
- (an, len(assoc_info), cn))
+ logger.error("%s returned %i resource objects for '%s'",
+ an, len(assoc_info), cn)
return FAIL
status = compare_all_prop(assoc_info[0], vssd)
if status != PASS:
logger.error("Properties of inst returned by %s didn't \
- match expected" % assoc_info[0].classname)
+ match expected", assoc_info[0].classname)
return FAIL
except Exception, detail :
- logger.error("Exception in assoc_values function: %s" % detail)
+ logger.error("Exception in assoc_values function: %s", detail)
return FAIL
return PASS
@@ -166,12 +166,12 @@
try:
vssd = enumclass.GetInstance(options.ip, vssd_cn, key_list)
if vssd is None:
- logger.error("VSSD instance for %s not found" % test_dom)
+ logger.error("VSSD instance for %s not found", test_dom)
cxml.undefine(options.ip)
return FAIL
except Exception, detail :
logger.error(Globals.CIM_ERROR_GETINSTANCE, vssd_cn)
- logger.error("Exception : %s" % detail)
+ logger.error("Exception : %s", detail)
cxml.undefine(options.ip)
return FAIL
@@ -191,7 +191,7 @@
except Exception, detail :
logger.error(Globals.CIM_ERROR_ASSOCIATORS, an)
- logger.error("Exception : %s" % detail)
+ logger.error("Exception : %s", detail)
status = FAIL
cxml.undefine(options.ip)
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py Fri Feb 06 01:54:39 2009 -0800
@@ -70,7 +70,7 @@
return FAIL
except Exception, detail :
- logger.error("Exception evaluating InstanceID: %s" % detail)
+ logger.error("Exception evaluating InstanceID: %s", detail)
return FAIL
return PASS
@@ -139,7 +139,7 @@
break
except Exception, detail :
- logger.error("Exception in assoc_values function: %s" % detail)
+ logger.error("Exception in assoc_values function: %s", detail)
status = FAIL
return status
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/03_vssdc_fwd_errs.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/03_vssdc_fwd_errs.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/03_vssdc_fwd_errs.py Fri Feb 06 01:54:39 2009 -0800
@@ -116,13 +116,13 @@
ret = cxml.cim_define(options.ip)
if not ret:
- logger.error('Unable to define domain %s' % test_dom)
+ logger.error('Unable to define domain %s', test_dom)
return FAIL
status = cxml.cim_start(options.ip)
if status != PASS:
cxml.undefine(options.ip)
- logger.error('Unable to start domain %s' % test_dom)
+ logger.error('Unable to start domain %s', test_dom)
return FAIL
global conn
diff -r 3fc2b8a20333 -r 263e285881ac suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/04_vssdc_rev_errs.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/04_vssdc_rev_errs.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/04_vssdc_rev_errs.py Fri Feb 06 01:54:39 2009 -0800
@@ -109,13 +109,13 @@
ret = cxml.cim_define(options.ip)
if not ret:
- logger.error('Unable to define domain %s' % test_dom)
+ logger.error('Unable to define domain %s', test_dom)
return FAIL
status = cxml.cim_start(options.ip)
if status != PASS:
cxml.undefine(options.ip)
- logger.error('Unable to start domain %s' % test_dom)
+ logger.error('Unable to start domain %s', test_dom)
return FAIL
global conn
1
0
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1233913510 28800
# Node ID 80572f08898a6924079f0446f724e34e0fe4ff18
# Parent 3fc2b8a203339c6a59b5f0e2a159e3e0a802ea6d
[TESt]dfs
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/AllocationCapabilities/01_enum.py
--- a/suites/libvirt-cim/cimtest/AllocationCapabilities/01_enum.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/AllocationCapabilities/01_enum.py Fri Feb 06 01:45:10 2009 -0800
@@ -76,13 +76,13 @@
for inst in ac:
id = inst.InstanceID
if pools[id].ResourceType != inst.ResourceType:
- logger.error("%s ResourceType %s, Pool ResourceType %s" % (cn,
- inst.ResourceType, pools[id].ResourceType))
+ logger.error("%s ResourceType %s, Pool ResourceType %s",
+ cn, inst.ResourceType, pools[id].ResourceType)
return FAIL
except Exception, details:
- logger.error("%s returned instance with unexpected InstanceID %s" % (cn,
- details))
+ logger.error("%s returned instance with unexpected InstanceID %s",
+ cn, details)
return FAIL
return PASS
@@ -106,7 +106,7 @@
return status
if len(ac) != len(pools):
- logger.error("%d %s insts != %d pool insts" % (len(ac), cn, len(pools)))
+ logger.error("%d %s insts != %d pool insts", len(ac), cn, len(pools))
return FAIL
status = compare_pool_to_ac(ac, pools, cn)
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py
--- a/suites/libvirt-cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py Fri Feb 06 01:45:10 2009 -0800
@@ -62,7 +62,7 @@
for ac in enum_list:
pool, id, status = parse_instance_id(ac.InstanceID)
if status != PASS:
- logger.error("Unable to parse InstanceID: %s" % ac.InstanceID)
+ logger.error("Unable to parse InstanceID: %s", ac.InstanceID)
return ac_ids, FAIL
ac_ids.append("%s/invalid_id" % pool)
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Fri Feb 06 01:45:10 2009 -0800
@@ -49,12 +49,12 @@
del live_cs[idx]
except ValueError, detail:
Globals.logger.error("Provider reports system `%s', \
-but virsh does not" % name)
+but virsh does not", name)
status = FAIL
for system in live_cs:
Globals.logger.error("Provider does not report system `%s', \
-but virsh does" % system)
+but virsh does", system)
status = FAIL
except IndexError, detail:
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py Fri Feb 06 01:45:10 2009 -0800
@@ -60,7 +60,7 @@
return FAIL
if len(cs) != 0:
- logger.error("%s returned %d instead of empty list" % (cn, len(cs)))
+ logger.error("%s returned %d instead of empty list", cn, len(cs))
status = FAIL
else:
status = PASS
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/ComputerSystem/03_defineVS.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/03_defineVS.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/03_defineVS.py Fri Feb 06 01:45:10 2009 -0800
@@ -46,7 +46,7 @@
cxml = vxml.get_class(options.virt)(test_dom)
rc = cxml.cim_define(options.ip)
if not rc:
- Globals.logger.error(VIRSH_ERROR_DEFINE % test_dom)
+ Globals.logger.error(VIRSH_ERROR_DEFINE, test_dom)
return status
cs_class = get_typed_class(options.virt, 'ComputerSystem')
@@ -74,7 +74,7 @@
Globals.logger.error("Exception: %s", detail)
if status != PASS :
- Globals.logger.error("Error: property values are not set for VS %s" % test_dom)
+ Globals.logger.error("Error: property values are not set for VS %s", test_dom)
cxml.undefine(options.ip)
return status
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/ComputerSystem/04_defineStartVS.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/04_defineStartVS.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/04_defineStartVS.py Fri Feb 06 01:45:10 2009 -0800
@@ -47,12 +47,12 @@
try:
ret = cxml.cim_define(options.ip)
if not ret:
- logger.error("Unable to define %s" % test_dom)
+ logger.error("Unable to define %s", test_dom)
return FAIL
status = cxml.cim_start(options.ip)
if status != PASS:
- logger.error("Failed to Start the dom: %s" % test_dom)
+ logger.error("Failed to Start the dom: %s", test_dom)
logger.error("Property values not set properly for %s", test_dom)
except Exception, detail:
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py Fri Feb 06 01:45:10 2009 -0800
@@ -70,7 +70,7 @@
raise Exception("%s not in expected state" % test_dom)
except Exception, detail:
- logger.error("Exception: %s" % detail)
+ logger.error("Exception: %s", detail)
status = FAIL
cxml.cim_destroy(options.ip)
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/ComputerSystem/06_paused_active_suspend.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/06_paused_active_suspend.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/06_paused_active_suspend.py Fri Feb 06 01:45:10 2009 -0800
@@ -77,7 +77,7 @@
raise Exception("%s not in expected state" % test_dom)
except Exception, detail:
- logger.error("Exception variable: %s" % detail)
+ logger.error("Exception variable: %s", detail)
status = FAIL
cxml.destroy(server)
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/ComputerSystem/22_define_suspend.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/22_define_suspend.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/22_define_suspend.py Fri Feb 06 01:45:10 2009 -0800
@@ -53,14 +53,14 @@
# suspend the vs
status = cxml.cim_suspend(options.ip)
if status != PASS:
- logger.info("Suspending defined %s failed, as expected" % test_dom)
+ logger.info("Suspending defined %s failed, as expected", test_dom)
status = PASS
else:
raise Exception("Suspending defined %s should have failed" % \
test_dom)
except Exception, detail:
- logger.error("Error: %s" % detail)
+ logger.error("Error: %s", detail)
status = FAIL
cxml.undefine(options.ip)
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/ComputerSystem/41_cs_to_settingdefinestate.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/41_cs_to_settingdefinestate.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/41_cs_to_settingdefinestate.py Fri Feb 06 01:45:10 2009 -0800
@@ -121,7 +121,7 @@
for rasd in rasd_list:
guest, dev, status = parse_instance_id(rasd.InstanceID)
if status != PASS:
- logger.error("Unable to parse InstanceID: %s" % rasd.InstanceID)
+ logger.error("Unable to parse InstanceID: %s", rasd.InstanceID)
return rasd_insts, FAIL
if guest == test_dom:
@@ -272,7 +272,7 @@
status, cs_assoc_info = get_associators_info(server, cn, an,
cs_class, instid)
if status != PASS:
- raise Exception("Failed to get assoc info for dom: %s", test_dom)
+ raise Exception("Failed to get assoc info for dom: %s" % test_dom)
# verify the results of SettingsDefineState with the cs_values list
# that was built using the output of the GetInstance on ComputerSystem.
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/ComputerSystemIndication/01_created_indication.py
--- a/suites/libvirt-cim/cimtest/ComputerSystemIndication/01_created_indication.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystemIndication/01_created_indication.py Fri Feb 06 01:45:10 2009 -0800
@@ -58,7 +58,7 @@
dict['default_sysname'],
port)
sub.subscribe(dict['default_url'], dict['default_auth'])
- logger.info("Watching for %s" % iname)
+ logger.info("Watching for %s", iname)
ind_names[ind] = ind_name
sub_list[ind] = sub
@@ -98,12 +98,12 @@
if str(sub.server.indications[0]) == ind_name:
sub.unsubscribe(dict['default_auth'])
- logger.info("Cancelling subscription for %s" % ind_name)
+ logger.info("Cancelling subscription for %s", ind_name)
return PASS
else:
sub.server.indications.remove(sub.server.indications[0])
- logger.error("Did not recieve indication %s" % ind_name)
+ logger.error("Did not recieve indication %s", ind_name)
return FAIL
def poll_for_ind(pid, ind_name):
@@ -129,7 +129,7 @@
logger.error("Waited too long for %s indication", ind_name)
kill(pid, SIGKILL)
else:
- logger.error("Received indication error: %d" % pw[1])
+ logger.error("Received indication error: %d", pw[1])
status = FAIL
break
@@ -174,13 +174,13 @@
raise Exception(details)
except Exception, details:
- logger.error("Exception: %s" % details)
+ logger.error("Exception: %s", details)
status = FAIL
#Make sure all subscriptions are really unsubscribed
for ind, sub in sub_list.iteritems():
sub.unsubscribe(dict['default_auth'])
- logger.info("Cancelling subscription for %s" % ind_names[ind])
+ logger.info("Cancelling subscription for %s", ind_names[ind])
cxml.undefine(ip)
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/ElementAllocatedFromPool/01_forward.py
--- a/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/01_forward.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/01_forward.py Fri Feb 06 01:45:10 2009 -0800
@@ -67,11 +67,11 @@
inst = GetInstance(server, cn_name, key_list)
except Exception, details:
- logger.error("Exception %s" % details)
+ logger.error("Exception %s", details)
return None
if inst is None:
- logger.error("Expected at least one %s instance" % cn_name)
+ logger.error("Expected at least one %s instance", cn_name)
return None
return inst
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py
--- a/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Fri Feb 06 01:45:10 2009 -0800
@@ -130,7 +130,7 @@
elec = assoc.AssociatorNames(server, an, ccn, Name = system,
CreationClassName = ccn)
except Exception:
- logger.error(CIM_ERROR_ASSOCIATORNAMES % system)
+ logger.error(CIM_ERROR_ASSOCIATORNAMES, system)
cxml.undefine(server)
return FAIL
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py
--- a/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Fri Feb 06 01:45:10 2009 -0800
@@ -57,7 +57,7 @@
def filter(list, cn, exp_result):
new_list = assoc.filter_by_result_class(list, cn)
if len(new_list) != exp_result:
- logger.error("Expected %d host, got %d" % (exp_result, len(new_list)))
+ logger.error("Expected %d host, got %d", exp_result, len(new_list))
return FAIL, new_list
return PASS, new_list
@@ -154,7 +154,7 @@
cxml = virtxml(test_dom)
ret = cxml.cim_define(options.ip)
if not ret:
- logger.error("Failed to define the dom: %s" % test_dom)
+ logger.error("Failed to define the dom: %s", test_dom)
return FAIL
cs = domain_list(options.ip, options.virt)
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py
--- a/suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py Fri Feb 06 01:45:10 2009 -0800
@@ -51,14 +51,14 @@
logger.info("Got expected rc code and error string")
status = PASS
else:
- logger.error("Unexpected rc code %s and description %s\n" %(rc, desc))
+ logger.error("Unexpected rc code %s and description %s\n", rc, desc)
except Exception, details:
logger.error("Unknown exception happened")
logger.error(details)
if rc == 0:
logger.error("ElementCapabilities associator should NOT return excepted \
- result with a wrong key name and value of %s input" % ref_class)
+ result with a wrong key name and value of %s input", ref_class)
status = FAIL
return status
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/ElementCapabilities/04_reverse_errs.py
--- a/suites/libvirt-cim/cimtest/ElementCapabilities/04_reverse_errs.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ElementCapabilities/04_reverse_errs.py Fri Feb 06 01:45:10 2009 -0800
@@ -50,14 +50,14 @@
logger.info("Got expected rc code and error string")
status = PASS
else:
- logger.error("Unexpected rc code %s and description %s\n" %(rc, desc))
+ logger.error("Unexpected rc code %s and description %s\n", rc, desc)
except Exception, details:
logger.error("Unknown exception happened")
logger.error(details)
if rc == 0:
logger.error("ElementCapabilities associator should NOT return excepted result \
- with a wrong key name and value of %s input" % ref_class)
+ with a wrong key name and value of %s input", ref_class)
status = FAIL
return status
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/ElementCapabilities/05_hostsystem_cap.py
--- a/suites/libvirt-cim/cimtest/ElementCapabilities/05_hostsystem_cap.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ElementCapabilities/05_hostsystem_cap.py Fri Feb 06 01:45:10 2009 -0800
@@ -59,7 +59,7 @@
sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']
def print_err(err, detail, cn):
- logger.error(err % cn)
+ logger.error(err, cn)
logger.error("Exception: %s", detail)
def field_err(fieldname, exp_val, ret_value):
@@ -76,7 +76,7 @@
break
if ret != PASS:
- logger.error("%s with %s was not returned" % (cn, exp_val))
+ logger.error("%s with %s was not returned", cn, exp_val)
status = FAIL
return status, inst
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/ElementConforms/01_forward.py
--- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Fri Feb 06 01:45:10 2009 -0800
@@ -151,13 +151,13 @@
cxml = virt_xml(test_dom)
ret = cxml.cim_define(server)
if not ret:
- logger.error('Unable to define domain %s' % test_dom)
+ logger.error('Unable to define domain %s', test_dom)
return FAIL
ret = cxml.start(server)
if not ret:
cxml.undefine(server)
- logger.error('Unable to start domain %s' % test_dom)
+ logger.error('Unable to start domain %s', test_dom)
return FAIL
prev_namespace = Globals.CIM_NS
@@ -201,7 +201,7 @@
raise Exception("%s items weren't returned: %s" % (key, list))
except Exception, detail:
- logger.error("Exception: %s" % detail)
+ logger.error("Exception: %s", detail)
status = FAIL
Globals.CIM_NS = prev_namespace
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py
--- a/suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py Fri Feb 06 01:45:10 2009 -0800
@@ -93,7 +93,7 @@
ret = cxml.cim_define(server)
if not ret:
- logger.error("ERROR: Failed to Define the dom: %s" % test_dom)
+ logger.error("ERROR: Failed to Define the dom: %s", test_dom)
return status
inst_list = {}
@@ -102,7 +102,7 @@
if rc != 0:
cs = libvirt_cached_data_poll(server, virt, test_dom)
if sys is None:
- logger.error("Instance for %s not created" % test_dom)
+ logger.error("Instance for %s not created", test_dom)
cxml.undefine(server)
return FAIL
@@ -116,7 +116,7 @@
return status
except Exception, details:
- logger.error("DEBUG Exception: %s" % details)
+ logger.error("DEBUG Exception: %s", details)
cxml.undefine(server)
return FAIL
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/ElementConforms/03_ectp_fwd_errs.py
--- a/suites/libvirt-cim/cimtest/ElementConforms/03_ectp_fwd_errs.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ElementConforms/03_ectp_fwd_errs.py Fri Feb 06 01:45:10 2009 -0800
@@ -84,7 +84,7 @@
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)
+ logger.error("------ FAILED: %s------", field)
name_val[i] = temp
return ret_val
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py
--- a/suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py Fri Feb 06 01:45:10 2009 -0800
@@ -125,7 +125,7 @@
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)
+ logger.error("------ FAILED: %s------", field)
name_val[i] = temp
return ret_val
@@ -142,7 +142,7 @@
cxml = virt_xml(test_dom)
ret = cxml.cim_define(options.ip)
if not ret:
- logger.error('Unable to define domain %s' % test_dom)
+ logger.error('Unable to define domain %s', test_dom)
return FAIL
hs = get_typed_class(options.virt, "HostSystem")
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py
--- a/suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py Fri Feb 06 01:45:10 2009 -0800
@@ -72,11 +72,11 @@
inst = GetInstance(ip, cn, key_list)
except Exception, details:
- logger.error("Exception %s" % details)
+ logger.error("Exception %s", details)
return None
if inst is None:
- logger.error("Expected at least one %s instance" % cn)
+ logger.error("Expected at least one %s instance", cn)
return None
return inst
@@ -167,7 +167,7 @@
for cn, inst in inst_list.iteritems():
status = test_assoc(options.ip, esd_cn, cn, options.virt, inst)
if status != PASS:
- logger.error("Unable to get %s insts from %s" % (cn, esd_cn))
+ logger.error("Unable to get %s insts from %s", cn, esd_cn)
break
cxml.undefine(options.ip)
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/ElementSettingData/03_esd_assoc_with_rasd_errs.py
--- a/suites/libvirt-cim/cimtest/ElementSettingData/03_esd_assoc_with_rasd_errs.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ElementSettingData/03_esd_assoc_with_rasd_errs.py Fri Feb 06 01:45:10 2009 -0800
@@ -88,7 +88,7 @@
cxml = virtxml(test_dom, mac = test_mac)
ret = cxml.create(options.ip)
if not ret:
- logger.error("Failed to Create the dom: %s" % test_dom)
+ logger.error("Failed to Create the dom: %s", test_dom)
status = FAIL
return status
if options.virt == "XenFV":
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/HostSystem/01_enum.py
--- a/suites/libvirt-cim/cimtest/HostSystem/01_enum.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/HostSystem/01_enum.py Fri Feb 06 01:45:10 2009 -0800
@@ -50,7 +50,7 @@
try:
hs = enumclass.EnumInstances(options.ip, name)
except Exception, details:
- logger.error("%s %s: %s" % (CIM_ERROR_ENUMERATE, name, details))
+ logger.error("%s %s: %s", CIM_ERROR_ENUMERATE, name, details)
status = FAIL
if ret == PASS:
@@ -60,25 +60,25 @@
else:
if linux_cs.CreationClassName != 'Linux_ComputerSystem'\
or linux_cs.Name != host:
- logger.error("Exp Linux_ComputerSystem, got %s" \
- % linux_cs.CreationClassName)
- logger.error("Exp %s, got %s" % (host, system.Name))
+ logger.error("Exp Linux_ComputerSystem, got %s",
+ linux_cs.CreationClassName)
+ logger.error("Exp %s, got %s", host, system.Name)
return FAIL
else:
return PASS
else:
if len(hs) != 1:
- logger.error("Expected 1 %s instance returned" % name)
+ logger.error("Expected 1 %s instance returned", name)
return FAIL
system = hs[0]
if system.CreationClassName != name or system.Name != host:
- logger.error("Exp %s, got %s" % (name, system.CreationClassName))
- logger.error("Exp %s, got %s" % (host, system.Name))
+ logger.error("Exp %s, got %s", name, system.CreationClassName)
+ logger.error("Exp %s, got %s", host, system.Name)
status = FAIL
else:
- logger.info("%s is %s" % (name, host))
+ logger.info("%s is %s", name, host)
status = PASS
return status
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py
--- a/suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py Fri Feb 06 01:45:10 2009 -0800
@@ -96,7 +96,7 @@
return status, vsxml_info
def print_err(err, detail, cn):
- logger.error(err % cn)
+ logger.error(err, cn)
logger.error("Exception: %s", detail)
def get_inst_from_list(server, cn, cs_list, filter_name, exp_val, vsxml):
@@ -109,7 +109,7 @@
break
if ret != PASS:
- logger.error("%s with %s was not returned" % (cn, exp_val))
+ logger.error("%s with %s was not returned", cn, exp_val)
vsxml.undefine(server)
status = FAIL
@@ -165,7 +165,7 @@
SystemCreationClassName = sccn)
if len(assoc_info) != 1:
- logger.error("%s returned %i %s objects" % (an, len(assoc_info), cn))
+ logger.error("%s returned %i %s objects", an, len(assoc_info), cn)
status = FAIL
break
index = (len(assoc_info) - 1)
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py
--- a/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Fri Feb 06 01:45:10 2009 -0800
@@ -73,7 +73,7 @@
return status, vsxml
def print_err(err, detail, cn):
- logger.error(err % cn)
+ logger.error(err, cn)
logger.error("Exception: %s", detail)
def get_inst_from_list(cn, qcn, list, filter, exp_val):
@@ -82,7 +82,7 @@
inst = None
if len(list) < 1:
- logger.error("%s returned %i %s objects" % (qcn, len(list), cn))
+ logger.error("%s returned %i %s objects", qcn, len(list), cn)
return FAIL, None
for inst in list:
@@ -92,7 +92,7 @@
if ret != PASS:
status = FAIL
- logger.error("%s with %s was not returned" % (cn, exp_val))
+ logger.error("%s with %s was not returned", cn, exp_val)
return status, inst
@@ -107,7 +107,7 @@
logger.error("Hostname mismatch")
except Exception, detail:
- logger.error("Exception in %s : %s" % (cn, detail))
+ logger.error("Exception in %s : %s", cn, detail)
status = FAIL
return status, host_inst.Name, host_inst.CreationClassName
@@ -236,7 +236,7 @@
if status != PASS:
return status
else:
- logger.error("Unexpected instance type %s" % cn)
+ logger.error("Unexpected instance type %s", cn)
return FAIL
except Exception, detail:
@@ -248,10 +248,10 @@
def check_rasd_vals(inst, rt):
try:
if inst['ResourceType'] != rt:
- logger.error("In ResourceType for %s " % rt)
+ logger.error("In ResourceType for %s ", rt)
return FAIL
except Exception, detail:
- logger.error("Error checking RASD attribute values %s" % detail)
+ logger.error("Error checking RASD attribute values %s", detail)
return FAIL
return PASS
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py
--- a/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py Fri Feb 06 01:45:10 2009 -0800
@@ -70,7 +70,7 @@
libvirt_input_graphics_changeset = 757
def print_err(err, detail, cn):
- logger.error(err % cn)
+ logger.error(err, cn)
logger.error("Exception: %s", detail)
def pool_init_list(virt, pool_assoc, net_name, dp_InstID):
@@ -194,8 +194,8 @@
def check_len(an, assoc_list_info, qcn, exp_len):
if len(assoc_list_info) < exp_len:
- logger.error("%s returned %i %s objects" % (an,
- len(assoc_list_info), qcn))
+ logger.error("%s returned %i %s objects",
+ an, len(assoc_list_info), qcn)
return FAIL
return PASS
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/HostSystem/06_hs_to_vsms.py
--- a/suites/libvirt-cim/cimtest/HostSystem/06_hs_to_vsms.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/HostSystem/06_hs_to_vsms.py Fri Feb 06 01:45:10 2009 -0800
@@ -56,7 +56,7 @@
sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
def print_err(err, detail, cn):
- logger.error(err % cn)
+ logger.error(err, cn)
logger.error("Exception: %s", detail)
def print_field_error(fieldname, ret_value, exp_value):
@@ -76,7 +76,7 @@
# When no records are found.
if ret != PASS:
- logger.error("%s with %s was not returned" % (cn, exp_val))
+ logger.error("%s with %s was not returned", cn, exp_val)
status = FAIL
return status, inst
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/HostedDependency/02_reverse.py
--- a/suites/libvirt-cim/cimtest/HostedDependency/02_reverse.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/HostedDependency/02_reverse.py Fri Feb 06 01:45:10 2009 -0800
@@ -72,12 +72,12 @@
ret = cxml.cim_define(server)
if not ret:
- logger.error("Failed to define the dom: %s" % test_dom)
+ logger.error("Failed to define the dom: %s", test_dom)
return FAIL
rc = call_request_state_change(test_dom, server, 2, TIME, virt)
if rc != 0:
- logger.error("Failed to start the dom: %s" % test_dom)
+ logger.error("Failed to start the dom: %s", test_dom)
cxml.undefine(server)
return FAIL
@@ -126,7 +126,7 @@
if guest["Name"] in cs_names:
cs_names.remove(guest["Name"])
else:
- logger.error("HostedDependency returned unexpected guest %s" %
+ logger.error("HostedDependency returned unexpected guest %s",
guest["Name"])
status = FAIL
@@ -140,7 +140,7 @@
# not being returned by HostedDependency
for guest in cs_names:
- logger.error("HostedDependency did not return expected guest %s" %
+ logger.error("HostedDependency did not return expected guest %s",
guest["Name"])
status = FAIL
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/HostedDependency/03_enabledstate.py
--- a/suites/libvirt-cim/cimtest/HostedDependency/03_enabledstate.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/HostedDependency/03_enabledstate.py Fri Feb 06 01:45:10 2009 -0800
@@ -80,7 +80,7 @@
except Exception, detail:
logger.error(CIM_ERROR_GETINSTANCE, 'ComputerSystem')
- logger.error("Exception: %s" % detail)
+ logger.error("Exception: %s", detail)
status = FAIL
return status, dom_field_list
@@ -113,18 +113,18 @@
ret = cxml.cim_define(server)
if not ret:
- logger.error("Failed to define the dom: %s" % test_dom)
+ logger.error("Failed to define the dom: %s", test_dom)
return FAIL
rc = call_request_state_change(test_dom, server, 2, TIME, virt)
if rc != 0:
- logger.error("Failed to start the dom: %s" % test_dom)
+ logger.error("Failed to start the dom: %s", test_dom)
cxml.undefine(server)
return FAIL
rc = call_request_state_change(test_dom, server, 9, TIME, virt)
if rc != 0:
- logger.error("Failed to suspend the dom: %s" % test_dom)
+ logger.error("Failed to suspend the dom: %s", test_dom)
cxml.destroy(server)
cxml.undefine(server)
@@ -181,7 +181,7 @@
except Exception, detail:
logger.error(CIM_ERROR_ASSOCIATORS,'HostedDependency')
- logger.error("Exception: %s" % detail)
+ logger.error("Exception: %s", detail)
status = FAIL
cxml.destroy(server)
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/HostedDependency/04_reverse_errs.py
--- a/suites/libvirt-cim/cimtest/HostedDependency/04_reverse_errs.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/HostedDependency/04_reverse_errs.py Fri Feb 06 01:45:10 2009 -0800
@@ -91,7 +91,7 @@
ret = cxml.create(server)
if not ret:
- logger.error("Failed to Create the dom: %s" % test_dom)
+ logger.error("Failed to Create the dom: %s", test_dom)
return FAIL
conn = assoc.myWBEMConnection('http://%s' % server,
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py
--- a/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Fri Feb 06 01:45:10 2009 -0800
@@ -58,7 +58,7 @@
Name = host_sys,
CreationClassName = host_cn)
except Exception, details:
- logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES % assoc_cn)
+ logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES, assoc_cn)
logger.error("Exception:", details)
return FAIL
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py
--- a/suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py Fri Feb 06 01:45:10 2009 -0800
@@ -64,7 +64,7 @@
try:
assoc_host = AssociatorNames(options.ip, assoc_cn, k, InstanceID=v)
except Exception:
- logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES % assoc_cn)
+ logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES, assoc_cn)
return FAIL
if len(assoc_host) == 1:
if assoc_host[0].keybindings['Name'] != host_sys:
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/HostedService/01_forward.py
--- a/suites/libvirt-cim/cimtest/HostedService/01_forward.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/HostedService/01_forward.py Fri Feb 06 01:45:10 2009 -0800
@@ -58,7 +58,7 @@
Name = host_name)
except Exception, deatils:
- logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES % host_name)
+ logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES, host_name)
logger.error("Exception: details %s", details)
return FAIL
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/LogicalDisk/01_disk.py
--- a/suites/libvirt-cim/cimtest/LogicalDisk/01_disk.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/LogicalDisk/01_disk.py Fri Feb 06 01:45:10 2009 -0800
@@ -58,11 +58,11 @@
status = 0
if dev.Name != test_dev:
- logger.error("Name should be `%s' instead of `%s'" % (test_dev, dev.Name))
+ logger.error("Name should be `%s' instead of `%s'", test_dev, dev.Name)
status = 1
if status == 0:
- logger.info("Checked device %s" % dev.Name)
+ logger.info("Checked device %s", dev.Name)
vsxml.undefine(options.ip)
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/LogicalDisk/02_nodevs.py
--- a/suites/libvirt-cim/cimtest/LogicalDisk/02_nodevs.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/LogicalDisk/02_nodevs.py Fri Feb 06 01:45:10 2009 -0800
@@ -69,7 +69,7 @@
return FAIL
if len(devs) != 0:
- logger.error("%s returned %d instead of empty list" % (cn, len(devs)))
+ logger.error("%s returned %d instead of empty list", cn, len(devs))
status = FAIL
else:
status = PASS
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/Memory/01_memory.py
--- a/suites/libvirt-cim/cimtest/Memory/01_memory.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/Memory/01_memory.py Fri Feb 06 01:45:10 2009 -0800
@@ -63,11 +63,11 @@
capacity = dev.ConsumableBlocks * dev.BlockSize / 1024
if capacity != alloc_mem:
- logger.error("Capacity should be %i MB instead of %i MB" % (alloc_mem, capacity))
+ logger.error("Capacity should be %i MB instead of %i MB", alloc_mem, capacity)
status = 1
if status == 0:
- logger.info("Checked memory capacity: %s MB" % capacity)
+ logger.info("Checked memory capacity: %s MB", capacity)
vsxml.undefine(options.ip)
return status
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/Memory/02_defgetmem.py
--- a/suites/libvirt-cim/cimtest/Memory/02_defgetmem.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/Memory/02_defgetmem.py Fri Feb 06 01:45:10 2009 -0800
@@ -76,7 +76,7 @@
raise Exception("Memory inst for %s not as expected." % default_dom)
except Exception, detail:
- logger.error("Exception: %s" % detail)
+ logger.error("Exception: %s", detail)
status = FAIL
cxml.undefine(options.ip)
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/NetworkPort/01_netport.py
--- a/suites/libvirt-cim/cimtest/NetworkPort/01_netport.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/NetworkPort/01_netport.py Fri Feb 06 01:45:10 2009 -0800
@@ -80,12 +80,12 @@
dev = GetInstance(options.ip, net_class, key_list)
except Exception, detail:
- logger.error("Exception: %s" % detail)
+ logger.error("Exception: %s", detail)
vsxml.undefine(options.ip)
return FAIL
if dev.DeviceID == None:
- logger.error("Error retrieving instance for devid %s" % devid)
+ logger.error("Error retrieving instance for devid %s", devid)
vsxml.undefine(options.ip)
return FAIL
@@ -94,23 +94,23 @@
link_tech = get_linktech(options.ip, options.virt)
if dev.LinkTechnology != link_tech:
- logger.error("LinkTechnology should be set to `%i' instead of `%s'" % \
- (link_tech, dev.LinkTechnology))
+ logger.error("LinkTechnology should be set to `%i' instead of `%s'",
+ link_tech, dev.LinkTechnology)
status = FAIL
addrs = dev.NetworkAddresses
if len(addrs) != 1:
- logger.error("Too many NetworkAddress entries (%i instead of %i)" % \
- (len(addrs), 1))
+ logger.error("Too many NetworkAddress entries (%i instead of %i)",
+ len(addrs), 1)
status = FAIL
if addrs[0] != test_mac:
- logger.error("MAC address reported incorrectly (%s instead of %s)" % \
- (addrs[0], test_mac))
+ logger.error("MAC address reported incorrectly (%s instead of %s)",
+ addrs[0], test_mac)
status = FAIL
if status == FAIL:
- logger.error("Checked interface %s" % test_mac)
+ logger.error("Checked interface %s", test_mac)
vsxml.undefine(options.ip)
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/NetworkPort/03_user_netport.py
--- a/suites/libvirt-cim/cimtest/NetworkPort/03_user_netport.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/NetworkPort/03_user_netport.py Fri Feb 06 01:45:10 2009 -0800
@@ -45,7 +45,7 @@
cxml = KVMXML(test_dom, mac = test_mac, ntype='user')
ret = cxml.cim_define(options.ip)
if not ret:
- logger.error('Unable to define domain %s' % test_dom)
+ logger.error('Unable to define domain %s', test_dom)
return FAIL
devid = "%s/%s" % (test_dom, test_mac)
@@ -59,7 +59,7 @@
try:
dev = GetInstance(options.ip, 'KVM_NetworkPort', key_list)
except Exception, detail:
- logger.error("Exception: %s" % detail)
+ logger.error("Exception: %s", detail)
cxml.undefine(options.ip)
return FAIL
@@ -73,17 +73,17 @@
addrs = dev.NetworkAddresses
if len(addrs) != 1:
- logger.error("Too many NetworkAddress entries (%i instead of %i)" % \
- (len(addrs), 1))
+ logger.error("Too many NetworkAddress entries (%i instead of %i)",
+ len(addrs), 1)
status = FAIL
if addrs[0] != test_mac:
- logger.error("MAC address reported incorrectly (%s instead of %s)" % \
- (addrs[0], test_mac))
+ logger.error("MAC address reported incorrectly (%s instead of %s)",
+ addrs[0], test_mac)
status = FAIL
if status == FAIL:
- logger.error("Checked interface %s" % test_mac)
+ logger.error("Checked interface %s", test_mac)
cxml.undefine(options.ip)
return status
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/Processor/01_processor.py
--- a/suites/libvirt-cim/cimtest/Processor/01_processor.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/Processor/01_processor.py Fri Feb 06 01:45:10 2009 -0800
@@ -64,11 +64,11 @@
try:
dev = GetInstance(options.ip, proc_class, key_list)
if dev.DeviceID == devid:
- logger.info("Checked device %s" % devid)
+ logger.info("Checked device %s", devid)
else:
- logger.error("Mismatching device, returned %s instead %s" % (dev.DeviceID, devid))
+ logger.error("Mismatching device, returned %s instead %s", dev.DeviceID, devid)
except Exception, details:
- logger.error("Error check device %s: %s" % (devid, details))
+ logger.error("Error check device %s: %s", devid, details)
status = 1
vsxml.stop(options.ip)
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/Processor/02_definesys_get_procs.py
--- a/suites/libvirt-cim/cimtest/Processor/02_definesys_get_procs.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/Processor/02_definesys_get_procs.py Fri Feb 06 01:45:10 2009 -0800
@@ -86,7 +86,7 @@
% default_dom)
except Exception, detail:
- logger.error("Exception: %s" % detail)
+ logger.error("Exception: %s", detail)
status = FAIL
cxml.undefine(options.ip)
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/Profile/01_enum.py
--- a/suites/libvirt-cim/cimtest/Profile/01_enum.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/Profile/01_enum.py Fri Feb 06 01:45:10 2009 -0800
@@ -66,16 +66,16 @@
x.RegisteredName, x.RegisteredVersion] for x in proflist]
for exp_prof in explist:
if exp_prof in checklist:
- logger.info("Profile %s found" % exp_prof[0])
+ logger.info("Profile %s found", exp_prof[0])
else:
- logger.error("Profile %s is not found" % exp_prof[0])
+ logger.error("Profile %s is not found", exp_prof[0])
status = FAIL
break
if status == PASS:
- logger.info("Properties check for %s passed" % cn)
+ logger.info("Properties check for %s passed", cn)
else:
- logger.error("Properties check for %s failed" % cn)
+ logger.error("Properties check for %s failed", cn)
return status
if __name__ == "__main__":
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/Profile/02_profile_to_elec.py
--- a/suites/libvirt-cim/cimtest/Profile/02_profile_to_elec.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/Profile/02_profile_to_elec.py Fri Feb 06 01:45:10 2009 -0800
@@ -63,18 +63,18 @@
rc = csxml_info.cim_define(server)
if not rc:
- logger.error("Unable define domain %s using DefineSystem() " % test_dom)
+ logger.error("Unable define domain %s using DefineSystem() ", test_dom)
status = FAIL
except Exception, detail:
- logger.error("Exception defining domain %s" % test_dom)
+ logger.error("Exception defining domain %s", test_dom)
logger.error("Exception: %s", detail)
status = FAIL
return status, csxml_info
def print_err(err, detail, cn):
- logger.error(err % cn)
+ logger.error(err, cn)
logger.error("Exception: %s", detail)
def get_expected_inst(cn, list, property, exp):
@@ -84,7 +84,7 @@
return PASS, x
except Exception:
pass
- logger.error("%s with %s was not returned" % (cn, exp))
+ logger.error("%s with %s was not returned", cn, exp)
return FAIL, None
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/RedirectionService/03_RedirectionSAP_errs.py
--- a/suites/libvirt-cim/cimtest/RedirectionService/03_RedirectionSAP_errs.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/RedirectionService/03_RedirectionSAP_errs.py Fri Feb 06 01:45:10 2009 -0800
@@ -140,7 +140,7 @@
if status != PASS:
- logger.error(" -------------- FAILED %s ----------- : " % test_val)
+ logger.error(" -------------- FAILED %s ----------- : ", test_val)
break
cxml.cim_destroy(options.ip)
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py
--- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py Fri Feb 06 01:45:10 2009 -0800
@@ -82,7 +82,7 @@
for rasd in rasd_list:
guest, dev, status = parse_instance_id(rasd.InstanceID)
if status != PASS:
- logger.error("Unable to parse InstanceID: %s" % rasd.InstanceID)
+ logger.error("Unable to parse InstanceID: %s", rasd.InstanceID)
return rasd_insts, FAIL
if guest == guest_name:
@@ -108,7 +108,7 @@
for inst in list:
guest, id, status = parse_instance_id(inst.InstanceID)
if status != PASS:
- logger.error("Unable to parse InstanceID: %s" % inst.InstanceID)
+ logger.error("Unable to parse InstanceID: %s", inst.InstanceID)
return None, FAIL
if id == exp_id:
@@ -169,8 +169,8 @@
if rasd['InstanceID'] == exp_rasd.InstanceID:
status = PASS
else:
- logger.info("Got %s instead of %s" % (rasd['InstanceID'],
- exp_rasd.InstanceID))
+ logger.info("Got %s instead of %s", rasd['InstanceID'],
+ exp_rasd.InstanceID)
status = FAIL
if status != PASS:
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py
--- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py Fri Feb 06 01:45:10 2009 -0800
@@ -81,7 +81,7 @@
for rasd in rasd_list:
guest, dev, status = parse_instance_id(rasd.InstanceID)
if status != PASS:
- logger.error("Unable to parse InstanceID: %s" % rasd.InstanceID)
+ logger.error("Unable to parse InstanceID: %s", rasd.InstanceID)
return rasd_insts, FAIL
if guest == guest_name:
@@ -107,7 +107,7 @@
for inst in list:
guest, id, status = parse_instance_id(inst.InstanceID)
if status != PASS:
- logger.error("Unable to parse InstanceID: %s" % inst.InstanceID)
+ logger.error("Unable to parse InstanceID: %s", inst.InstanceID)
return None, FAIL
if id == exp_id:
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/ResourceAllocationFromPool/03_forward_errs.py
--- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/03_forward_errs.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/03_forward_errs.py Fri Feb 06 01:45:10 2009 -0800
@@ -65,13 +65,15 @@
logger.info("Got excepted rc code and error string")
status = PASS
else:
- logger.error("Unexpected rc code %s and description %s\n" %(rc, desc))
+ logger.error("Unexpected rc code %s and description %s\n", rc, desc)
except Exception, details:
logger.error("Unknown exception happened")
logger.error(details)
if rc == 0:
- logger.error("ResourceAllocationFromPool associator should NOT return excepted result with a wrong InstanceID value of %s input" %k)
+ logger.error("ResourceAllocationFromPool associator should NOT \
+ return excepted result with a wrong InstanceID \
+ value of %s input", k)
status = FAIL
return status
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/ResourceAllocationFromPool/04_reverse_errs.py
--- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/04_reverse_errs.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/04_reverse_errs.py Fri Feb 06 01:45:10 2009 -0800
@@ -63,13 +63,16 @@
logger.info("Got excepted rc code and error string")
status = PASS
else:
- logger.error("Unexpected rc code %s and description %s\n" %(rc, desc))
+ logger.error("Unexpected rc code %s and description %s\n",
+ rc, desc)
except Exception, details:
logger.error("Unknown exception happened")
logger.error(details)
if rc == 0:
- logger.error("ResourceAllocationSettingData should NOT return excepted result with a wrong InstanceID value of %s input" %k)
+ logger.error("ResourceAllocationSettingData should NOT return \
+ excepted result with a wrong InstanceID \
+ value of %s input", k)
status = FAIL
return status
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/ResourceAllocationFromPool/05_RAPF_err.py
--- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/05_RAPF_err.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/05_RAPF_err.py Fri Feb 06 01:45:10 2009 -0800
@@ -101,7 +101,7 @@
ret = PASS
if ret != PASS:
- logger.error("%s with %s was not returned" % (classname, exp_val))
+ logger.error("%s with %s was not returned", classname, exp_val)
vsxml.undefine(server)
status = FAIL
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/ResourcePool/01_enum.py
--- a/suites/libvirt-cim/cimtest/ResourcePool/01_enum.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ResourcePool/01_enum.py Fri Feb 06 01:45:10 2009 -0800
@@ -79,8 +79,8 @@
def verify_fields(pool_list, poolname, cn):
status = PASS
if len(poolname) < 1:
- logger.error("%s return %i instances, expected atleast 1 instance" \
- % (cn, len(poolname)))
+ logger.error("%s return %i instances, expected atleast 1 instance",
+ cn, len(poolname))
return FAIL
exp_value = pool_list[cn][0]
for i in range(0, len(poolname)):
@@ -119,14 +119,14 @@
try:
mempool = EnumInstances(ip, mp)
except Exception:
- logger.error(Globals.CIM_ERROR_ENUMERATE % mp)
+ logger.error(Globals.CIM_ERROR_ENUMERATE, mp)
return FAIL
status = verify_fields(pool_list, mempool, mp)
try:
propool = EnumInstances(ip, pp)
except Exception:
- logger.error(Globals.CIM_ERROR_ENUMERATE % pp)
+ logger.error(Globals.CIM_ERROR_ENUMERATE, pp)
return FAIL
status = verify_fields(pool_list, propool, pp)
@@ -134,14 +134,14 @@
try:
diskpool = EnumInstances(ip, dp)
except Exception:
- logger.error(Globals.CIM_ERROR_ENUMERATE % dp)
+ logger.error(Globals.CIM_ERROR_ENUMERATE, dp)
return FAIL
status = verify_fields(pool_list, diskpool, dp)
try:
netpool = EnumInstances(ip, np)
except Exception:
- logger.error(Globals.CIM_ERROR_ENUMERATE % np)
+ logger.error(Globals.CIM_ERROR_ENUMERATE, np)
return FAIL
status = verify_fields(pool_list, netpool, np)
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/ResourcePoolConfigurationCapabilities/01_enum.py
--- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationCapabilities/01_enum.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationCapabilities/01_enum.py Fri Feb 06 01:45:10 2009 -0800
@@ -43,7 +43,7 @@
if len(rpcc) != 1:
Globals.logger.error("%s_ResourcePoolConfigurationCapabilities return %i instances, \
- excepted only 1 instance" % (options.virt, len(rpcc)))
+ excepted only 1 instance", options.virt, len(rpcc))
return FAIL
if rpcc[0].InstanceID != "RPCC":
Globals.logger.error("error result of enum ResourcePoolConfigurationCapabilities")
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/01_enum.py
--- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/01_enum.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/01_enum.py Fri Feb 06 01:45:10 2009 -0800
@@ -51,7 +51,7 @@
try:
rpcservice = rpcs.enumerate(server, classname)
except Exception:
- logger.error(Globals.CIM_ERROR_ENUMERATE % classname)
+ logger.error(Globals.CIM_ERROR_ENUMERATE, classname)
return FAIL
valid_service = {"Name" : "RPCS",
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py
--- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Fri Feb 06 01:45:10 2009 -0800
@@ -72,8 +72,8 @@
logger.info("Error string is '%s'", desc)
return PASS
else:
- logger.error("Unexpected rc code %s and description %s\n" \
- %(err_no, desc))
+ logger.error("Unexpected rc code %s and description %s\n",
+ err_no, desc)
return FAIL
logger.error("The execution should not have reached here!!")
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/05_AddResourcesToResourcePool.py
--- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/05_AddResourcesToResourcePool.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/05_AddResourcesToResourcePool.py Fri Feb 06 01:45:10 2009 -0800
@@ -72,8 +72,8 @@
logger.info("Error string is '%s'", desc)
return PASS
else:
- logger.error("Unexpected rc code %s and description %s\n" \
- %(err_no, desc))
+ logger.error("Unexpected rc code %s and description %s\n",
+ err_no, desc)
print desc
return XFAIL_RC(bug)
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/06_RemoveResourcesFromResourcePool.py
--- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/06_RemoveResourcesFromResourcePool.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/06_RemoveResourcesFromResourcePool.py Fri Feb 06 01:45:10 2009 -0800
@@ -70,8 +70,8 @@
logger.info("Error string is '%s'", desc)
return PASS
else:
- logger.error("Unexpected rc code %s and description %s\n" \
- %(err_no, desc))
+ logger.error("Unexpected rc code %s and description %s\n",
+ err_no, desc)
return FAIL
logger.error("The execution should not have reached here!!")
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py
--- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py Fri Feb 06 01:45:10 2009 -0800
@@ -66,8 +66,8 @@
logger.info("Error string is '%s'", desc)
return PASS
else:
- logger.error("Unexpected rc code %s and description %s\n" \
- %(err_no, desc))
+ logger.error("Unexpected rc code %s and description %s\n",
+ err_no, desc)
return FAIL
logger.error("The execution should not have reached here!!")
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/SettingsDefine/01_forward.py
--- a/suites/libvirt-cim/cimtest/SettingsDefine/01_forward.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/SettingsDefine/01_forward.py Fri Feb 06 01:45:10 2009 -0800
@@ -77,7 +77,7 @@
for dev in dev_list:
guest, dev_id, status = parse_instance_id(dev.DeviceID)
if status != PASS:
- logger.error("Unable to parse InstanceID: %s" % dev.DeviceID)
+ logger.error("Unable to parse InstanceID: %s", dev.DeviceID)
return dev_insts, FAIL
if guest == guest_name:
@@ -102,7 +102,7 @@
for rasd in rasd_list:
guest, dev, status = parse_instance_id(rasd.InstanceID)
if status != PASS:
- logger.error("Unable to parse InstanceID: %s" % rasd.InstanceID)
+ logger.error("Unable to parse InstanceID: %s", rasd.InstanceID)
return rasd_insts, FAIL
if guest == guest_name:
@@ -126,8 +126,8 @@
if rasd['InstanceID'] == exp_rasd.InstanceID:
status = PASS
else:
- logger.info("Got %s instead of %s" % (rasd['InstanceID'],
- exp_rasd.InstanceID))
+ logger.info("Got %s instead of %s", rasd['InstanceID'],
+ exp_rasd.InstanceID)
status = FAIL
if status != PASS:
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/SettingsDefine/02_reverse.py
--- a/suites/libvirt-cim/cimtest/SettingsDefine/02_reverse.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/SettingsDefine/02_reverse.py Fri Feb 06 01:45:10 2009 -0800
@@ -104,7 +104,7 @@
for rasd in rasd_list:
guest, dev, status = parse_instance_id(rasd.InstanceID)
if status != PASS:
- logger.error("Unable to parse InstanceID: %s" % rasd.InstanceID)
+ logger.error("Unable to parse InstanceID: %s", rasd.InstanceID)
return rasd_insts, FAIL
if guest == guest_name:
@@ -124,7 +124,7 @@
for dev in dev_list:
guest, dev_id, status = parse_instance_id(dev.DeviceID)
if status != PASS:
- logger.error("Unable to parse InstanceID: %s" % dev.DeviceID)
+ logger.error("Unable to parse InstanceID: %s", dev.DeviceID)
return dev_insts, FAIL
if guest == guest_name:
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/SettingsDefine/03_sds_fwd_errs.py
--- a/suites/libvirt-cim/cimtest/SettingsDefine/03_sds_fwd_errs.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/SettingsDefine/03_sds_fwd_errs.py Fri Feb 06 01:45:10 2009 -0800
@@ -200,7 +200,7 @@
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)
+ logger.error("------ FAILED: %s------", field)
name_val[i] = temp
return ret_val
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py
--- a/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Fri Feb 06 01:45:10 2009 -0800
@@ -82,7 +82,7 @@
try:
instance = enumclass.GetInstance(ip, pool_class, key_list)
except Exception, detail:
- logger.error(CIM_ERROR_GETINSTANCE, '%s' % pool_class)
+ logger.error(CIM_ERROR_GETINSTANCE, '%s', pool_class)
logger.error("Exception: %s", detail)
sys.exit(FAIL)
return instance
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/SystemDevice/01_forward.py
--- a/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py Fri Feb 06 01:45:10 2009 -0800
@@ -63,7 +63,7 @@
ret = cxml.create(server)
if not ret:
- logger.error('Unable to create domain %s' % test_dom)
+ logger.error('Unable to create domain %s', test_dom)
return FAIL
sd_classname = get_typed_class(virt, 'SystemDevice')
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py
--- a/suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py Fri Feb 06 01:45:10 2009 -0800
@@ -63,7 +63,7 @@
try:
devs = enumclass.EnumInstances(options.ip, cn)
except Exception, detail:
- logger.error("Exception: %s" % detail)
+ logger.error("Exception: %s", detail)
cxml.destroy(options.ip)
cxml.undefine(options.ip)
return FAIL
@@ -81,7 +81,7 @@
SystemName=dev.SystemName,
SystemCreationClassName=dev.SystemCreationClassName)
except Exception, detail:
- logger.error("Exception: %s" % detail)
+ logger.error("Exception: %s", detail)
cxml.destroy(options.ip)
cxml.undefine(options.ip)
return FAIL
@@ -92,7 +92,7 @@
cxml.undefine(options.ip)
return FAIL
elif len(systems) != 1:
- logger.error("%s systems returned, expected 1" % len(systems))
+ logger.error("%s systems returned, expected 1", len(systems))
cxml.destroy(options.ip)
cxml.undefine(options.ip)
return FAIL
@@ -106,9 +106,9 @@
if system.Name == test_dom:
status = PASS
- logger.info("Examined %s %s" % (system.Name, dev.DeviceID))
+ logger.info("Examined %s %s", system.Name, dev.DeviceID)
else:
- logger.error("Association returned wrong system: %s" %
+ logger.error("Association returned wrong system: %s",
system.Name)
cxml.destroy(options.ip)
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/SystemDevice/03_fwderrs.py
--- a/suites/libvirt-cim/cimtest/SystemDevice/03_fwderrs.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/SystemDevice/03_fwderrs.py Fri Feb 06 01:45:10 2009 -0800
@@ -101,7 +101,7 @@
names[item] = ("DeviceID" , dev.DeviceID )
except Exception, details:
- logger.info("Exception %s for class %s" % (details , item))
+ logger.info("Exception %s for class %s", details , item)
return FAIL
if len(name) <=0 or len(names) <= 0:
@@ -150,10 +150,10 @@
if ((rc != exp_rc1 and desc.find(exp_desc1) <= 0) and
(rc != exp_rc2 and desc.find(exp_desc2) <= 0)):
status = FAIL
- logger.info("Class = %s , key = %s , keyval = %s " \
- % (item, i , keyval))
- logger.info("Unexpected rc %s and desc %s for %s"
- % (rc, desc, item))
+ logger.info("Class = %s , key = %s , keyval = %s ",
+ item, i, keyval)
+ logger.info("Unexpected rc %s and desc %s for %s",
+ rc, desc, item)
except Exception, details:
logger.info("Unknown exception happened")
@@ -162,8 +162,8 @@
if rc == 0:
logger.info("Success returned for wrong key and ID")
- logger.info("Class = %s , key = %s , keyval = %s " %
- (item, i , keyval))
+ logger.info("Class = %s , key = %s , keyval = %s ",
+ item, i , keyval)
return XFAIL_RC(bug)
except Exception, details:
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/VSSD/01_enum.py
--- a/suites/libvirt-cim/cimtest/VSSD/01_enum.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VSSD/01_enum.py Fri Feb 06 01:45:10 2009 -0800
@@ -67,28 +67,28 @@
break
if found == 1:
if vssd.ElementName != test_dom:
- logger.error("Invalid ElementName- expecting %s, go %s" %
+ logger.error("Invalid ElementName- expecting %s, go %s",
test_dom, vssd.ElementName)
vsxml.undefine(options.ip)
return FAIL
- logger.info("Examining VSSD class for the Guest %s" % test_dom)
+ logger.info("Examining VSSD class for the Guest %s", test_dom)
try:
name = vssd.ElementName
idx = live_cs.index(name)
del live_cs[idx]
except BaseException, details:
- logger.error("Exception %s" % details)
- logger.error("Provider reports VSSD `%s', but xm does not" %
+ logger.error("Exception %s", details)
+ logger.error("Provider reports VSSD `%s', but xm does not",
vssd.ElementName)
status = FAIL
else:
- logger.error("Missing VSSD instance for the system %s " % test_dom)
+ logger.error("Missing VSSD instance for the system %s ", test_dom)
status = FAIL
except BaseException, details:
- logger.error("Exception %s" % details)
+ logger.error("Exception %s", details)
status = FAIL
vsxml.undefine(options.ip)
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/VSSD/02_bootldr.py
--- a/suites/libvirt-cim/cimtest/VSSD/02_bootldr.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VSSD/02_bootldr.py Fri Feb 06 01:45:10 2009 -0800
@@ -66,14 +66,14 @@
name = system.ElementName
if name == test_dom :
if system.Bootloader == bootldr :
- logger.info("BootLoader for domain %s is %s" % (name, bootldr ))
+ logger.info("BootLoader for domain %s is %s", name, bootldr)
status = 0
else:
- logger.error("Bootloader is not set for VS %s" % test_dom)
+ logger.error("Bootloader is not set for VS %s", test_dom)
status = 1
except Exception, detail :
- logger.error("Exception : %s" % detail)
+ logger.error("Exception : %s", detail)
status = 1
xmlfile.undefine(options.ip)
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py
--- a/suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py Fri Feb 06 01:45:10 2009 -0800
@@ -101,7 +101,7 @@
# When no records are found.
if ret != PASS:
- logger.error("%s with %s was not returned" % (classname, exp_val))
+ logger.error("%s with %s was not returned", classname, exp_val)
status = FAIL
# We expect only one record to be returned.
@@ -153,7 +153,7 @@
InstanceID = instIdval)
if len(vssdc_assoc_info) == 1 and \
vssdc_assoc_info[0].classname == 'LXC_MemResourceAllocationSettingData':
- logger.info("%s returned expect objects" % assoc_cname)
+ logger.info("%s returned expect objects", assoc_cname)
elif len(vssdc_assoc_info) < 4:
logger.error("%s returned %i %s objects, expected 4",
assoc_cname, len(vssdc_assoc_info), qcn)
@@ -161,7 +161,7 @@
except Exception, details:
logger.error(CIM_ERROR_ASSOCIATORS, assoc_cname)
- logger.error("Exception : %s" % details)
+ logger.error("Exception : %s", details)
status = FAIL
return status, vssdc_assoc_info
@@ -202,7 +202,7 @@
logger.error("Mistmatching %s values", CCName )
break
except Exception, detail :
- logger.error("Exception in verify_rasd_values function: %s" % detail)
+ logger.error("Exception in verify_rasd_values function: %s", detail)
status = FAIL
return status
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/VirtualSystemManagementService/01_definesystem_name.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/01_definesystem_name.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/01_definesystem_name.py Fri Feb 06 01:45:10 2009 -0800
@@ -39,12 +39,12 @@
ret = cxml.cim_define(options.ip)
if not ret:
- logger.error("Unable to define %s" % default_dom)
+ logger.error("Unable to define %s", default_dom)
return FAIL
status = cxml.cim_start(options.ip)
if status != PASS:
- logger.error("Failed to start the defined domain: %s" % default_dom)
+ logger.error("Failed to start the defined domain: %s", default_dom)
cxml.cim_destroy(options.ip)
cxml.undefine(options.ip)
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/VirtualSystemManagementService/02_destroysystem.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/02_destroysystem.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/02_destroysystem.py Fri Feb 06 01:45:10 2009 -0800
@@ -76,7 +76,7 @@
list_after = domain_list(options.ip, options.virt)
if default_dom in list_after:
- logger.error("Domain %s not destroyed: provider didn't return error" % \
+ logger.error("Domain %s not destroyed: provider didn't return error",
default_dom)
cleanup_env(options.ip, cxml)
status = FAIL
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/VirtualSystemManagementService/05_destroysystem_neg.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/05_destroysystem_neg.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/05_destroysystem_neg.py Fri Feb 06 01:45:10 2009 -0800
@@ -73,7 +73,7 @@
logger.info('Got expected error desc: %s',err_desc)
return PASS
- logger.error('destroy_fail>> %s: Error executing DestroySystem' % tc)
+ logger.error('destroy_fail>> %s: Error executing DestroySystem', tc)
logger.error(details)
return FAIL
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/VirtualSystemManagementService/07_addresource_neg.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/07_addresource_neg.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/07_addresource_neg.py Fri Feb 06 01:45:10 2009 -0800
@@ -57,7 +57,7 @@
bad_inst = 'instance of what ever { dd = 3; //\ ]&'
ret = service.AddResourceSettings(AffectedConfiguration=vssd_ref,
ResourceSettings=[bad_inst])
- logger.info('ret[0] = %s' % ret[0])
+ logger.info('ret[0] = %s', ret[0])
if ret[0] == None:
logger.error('AddRS should NOT return OK with wrong RS input')
rc = 0
@@ -66,8 +66,8 @@
logger.info('Got expected rc code and error string.')
status = PASS
else:
- logger.error('Unexpected rc code %s and description:\n %s' %
- (rc, desc))
+ logger.error('Unexpected rc code %s and description:\n %s',
+ rc, desc)
status = FAIL
except Exception, details:
logger.error('Error invoking AddRS')
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py Fri Feb 06 01:45:10 2009 -0800
@@ -104,7 +104,7 @@
status = check_proc_sched(options.ip, options.virt)
if status != PASS:
- raise Exception("%s CPU scheduling not set properly", default_dom)
+ raise Exception("%s CPU scheduling not set properly" % default_dom)
status = PASS
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/VirtualSystemManagementService/10_hv_version.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/10_hv_version.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/10_hv_version.py Fri Feb 06 01:45:10 2009 -0800
@@ -50,14 +50,14 @@
local_ver = get_hv_ver(options.ip, options.virt)
if cim_ver != local_ver:
- logger.error("CIM says version is `%s', but libvirt says `%s'" \
- % (cim_ver, local_ver))
+ logger.error("CIM says version is `%s', but libvirt says `%s'",
+ cim_ver, local_ver)
if options.virt == 'LXC':
return XFAIL_RC(bug_libvirt)
else:
return FAIL
else:
- logger.info("Verified %s == %s" % (cim_ver, local_ver))
+ logger.info("Verified %s == %s", cim_ver, local_ver)
except Exception, details:
logger.error(details)
return FAIL
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py Fri Feb 06 01:45:10 2009 -0800
@@ -67,7 +67,7 @@
ret = cxml.cim_define(options.ip)
if not ret:
- logger.error("DefineSystem with (%s) units failed" % units)
+ logger.error("DefineSystem with (%s) units failed", units)
return FAIL
return PASS
@@ -94,10 +94,10 @@
cim_kb = int(the_rasd["VirtualQuantity"])
if cim_kb != mem_kb:
- logger.error("CIM reports %i KB instead of %i KB" % (cim_kb, mem_kb))
+ logger.error("CIM reports %i KB instead of %i KB", cim_kb, mem_kb)
return FAIL
- logger.info("Verified %i KB" % mem_kb)
+ logger.info("Verified %i KB", mem_kb)
return PASS
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/VirtualSystemManagementService/12_referenced_config.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/12_referenced_config.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/12_referenced_config.py Fri Feb 06 01:45:10 2009 -0800
@@ -50,12 +50,12 @@
def setup_first_guest(ip, virt, cxml):
ret = cxml.cim_define(ip)
if not ret:
- logger.error("Unable to define %s using DefineSystem()" % test_dom)
+ logger.error("Unable to define %s using DefineSystem()", test_dom)
return FAIL, None
status = cxml.cim_start(ip)
if status != PASS:
- logger.error("Unable to start %s" % test_dom)
+ logger.error("Unable to start %s", test_dom)
return FAIL, "define"
return PASS, "start"
@@ -98,7 +98,7 @@
ret = cxml2.cim_define(ip, ref_conf=ref)
if not ret:
- logger.error("Unable to define %s using DefineSystem()" % test_dom2)
+ logger.error("Unable to define %s using DefineSystem()", test_dom2)
return FAIL, None
return PASS, "define"
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/VirtualSystemManagementService/13_refconfig_additional_devs.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/13_refconfig_additional_devs.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/13_refconfig_additional_devs.py Fri Feb 06 01:45:10 2009 -0800
@@ -60,33 +60,33 @@
def verify_no_dups(ip, virt, cxml, dom):
if cxml.xml_get_disk_source() != cxml.dasd.Address:
- logger.error("%s: Exp disk source %s" % (dom, cxml.dasd.Address))
+ logger.error("%s: Exp disk source %s", dom, cxml.dasd.Address)
return FAIL
if cxml.xml_get_disk_dev() != cxml.dasd.VirtualDevice:
- logger.error("%s: Exp disk dev %s" % (dom, cxml.dasd.VirtualDevice))
+ logger.error("%s: Exp disk dev %s", dom, cxml.dasd.VirtualDevice)
return FAIL
if cxml.xml_get_net_type() != cxml.nasd.NetworkType:
- logger.error("%s: Exp net type %d" % (dom, cxml.nasd.NetworkType))
+ logger.error("%s: Exp net type %d", dom, cxml.nasd.NetworkType)
return FAIL
if cxml.xml_get_net_mac() != cxml.nasd.Address:
- logger.error("%s: Exp net mac %s" % (dom, cxml.nasd.Address))
+ logger.error("%s: Exp net mac %s", dom, cxml.nasd.Address)
return FAIL
vcpus = cxml.xml_get_vcpu()
if not vcpus.isdigit():
- logger.error("Unable to get vcpus value for %s" % dom)
+ logger.error("Unable to get vcpus value for %s", dom)
return FAIL
if int(vcpus) != cxml.pasd.VirtualQuantity:
- logger.error("%s: Exp vcpus %s" % (dom, cxml.pasd.VirtualQuantity))
+ logger.error("%s: Exp vcpus %s", dom, cxml.pasd.VirtualQuantity)
return FAIL
mem = cxml.xml_get_mem()
if not mem.isdigit():
- logger.error("Unable to get mem value for %s" % dom)
+ logger.error("Unable to get mem value for %s", dom)
return FAIL
if cxml.masd.AllocationUnits == "Bytes":
@@ -107,7 +107,7 @@
exp_mem <<= shift
if int(mem) != exp_mem:
- logger.error("%s: Exp mem %s" % (dom, exp_mem))
+ logger.error("%s: Exp mem %s", dom, exp_mem)
return FAIL
return PASS
@@ -123,7 +123,7 @@
try:
rc = cxml.cim_define(options.ip)
if not rc:
- logger.error("Unable define domain %s" % test_dom)
+ logger.error("Unable define domain %s", test_dom)
raise Exception("Unable to define domain %s" % test_dom)
ref = get_vssd_ref(options.ip, options.virt)
@@ -132,7 +132,7 @@
rc = cxml2.cim_define(options.ip, ref_conf=ref)
if not rc:
- logger.error("Unable define domain %s" % test_dom2)
+ logger.error("Unable define domain %s", test_dom2)
raise Exception("Unable to define %s" % test_dom2)
rc = call_request_state_change(test_dom2, options.ip,
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/VirtualSystemMigrationService/01_migratable_host.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/01_migratable_host.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/01_migratable_host.py Fri Feb 06 01:45:10 2009 -0800
@@ -48,7 +48,7 @@
cxml = virt_xml(guest_name)
ret = cxml.create(ip)
if not ret:
- logger.error("Error create domain %s" % guest_name)
+ logger.error("Error create domain %s", guest_name)
return FAIL, None, cxml
status, dom_cs = poll_for_state_change(ip, virt, guest_name,
@@ -104,8 +104,8 @@
status, ret = migrate_guest_to_host(service, cs_ref, target_ip)
if status == FAIL:
- logger.error("MigrateVirtualSystemToHost: unexpected list length %s"
- % len(ret))
+ logger.error("MigrateVirtualSystemToHost: unexpected list length %s",
+ len(ret))
cxml.destroy(options.ip)
cxml.undefine(options.ip)
return status
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/VirtualSystemMigrationService/02_host_migrate_type.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/02_host_migrate_type.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/02_host_migrate_type.py Fri Feb 06 01:45:10 2009 -0800
@@ -46,7 +46,7 @@
cxml = virt_xml(guest_name)
cxml.cim_define(ip)
except Exception:
- logger.error("Error define domain %s" % guest_name)
+ logger.error("Error define domain %s", guest_name)
return FAIL, None
classname = 'Xen_ComputerSystem'
@@ -106,7 +106,7 @@
return FAIL, None
except Exception:
- logger.error("Error start domain %s" % guest_name)
+ logger.error("Error start domain %s", guest_name)
return FAIL, None
return PASS, cxml
@@ -156,11 +156,11 @@
break
logger.info("Migrating guest with the following options:")
- logger.info("%s" % item)
+ logger.info("%s", item)
status, ret = migrate_guest_to_host(service, cs_ref, target_ip, item)
if status == FAIL:
- logger.error("MigrateVirtualSystemToHost: unexpected list length %s"
- % len(ret))
+ logger.error("MigrateVirtualSystemToHost: unexpected list length %s",
+ len(ret))
cxml.destroy(options.ip)
cxml.undefine(options.ip)
return status
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/VirtualSystemMigrationService/05_migratable_host_errs.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/05_migratable_host_errs.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/05_migratable_host_errs.py Fri Feb 06 01:45:10 2009 -0800
@@ -43,13 +43,13 @@
cxml = virt_xml(test_dom)
ret = cxml.cim_define(server)
if not ret:
- logger.error("Error define domain %s" % test_dom )
+ logger.error("Error define domain %s", test_dom )
return FAIL
status = cxml.cim_start(server)
if status != PASS:
cxml.undefine(server)
- logger.error("Error start domain %s" % test_dom )
+ logger.error("Error start domain %s", test_dom )
return status
status = FAIL
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/01_forward.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/01_forward.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/01_forward.py Fri Feb 06 01:45:10 2009 -0800
@@ -116,16 +116,16 @@
try:
if len(assoc_info) != 1:
- logger.error("%s returned %i resource objects for '%s'" % \
- (an, len(assoc_info), cn))
+ logger.error("%s returned %i resource objects for '%s'",
+ an, len(assoc_info), cn)
return FAIL
status = compare_all_prop(assoc_info[0], vssd)
if status != PASS:
logger.error("Properties of inst returned by %s didn't \
- match expected" % assoc_info[0].classname)
+ match expected", assoc_info[0].classname)
return FAIL
except Exception, detail :
- logger.error("Exception in assoc_values function: %s" % detail)
+ logger.error("Exception in assoc_values function: %s", detail)
return FAIL
return PASS
@@ -166,12 +166,12 @@
try:
vssd = enumclass.GetInstance(options.ip, vssd_cn, key_list)
if vssd is None:
- logger.error("VSSD instance for %s not found" % test_dom)
+ logger.error("VSSD instance for %s not found", test_dom)
cxml.undefine(options.ip)
return FAIL
except Exception, detail :
logger.error(Globals.CIM_ERROR_GETINSTANCE, vssd_cn)
- logger.error("Exception : %s" % detail)
+ logger.error("Exception : %s", detail)
cxml.undefine(options.ip)
return FAIL
@@ -191,7 +191,7 @@
except Exception, detail :
logger.error(Globals.CIM_ERROR_ASSOCIATORS, an)
- logger.error("Exception : %s" % detail)
+ logger.error("Exception : %s", detail)
status = FAIL
cxml.undefine(options.ip)
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py Fri Feb 06 01:45:10 2009 -0800
@@ -70,7 +70,7 @@
return FAIL
except Exception, detail :
- logger.error("Exception evaluating InstanceID: %s" % detail)
+ logger.error("Exception evaluating InstanceID: %s", detail)
return FAIL
return PASS
@@ -139,7 +139,7 @@
break
except Exception, detail :
- logger.error("Exception in assoc_values function: %s" % detail)
+ logger.error("Exception in assoc_values function: %s", detail)
status = FAIL
return status
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/03_vssdc_fwd_errs.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/03_vssdc_fwd_errs.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/03_vssdc_fwd_errs.py Fri Feb 06 01:45:10 2009 -0800
@@ -116,13 +116,13 @@
ret = cxml.cim_define(options.ip)
if not ret:
- logger.error('Unable to define domain %s' % test_dom)
+ logger.error('Unable to define domain %s', test_dom)
return FAIL
status = cxml.cim_start(options.ip)
if status != PASS:
cxml.undefine(options.ip)
- logger.error('Unable to start domain %s' % test_dom)
+ logger.error('Unable to start domain %s', test_dom)
return FAIL
global conn
diff -r 3fc2b8a20333 -r 80572f08898a suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/04_vssdc_rev_errs.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/04_vssdc_rev_errs.py Thu Feb 05 01:19:43 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/04_vssdc_rev_errs.py Fri Feb 06 01:45:10 2009 -0800
@@ -109,13 +109,13 @@
ret = cxml.cim_define(options.ip)
if not ret:
- logger.error('Unable to define domain %s' % test_dom)
+ logger.error('Unable to define domain %s', test_dom)
return FAIL
status = cxml.cim_start(options.ip)
if status != PASS:
cxml.undefine(options.ip)
- logger.error('Unable to start domain %s' % test_dom)
+ logger.error('Unable to start domain %s', test_dom)
return FAIL
global conn
1
0
06 Feb '09
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1233823927 28800
# Node ID 4bb5b4c89bfddc67ef4872bda474356df4e1694a
# Parent edfa908a60d058c7f1ba7394bd1d818999802287
[TEST] Update test cases to follow the new coding style
1) Use commas instead of percent signs when passing parameters to logger.error() and logger.info()
2) Use percents When passing parameters to Exception()
Tested for KVM/LXC with current sources
Signed-off-by: Guolian Yun<yunguol(a)cn.ibm.com>
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/AllocationCapabilities/01_enum.py
--- a/suites/libvirt-cim/cimtest/AllocationCapabilities/01_enum.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/AllocationCapabilities/01_enum.py Thu Feb 05 00:52:07 2009 -0800
@@ -76,13 +76,13 @@
for inst in ac:
id = inst.InstanceID
if pools[id].ResourceType != inst.ResourceType:
- logger.error("%s ResourceType %s, Pool ResourceType %s" % (cn,
- inst.ResourceType, pools[id].ResourceType))
+ logger.error("%s ResourceType %s, Pool ResourceType %s",
+ cn, inst.ResourceType, pools[id].ResourceType)
return FAIL
except Exception, details:
- logger.error("%s returned instance with unexpected InstanceID %s" % (cn,
- details))
+ logger.error("%s returned instance with unexpected InstanceID %s",
+ cn, details)
return FAIL
return PASS
@@ -106,7 +106,7 @@
return status
if len(ac) != len(pools):
- logger.error("%d %s insts != %d pool insts" % (len(ac), cn, len(pools)))
+ logger.error("%d %s insts != %d pool insts", len(ac), cn, len(pools))
return FAIL
status = compare_pool_to_ac(ac, pools, cn)
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py
--- a/suites/libvirt-cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py Thu Feb 05 00:52:07 2009 -0800
@@ -62,7 +62,7 @@
for ac in enum_list:
pool, id, status = parse_instance_id(ac.InstanceID)
if status != PASS:
- logger.error("Unable to parse InstanceID: %s" % ac.InstanceID)
+ logger.error("Unable to parse InstanceID: %s", ac.InstanceID)
return ac_ids, FAIL
ac_ids.append("%s/invalid_id" % pool)
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Thu Feb 05 00:52:07 2009 -0800
@@ -49,12 +49,12 @@
del live_cs[idx]
except ValueError, detail:
Globals.logger.error("Provider reports system `%s', \
-but virsh does not" % name)
+but virsh does not", name)
status = FAIL
for system in live_cs:
Globals.logger.error("Provider does not report system `%s', \
-but virsh does" % system)
+but virsh does", system)
status = FAIL
except IndexError, detail:
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py Thu Feb 05 00:52:07 2009 -0800
@@ -60,7 +60,7 @@
return FAIL
if len(cs) != 0:
- logger.error("%s returned %d instead of empty list" % (cn, len(cs)))
+ logger.error("%s returned %d instead of empty list", cn, len(cs))
status = FAIL
else:
status = PASS
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/ComputerSystem/03_defineVS.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/03_defineVS.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/03_defineVS.py Thu Feb 05 00:52:07 2009 -0800
@@ -46,7 +46,7 @@
cxml = vxml.get_class(options.virt)(test_dom)
rc = cxml.cim_define(options.ip)
if not rc:
- Globals.logger.error(VIRSH_ERROR_DEFINE % test_dom)
+ Globals.logger.error(VIRSH_ERROR_DEFINE, test_dom)
return status
cs_class = get_typed_class(options.virt, 'ComputerSystem')
@@ -74,7 +74,7 @@
Globals.logger.error("Exception: %s", detail)
if status != PASS :
- Globals.logger.error("Error: property values are not set for VS %s" % test_dom)
+ Globals.logger.error("Error: property values are not set for VS %s", test_dom)
cxml.undefine(options.ip)
return status
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/ComputerSystem/04_defineStartVS.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/04_defineStartVS.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/04_defineStartVS.py Thu Feb 05 00:52:07 2009 -0800
@@ -47,12 +47,12 @@
try:
ret = cxml.cim_define(options.ip)
if not ret:
- logger.error("Unable to define %s" % test_dom)
+ logger.error("Unable to define %s", test_dom)
return FAIL
status = cxml.cim_start(options.ip)
if status != PASS:
- logger.error("Failed to Start the dom: %s" % test_dom)
+ logger.error("Failed to Start the dom: %s", test_dom)
logger.error("Property values not set properly for %s", test_dom)
except Exception, detail:
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py Thu Feb 05 00:52:07 2009 -0800
@@ -70,7 +70,7 @@
raise Exception("%s not in expected state" % test_dom)
except Exception, detail:
- logger.error("Exception: %s" % detail)
+ logger.error("Exception: %s", detail)
status = FAIL
cxml.cim_destroy(options.ip)
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/ComputerSystem/06_paused_active_suspend.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/06_paused_active_suspend.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/06_paused_active_suspend.py Thu Feb 05 00:52:07 2009 -0800
@@ -77,7 +77,7 @@
raise Exception("%s not in expected state" % test_dom)
except Exception, detail:
- logger.error("Exception variable: %s" % detail)
+ logger.error("Exception variable: %s", detail)
status = FAIL
cxml.destroy(server)
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/ComputerSystem/22_define_suspend.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/22_define_suspend.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/22_define_suspend.py Thu Feb 05 00:52:07 2009 -0800
@@ -53,14 +53,14 @@
# suspend the vs
status = cxml.cim_suspend(options.ip)
if status != PASS:
- logger.info("Suspending defined %s failed, as expected" % test_dom)
+ logger.info("Suspending defined %s failed, as expected", test_dom)
status = PASS
else:
raise Exception("Suspending defined %s should have failed" % \
test_dom)
except Exception, detail:
- logger.error("Error: %s" % detail)
+ logger.error("Error: %s", detail)
status = FAIL
cxml.undefine(options.ip)
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/ComputerSystem/41_cs_to_settingdefinestate.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/41_cs_to_settingdefinestate.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/41_cs_to_settingdefinestate.py Thu Feb 05 00:52:07 2009 -0800
@@ -121,7 +121,7 @@
for rasd in rasd_list:
guest, dev, status = parse_instance_id(rasd.InstanceID)
if status != PASS:
- logger.error("Unable to parse InstanceID: %s" % rasd.InstanceID)
+ logger.error("Unable to parse InstanceID: %s", rasd.InstanceID)
return rasd_insts, FAIL
if guest == test_dom:
@@ -272,7 +272,7 @@
status, cs_assoc_info = get_associators_info(server, cn, an,
cs_class, instid)
if status != PASS:
- raise Exception("Failed to get assoc info for dom: %s", test_dom)
+ raise Exception("Failed to get assoc info for dom: %s" % test_dom)
# verify the results of SettingsDefineState with the cs_values list
# that was built using the output of the GetInstance on ComputerSystem.
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/ComputerSystemIndication/01_created_indication.py
--- a/suites/libvirt-cim/cimtest/ComputerSystemIndication/01_created_indication.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystemIndication/01_created_indication.py Thu Feb 05 00:52:07 2009 -0800
@@ -58,7 +58,7 @@
dict['default_sysname'],
port)
sub.subscribe(dict['default_url'], dict['default_auth'])
- logger.info("Watching for %s" % iname)
+ logger.info("Watching for %s", iname)
ind_names[ind] = ind_name
sub_list[ind] = sub
@@ -98,12 +98,12 @@
if str(sub.server.indications[0]) == ind_name:
sub.unsubscribe(dict['default_auth'])
- logger.info("Cancelling subscription for %s" % ind_name)
+ logger.info("Cancelling subscription for %s", ind_name)
return PASS
else:
sub.server.indications.remove(sub.server.indications[0])
- logger.error("Did not recieve indication %s" % ind_name)
+ logger.error("Did not recieve indication %s", ind_name)
return FAIL
def poll_for_ind(pid, ind_name):
@@ -129,7 +129,7 @@
logger.error("Waited too long for %s indication", ind_name)
kill(pid, SIGKILL)
else:
- logger.error("Received indication error: %d" % pw[1])
+ logger.error("Received indication error: %d", pw[1])
status = FAIL
break
@@ -174,13 +174,13 @@
raise Exception(details)
except Exception, details:
- logger.error("Exception: %s" % details)
+ logger.error("Exception: %s", details)
status = FAIL
#Make sure all subscriptions are really unsubscribed
for ind, sub in sub_list.iteritems():
sub.unsubscribe(dict['default_auth'])
- logger.info("Cancelling subscription for %s" % ind_names[ind])
+ logger.info("Cancelling subscription for %s", ind_names[ind])
cxml.undefine(ip)
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/ElementAllocatedFromPool/01_forward.py
--- a/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/01_forward.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/01_forward.py Thu Feb 05 00:52:07 2009 -0800
@@ -67,11 +67,11 @@
inst = GetInstance(server, cn_name, key_list)
except Exception, details:
- logger.error("Exception %s" % details)
+ logger.error("Exception %s", details)
return None
if inst is None:
- logger.error("Expected at least one %s instance" % cn_name)
+ logger.error("Expected at least one %s instance", cn_name)
return None
return inst
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py
--- a/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Thu Feb 05 00:52:07 2009 -0800
@@ -130,7 +130,7 @@
elec = assoc.AssociatorNames(server, an, ccn, Name = system,
CreationClassName = ccn)
except Exception:
- logger.error(CIM_ERROR_ASSOCIATORNAMES % system)
+ logger.error(CIM_ERROR_ASSOCIATORNAMES, system)
cxml.undefine(server)
return FAIL
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py
--- a/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Thu Feb 05 00:52:07 2009 -0800
@@ -57,7 +57,7 @@
def filter(list, cn, exp_result):
new_list = assoc.filter_by_result_class(list, cn)
if len(new_list) != exp_result:
- logger.error("Expected %d host, got %d" % (exp_result, len(new_list)))
+ logger.error("Expected %d host, got %d", exp_result, len(new_list))
return FAIL, new_list
return PASS, new_list
@@ -154,7 +154,7 @@
cxml = virtxml(test_dom)
ret = cxml.cim_define(options.ip)
if not ret:
- logger.error("Failed to define the dom: %s" % test_dom)
+ logger.error("Failed to define the dom: %s", test_dom)
return FAIL
cs = domain_list(options.ip, options.virt)
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py
--- a/suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py Thu Feb 05 00:52:07 2009 -0800
@@ -51,14 +51,14 @@
logger.info("Got expected rc code and error string")
status = PASS
else:
- logger.error("Unexpected rc code %s and description %s\n" %(rc, desc))
+ logger.error("Unexpected rc code %s and description %s\n", rc, desc)
except Exception, details:
logger.error("Unknown exception happened")
logger.error(details)
if rc == 0:
logger.error("ElementCapabilities associator should NOT return excepted \
- result with a wrong key name and value of %s input" % ref_class)
+ result with a wrong key name and value of %s input", ref_class)
status = FAIL
return status
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/ElementCapabilities/04_reverse_errs.py
--- a/suites/libvirt-cim/cimtest/ElementCapabilities/04_reverse_errs.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ElementCapabilities/04_reverse_errs.py Thu Feb 05 00:52:07 2009 -0800
@@ -50,14 +50,14 @@
logger.info("Got expected rc code and error string")
status = PASS
else:
- logger.error("Unexpected rc code %s and description %s\n" %(rc, desc))
+ logger.error("Unexpected rc code %s and description %s\n", rc, desc)
except Exception, details:
logger.error("Unknown exception happened")
logger.error(details)
if rc == 0:
logger.error("ElementCapabilities associator should NOT return excepted result \
- with a wrong key name and value of %s input" % ref_class)
+ with a wrong key name and value of %s input", ref_class)
status = FAIL
return status
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/ElementCapabilities/05_hostsystem_cap.py
--- a/suites/libvirt-cim/cimtest/ElementCapabilities/05_hostsystem_cap.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ElementCapabilities/05_hostsystem_cap.py Thu Feb 05 00:52:07 2009 -0800
@@ -76,7 +76,7 @@
break
if ret != PASS:
- logger.error("%s with %s was not returned" % (cn, exp_val))
+ logger.error("%s with %s was not returned", cn, exp_val)
status = FAIL
return status, inst
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/ElementConforms/01_forward.py
--- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Thu Feb 05 00:52:07 2009 -0800
@@ -151,13 +151,13 @@
cxml = virt_xml(test_dom)
ret = cxml.cim_define(server)
if not ret:
- logger.error('Unable to define domain %s' % test_dom)
+ logger.error('Unable to define domain %s', test_dom)
return FAIL
ret = cxml.start(server)
if not ret:
cxml.undefine(server)
- logger.error('Unable to start domain %s' % test_dom)
+ logger.error('Unable to start domain %s', test_dom)
return FAIL
prev_namespace = Globals.CIM_NS
@@ -201,7 +201,7 @@
raise Exception("%s items weren't returned: %s" % (key, list))
except Exception, detail:
- logger.error("Exception: %s" % detail)
+ logger.error("Exception: %s", detail)
status = FAIL
Globals.CIM_NS = prev_namespace
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py
--- a/suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py Thu Feb 05 00:52:07 2009 -0800
@@ -93,7 +93,7 @@
ret = cxml.cim_define(server)
if not ret:
- logger.error("ERROR: Failed to Define the dom: %s" % test_dom)
+ logger.error("ERROR: Failed to Define the dom: %s", test_dom)
return status
inst_list = {}
@@ -102,7 +102,7 @@
if rc != 0:
cs = libvirt_cached_data_poll(server, virt, test_dom)
if sys is None:
- logger.error("Instance for %s not created" % test_dom)
+ logger.error("Instance for %s not created", test_dom)
cxml.undefine(server)
return FAIL
@@ -116,7 +116,7 @@
return status
except Exception, details:
- logger.error("DEBUG Exception: %s" % details)
+ logger.error("DEBUG Exception: %s", details)
cxml.undefine(server)
return FAIL
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/ElementConforms/03_ectp_fwd_errs.py
--- a/suites/libvirt-cim/cimtest/ElementConforms/03_ectp_fwd_errs.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ElementConforms/03_ectp_fwd_errs.py Thu Feb 05 00:52:07 2009 -0800
@@ -84,7 +84,7 @@
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)
+ logger.error("------ FAILED: %s------", field)
name_val[i] = temp
return ret_val
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py
--- a/suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py Thu Feb 05 00:52:07 2009 -0800
@@ -125,7 +125,7 @@
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)
+ logger.error("------ FAILED: %s------", field)
name_val[i] = temp
return ret_val
@@ -142,7 +142,7 @@
cxml = virt_xml(test_dom)
ret = cxml.cim_define(options.ip)
if not ret:
- logger.error('Unable to define domain %s' % test_dom)
+ logger.error('Unable to define domain %s', test_dom)
return FAIL
hs = get_typed_class(options.virt, "HostSystem")
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py
--- a/suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py Thu Feb 05 00:52:07 2009 -0800
@@ -72,11 +72,11 @@
inst = GetInstance(ip, cn, key_list)
except Exception, details:
- logger.error("Exception %s" % details)
+ logger.error("Exception %s", details)
return None
if inst is None:
- logger.error("Expected at least one %s instance" % cn)
+ logger.error("Expected at least one %s instance", cn)
return None
return inst
@@ -167,7 +167,7 @@
for cn, inst in inst_list.iteritems():
status = test_assoc(options.ip, esd_cn, cn, options.virt, inst)
if status != PASS:
- logger.error("Unable to get %s insts from %s" % (cn, esd_cn))
+ logger.error("Unable to get %s insts from %s", cn, esd_cn)
break
cxml.undefine(options.ip)
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/ElementSettingData/03_esd_assoc_with_rasd_errs.py
--- a/suites/libvirt-cim/cimtest/ElementSettingData/03_esd_assoc_with_rasd_errs.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ElementSettingData/03_esd_assoc_with_rasd_errs.py Thu Feb 05 00:52:07 2009 -0800
@@ -88,7 +88,7 @@
cxml = virtxml(test_dom, mac = test_mac)
ret = cxml.create(options.ip)
if not ret:
- logger.error("Failed to Create the dom: %s" % test_dom)
+ logger.error("Failed to Create the dom: %s", test_dom)
status = FAIL
return status
if options.virt == "XenFV":
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/HostSystem/01_enum.py
--- a/suites/libvirt-cim/cimtest/HostSystem/01_enum.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/HostSystem/01_enum.py Thu Feb 05 00:52:07 2009 -0800
@@ -50,7 +50,7 @@
try:
hs = enumclass.EnumInstances(options.ip, name)
except Exception, details:
- logger.error("%s %s: %s" % (CIM_ERROR_ENUMERATE, name, details))
+ logger.error("%s %s: %s", CIM_ERROR_ENUMERATE, name, details)
status = FAIL
if ret == PASS:
@@ -60,25 +60,25 @@
else:
if linux_cs.CreationClassName != 'Linux_ComputerSystem'\
or linux_cs.Name != host:
- logger.error("Exp Linux_ComputerSystem, got %s" \
- % linux_cs.CreationClassName)
- logger.error("Exp %s, got %s" % (host, system.Name))
+ logger.error("Exp Linux_ComputerSystem, got %s",
+ linux_cs.CreationClassName)
+ logger.error("Exp %s, got %s", host, system.Name)
return FAIL
else:
return PASS
else:
if len(hs) != 1:
- logger.error("Expected 1 %s instance returned" % name)
+ logger.error("Expected 1 %s instance returned", name)
return FAIL
system = hs[0]
if system.CreationClassName != name or system.Name != host:
- logger.error("Exp %s, got %s" % (name, system.CreationClassName))
- logger.error("Exp %s, got %s" % (host, system.Name))
+ logger.error("Exp %s, got %s", name, system.CreationClassName)
+ logger.error("Exp %s, got %s", host, system.Name)
status = FAIL
else:
- logger.info("%s is %s" % (name, host))
+ logger.info("%s is %s", name, host)
status = PASS
return status
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py
--- a/suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py Thu Feb 05 00:52:07 2009 -0800
@@ -96,7 +96,7 @@
return status, vsxml_info
def print_err(err, detail, cn):
- logger.error(err % cn)
+ logger.error(err, cn)
logger.error("Exception: %s", detail)
def get_inst_from_list(server, cn, cs_list, filter_name, exp_val, vsxml):
@@ -109,7 +109,7 @@
break
if ret != PASS:
- logger.error("%s with %s was not returned" % (cn, exp_val))
+ logger.error("%s with %s was not returned", cn, exp_val)
vsxml.undefine(server)
status = FAIL
@@ -165,7 +165,7 @@
SystemCreationClassName = sccn)
if len(assoc_info) != 1:
- logger.error("%s returned %i %s objects" % (an, len(assoc_info), cn))
+ logger.error("%s returned %i %s objects", an, len(assoc_info), cn)
status = FAIL
break
index = (len(assoc_info) - 1)
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py
--- a/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Thu Feb 05 00:52:07 2009 -0800
@@ -73,7 +73,7 @@
return status, vsxml
def print_err(err, detail, cn):
- logger.error(err % cn)
+ logger.error(err, cn)
logger.error("Exception: %s", detail)
def get_inst_from_list(cn, qcn, list, filter, exp_val):
@@ -82,7 +82,7 @@
inst = None
if len(list) < 1:
- logger.error("%s returned %i %s objects" % (qcn, len(list), cn))
+ logger.error("%s returned %i %s objects", qcn, len(list), cn)
return FAIL, None
for inst in list:
@@ -92,7 +92,7 @@
if ret != PASS:
status = FAIL
- logger.error("%s with %s was not returned" % (cn, exp_val))
+ logger.error("%s with %s was not returned", cn, exp_val)
return status, inst
@@ -107,7 +107,7 @@
logger.error("Hostname mismatch")
except Exception, detail:
- logger.error("Exception in %s : %s" % (cn, detail))
+ logger.error("Exception in %s : %s", cn, detail)
status = FAIL
return status, host_inst.Name, host_inst.CreationClassName
@@ -236,7 +236,7 @@
if status != PASS:
return status
else:
- logger.error("Unexpected instance type %s" % cn)
+ logger.error("Unexpected instance type %s", cn)
return FAIL
except Exception, detail:
@@ -248,10 +248,10 @@
def check_rasd_vals(inst, rt):
try:
if inst['ResourceType'] != rt:
- logger.error("In ResourceType for %s " % rt)
+ logger.error("In ResourceType for %s ", rt)
return FAIL
except Exception, detail:
- logger.error("Error checking RASD attribute values %s" % detail)
+ logger.error("Error checking RASD attribute values %s", detail)
return FAIL
return PASS
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py
--- a/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py Thu Feb 05 00:52:07 2009 -0800
@@ -194,8 +194,8 @@
def check_len(an, assoc_list_info, qcn, exp_len):
if len(assoc_list_info) < exp_len:
- logger.error("%s returned %i %s objects" % (an,
- len(assoc_list_info), qcn))
+ logger.error("%s returned %i %s objects",
+ an, len(assoc_list_info), qcn)
return FAIL
return PASS
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/HostSystem/06_hs_to_vsms.py
--- a/suites/libvirt-cim/cimtest/HostSystem/06_hs_to_vsms.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/HostSystem/06_hs_to_vsms.py Thu Feb 05 00:52:07 2009 -0800
@@ -56,7 +56,7 @@
sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
def print_err(err, detail, cn):
- logger.error(err % cn)
+ logger.error(err, cn)
logger.error("Exception: %s", detail)
def print_field_error(fieldname, ret_value, exp_value):
@@ -76,7 +76,7 @@
# When no records are found.
if ret != PASS:
- logger.error("%s with %s was not returned" % (cn, exp_val))
+ logger.error("%s with %s was not returned", cn, exp_val)
status = FAIL
return status, inst
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/HostedDependency/02_reverse.py
--- a/suites/libvirt-cim/cimtest/HostedDependency/02_reverse.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/HostedDependency/02_reverse.py Thu Feb 05 00:52:07 2009 -0800
@@ -72,12 +72,12 @@
ret = cxml.cim_define(server)
if not ret:
- logger.error("Failed to define the dom: %s" % test_dom)
+ logger.error("Failed to define the dom: %s", test_dom)
return FAIL
rc = call_request_state_change(test_dom, server, 2, TIME, virt)
if rc != 0:
- logger.error("Failed to start the dom: %s" % test_dom)
+ logger.error("Failed to start the dom: %s", test_dom)
cxml.undefine(server)
return FAIL
@@ -126,7 +126,7 @@
if guest["Name"] in cs_names:
cs_names.remove(guest["Name"])
else:
- logger.error("HostedDependency returned unexpected guest %s" %
+ logger.error("HostedDependency returned unexpected guest %s",
guest["Name"])
status = FAIL
@@ -140,7 +140,7 @@
# not being returned by HostedDependency
for guest in cs_names:
- logger.error("HostedDependency did not return expected guest %s" %
+ logger.error("HostedDependency did not return expected guest %s",
guest["Name"])
status = FAIL
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/HostedDependency/03_enabledstate.py
--- a/suites/libvirt-cim/cimtest/HostedDependency/03_enabledstate.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/HostedDependency/03_enabledstate.py Thu Feb 05 00:52:07 2009 -0800
@@ -80,7 +80,7 @@
except Exception, detail:
logger.error(CIM_ERROR_GETINSTANCE, 'ComputerSystem')
- logger.error("Exception: %s" % detail)
+ logger.error("Exception: %s", detail)
status = FAIL
return status, dom_field_list
@@ -113,18 +113,18 @@
ret = cxml.cim_define(server)
if not ret:
- logger.error("Failed to define the dom: %s" % test_dom)
+ logger.error("Failed to define the dom: %s", test_dom)
return FAIL
rc = call_request_state_change(test_dom, server, 2, TIME, virt)
if rc != 0:
- logger.error("Failed to start the dom: %s" % test_dom)
+ logger.error("Failed to start the dom: %s", test_dom)
cxml.undefine(server)
return FAIL
rc = call_request_state_change(test_dom, server, 9, TIME, virt)
if rc != 0:
- logger.error("Failed to suspend the dom: %s" % test_dom)
+ logger.error("Failed to suspend the dom: %s", test_dom)
cxml.destroy(server)
cxml.undefine(server)
@@ -181,7 +181,7 @@
except Exception, detail:
logger.error(CIM_ERROR_ASSOCIATORS,'HostedDependency')
- logger.error("Exception: %s" % detail)
+ logger.error("Exception: %s", detail)
status = FAIL
cxml.destroy(server)
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/HostedDependency/04_reverse_errs.py
--- a/suites/libvirt-cim/cimtest/HostedDependency/04_reverse_errs.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/HostedDependency/04_reverse_errs.py Thu Feb 05 00:52:07 2009 -0800
@@ -91,7 +91,7 @@
ret = cxml.create(server)
if not ret:
- logger.error("Failed to Create the dom: %s" % test_dom)
+ logger.error("Failed to Create the dom: %s", test_dom)
return FAIL
conn = assoc.myWBEMConnection('http://%s' % server,
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py
--- a/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Thu Feb 05 00:52:07 2009 -0800
@@ -58,7 +58,7 @@
Name = host_sys,
CreationClassName = host_cn)
except Exception, details:
- logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES % assoc_cn)
+ logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES, assoc_cn)
logger.error("Exception:", details)
return FAIL
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py
--- a/suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py Thu Feb 05 00:52:07 2009 -0800
@@ -64,7 +64,7 @@
try:
assoc_host = AssociatorNames(options.ip, assoc_cn, k, InstanceID=v)
except Exception:
- logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES % assoc_cn)
+ logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES, assoc_cn)
return FAIL
if len(assoc_host) == 1:
if assoc_host[0].keybindings['Name'] != host_sys:
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/HostedService/01_forward.py
--- a/suites/libvirt-cim/cimtest/HostedService/01_forward.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/HostedService/01_forward.py Thu Feb 05 00:52:07 2009 -0800
@@ -58,7 +58,7 @@
Name = host_name)
except Exception, deatils:
- logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES % host_name)
+ logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES, host_name)
logger.error("Exception: details %s", details)
return FAIL
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/LogicalDisk/01_disk.py
--- a/suites/libvirt-cim/cimtest/LogicalDisk/01_disk.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/LogicalDisk/01_disk.py Thu Feb 05 00:52:07 2009 -0800
@@ -58,11 +58,11 @@
status = 0
if dev.Name != test_dev:
- logger.error("Name should be `%s' instead of `%s'" % (test_dev, dev.Name))
+ logger.error("Name should be `%s' instead of `%s'", test_dev, dev.Name)
status = 1
if status == 0:
- logger.info("Checked device %s" % dev.Name)
+ logger.info("Checked device %s", dev.Name)
vsxml.undefine(options.ip)
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/LogicalDisk/02_nodevs.py
--- a/suites/libvirt-cim/cimtest/LogicalDisk/02_nodevs.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/LogicalDisk/02_nodevs.py Thu Feb 05 00:52:07 2009 -0800
@@ -69,7 +69,7 @@
return FAIL
if len(devs) != 0:
- logger.error("%s returned %d instead of empty list" % (cn, len(devs)))
+ logger.error("%s returned %d instead of empty list", cn, len(devs))
status = FAIL
else:
status = PASS
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/Memory/01_memory.py
--- a/suites/libvirt-cim/cimtest/Memory/01_memory.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/Memory/01_memory.py Thu Feb 05 00:52:07 2009 -0800
@@ -63,11 +63,11 @@
capacity = dev.ConsumableBlocks * dev.BlockSize / 1024
if capacity != alloc_mem:
- logger.error("Capacity should be %i MB instead of %i MB" % (alloc_mem, capacity))
+ logger.error("Capacity should be %i MB instead of %i MB", alloc_mem, capacity)
status = 1
if status == 0:
- logger.info("Checked memory capacity: %s MB" % capacity)
+ logger.info("Checked memory capacity: %s MB", capacity)
vsxml.undefine(options.ip)
return status
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/Memory/02_defgetmem.py
--- a/suites/libvirt-cim/cimtest/Memory/02_defgetmem.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/Memory/02_defgetmem.py Thu Feb 05 00:52:07 2009 -0800
@@ -76,7 +76,7 @@
raise Exception("Memory inst for %s not as expected." % default_dom)
except Exception, detail:
- logger.error("Exception: %s" % detail)
+ logger.error("Exception: %s", detail)
status = FAIL
cxml.undefine(options.ip)
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/NetworkPort/01_netport.py
--- a/suites/libvirt-cim/cimtest/NetworkPort/01_netport.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/NetworkPort/01_netport.py Thu Feb 05 00:52:07 2009 -0800
@@ -80,12 +80,12 @@
dev = GetInstance(options.ip, net_class, key_list)
except Exception, detail:
- logger.error("Exception: %s" % detail)
+ logger.error("Exception: %s", detail)
vsxml.undefine(options.ip)
return FAIL
if dev.DeviceID == None:
- logger.error("Error retrieving instance for devid %s" % devid)
+ logger.error("Error retrieving instance for devid %s", devid)
vsxml.undefine(options.ip)
return FAIL
@@ -94,23 +94,23 @@
link_tech = get_linktech(options.ip, options.virt)
if dev.LinkTechnology != link_tech:
- logger.error("LinkTechnology should be set to `%i' instead of `%s'" % \
- (link_tech, dev.LinkTechnology))
+ logger.error("LinkTechnology should be set to `%i' instead of `%s'",
+ link_tech, dev.LinkTechnology)
status = FAIL
addrs = dev.NetworkAddresses
if len(addrs) != 1:
- logger.error("Too many NetworkAddress entries (%i instead of %i)" % \
- (len(addrs), 1))
+ logger.error("Too many NetworkAddress entries (%i instead of %i)",
+ len(addrs), 1)
status = FAIL
if addrs[0] != test_mac:
- logger.error("MAC address reported incorrectly (%s instead of %s)" % \
- (addrs[0], test_mac))
+ logger.error("MAC address reported incorrectly (%s instead of %s)",
+ addrs[0], test_mac)
status = FAIL
if status == FAIL:
- logger.error("Checked interface %s" % test_mac)
+ logger.error("Checked interface %s", test_mac)
vsxml.undefine(options.ip)
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/NetworkPort/03_user_netport.py
--- a/suites/libvirt-cim/cimtest/NetworkPort/03_user_netport.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/NetworkPort/03_user_netport.py Thu Feb 05 00:52:07 2009 -0800
@@ -45,7 +45,7 @@
cxml = KVMXML(test_dom, mac = test_mac, ntype='user')
ret = cxml.cim_define(options.ip)
if not ret:
- logger.error('Unable to define domain %s' % test_dom)
+ logger.error('Unable to define domain %s', test_dom)
return FAIL
devid = "%s/%s" % (test_dom, test_mac)
@@ -59,7 +59,7 @@
try:
dev = GetInstance(options.ip, 'KVM_NetworkPort', key_list)
except Exception, detail:
- logger.error("Exception: %s" % detail)
+ logger.error("Exception: %s", detail)
cxml.undefine(options.ip)
return FAIL
@@ -73,17 +73,17 @@
addrs = dev.NetworkAddresses
if len(addrs) != 1:
- logger.error("Too many NetworkAddress entries (%i instead of %i)" % \
- (len(addrs), 1))
+ logger.error("Too many NetworkAddress entries (%i instead of %i)",
+ len(addrs), 1)
status = FAIL
if addrs[0] != test_mac:
- logger.error("MAC address reported incorrectly (%s instead of %s)" % \
- (addrs[0], test_mac))
+ logger.error("MAC address reported incorrectly (%s instead of %s)",
+ addrs[0], test_mac)
status = FAIL
if status == FAIL:
- logger.error("Checked interface %s" % test_mac)
+ logger.error("Checked interface %s", test_mac)
cxml.undefine(options.ip)
return status
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/Processor/01_processor.py
--- a/suites/libvirt-cim/cimtest/Processor/01_processor.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/Processor/01_processor.py Thu Feb 05 00:52:07 2009 -0800
@@ -64,11 +64,11 @@
try:
dev = GetInstance(options.ip, proc_class, key_list)
if dev.DeviceID == devid:
- logger.info("Checked device %s" % devid)
+ logger.info("Checked device %s", devid)
else:
- logger.error("Mismatching device, returned %s instead %s" % (dev.DeviceID, devid))
+ logger.error("Mismatching device, returned %s instead %s", dev.DeviceID, devid)
except Exception, details:
- logger.error("Error check device %s: %s" % (devid, details))
+ logger.error("Error check device %s: %s", devid, details)
status = 1
vsxml.stop(options.ip)
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/Processor/02_definesys_get_procs.py
--- a/suites/libvirt-cim/cimtest/Processor/02_definesys_get_procs.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/Processor/02_definesys_get_procs.py Thu Feb 05 00:52:07 2009 -0800
@@ -86,7 +86,7 @@
% default_dom)
except Exception, detail:
- logger.error("Exception: %s" % detail)
+ logger.error("Exception: %s", detail)
status = FAIL
cxml.undefine(options.ip)
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/Profile/01_enum.py
--- a/suites/libvirt-cim/cimtest/Profile/01_enum.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/Profile/01_enum.py Thu Feb 05 00:52:07 2009 -0800
@@ -66,16 +66,16 @@
x.RegisteredName, x.RegisteredVersion] for x in proflist]
for exp_prof in explist:
if exp_prof in checklist:
- logger.info("Profile %s found" % exp_prof[0])
+ logger.info("Profile %s found", exp_prof[0])
else:
- logger.error("Profile %s is not found" % exp_prof[0])
+ logger.error("Profile %s is not found", exp_prof[0])
status = FAIL
break
if status == PASS:
- logger.info("Properties check for %s passed" % cn)
+ logger.info("Properties check for %s passed", cn)
else:
- logger.error("Properties check for %s failed" % cn)
+ logger.error("Properties check for %s failed", cn)
return status
if __name__ == "__main__":
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/Profile/02_profile_to_elec.py
--- a/suites/libvirt-cim/cimtest/Profile/02_profile_to_elec.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/Profile/02_profile_to_elec.py Thu Feb 05 00:52:07 2009 -0800
@@ -63,18 +63,18 @@
rc = csxml_info.cim_define(server)
if not rc:
- logger.error("Unable define domain %s using DefineSystem() " % test_dom)
+ logger.error("Unable define domain %s using DefineSystem() ", test_dom)
status = FAIL
except Exception, detail:
- logger.error("Exception defining domain %s" % test_dom)
+ logger.error("Exception defining domain %s", test_dom)
logger.error("Exception: %s", detail)
status = FAIL
return status, csxml_info
def print_err(err, detail, cn):
- logger.error(err % cn)
+ logger.error(err, cn)
logger.error("Exception: %s", detail)
def get_expected_inst(cn, list, property, exp):
@@ -84,7 +84,7 @@
return PASS, x
except Exception:
pass
- logger.error("%s with %s was not returned" % (cn, exp))
+ logger.error("%s with %s was not returned", cn, exp)
return FAIL, None
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/RedirectionService/03_RedirectionSAP_errs.py
--- a/suites/libvirt-cim/cimtest/RedirectionService/03_RedirectionSAP_errs.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/RedirectionService/03_RedirectionSAP_errs.py Thu Feb 05 00:52:07 2009 -0800
@@ -140,7 +140,7 @@
if status != PASS:
- logger.error(" -------------- FAILED %s ----------- : " % test_val)
+ logger.error(" -------------- FAILED %s ----------- : ", test_val)
break
cxml.cim_destroy(options.ip)
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py
--- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py Thu Feb 05 00:52:07 2009 -0800
@@ -82,7 +82,7 @@
for rasd in rasd_list:
guest, dev, status = parse_instance_id(rasd.InstanceID)
if status != PASS:
- logger.error("Unable to parse InstanceID: %s" % rasd.InstanceID)
+ logger.error("Unable to parse InstanceID: %s", rasd.InstanceID)
return rasd_insts, FAIL
if guest == guest_name:
@@ -108,7 +108,7 @@
for inst in list:
guest, id, status = parse_instance_id(inst.InstanceID)
if status != PASS:
- logger.error("Unable to parse InstanceID: %s" % inst.InstanceID)
+ logger.error("Unable to parse InstanceID: %s", inst.InstanceID)
return None, FAIL
if id == exp_id:
@@ -169,8 +169,8 @@
if rasd['InstanceID'] == exp_rasd.InstanceID:
status = PASS
else:
- logger.info("Got %s instead of %s" % (rasd['InstanceID'],
- exp_rasd.InstanceID))
+ logger.info("Got %s instead of %s", rasd['InstanceID'],
+ exp_rasd.InstanceID)
status = FAIL
if status != PASS:
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py
--- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py Thu Feb 05 00:52:07 2009 -0800
@@ -81,7 +81,7 @@
for rasd in rasd_list:
guest, dev, status = parse_instance_id(rasd.InstanceID)
if status != PASS:
- logger.error("Unable to parse InstanceID: %s" % rasd.InstanceID)
+ logger.error("Unable to parse InstanceID: %s", rasd.InstanceID)
return rasd_insts, FAIL
if guest == guest_name:
@@ -107,7 +107,7 @@
for inst in list:
guest, id, status = parse_instance_id(inst.InstanceID)
if status != PASS:
- logger.error("Unable to parse InstanceID: %s" % inst.InstanceID)
+ logger.error("Unable to parse InstanceID: %s", inst.InstanceID)
return None, FAIL
if id == exp_id:
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/ResourceAllocationFromPool/03_forward_errs.py
--- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/03_forward_errs.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/03_forward_errs.py Thu Feb 05 00:52:07 2009 -0800
@@ -65,13 +65,15 @@
logger.info("Got excepted rc code and error string")
status = PASS
else:
- logger.error("Unexpected rc code %s and description %s\n" %(rc, desc))
+ logger.error("Unexpected rc code %s and description %s\n", rc, desc)
except Exception, details:
logger.error("Unknown exception happened")
logger.error(details)
if rc == 0:
- logger.error("ResourceAllocationFromPool associator should NOT return excepted result with a wrong InstanceID value of %s input" %k)
+ logger.error("ResourceAllocationFromPool associator should NOT \
+ return excepted result with a wrong InstanceID \
+ value of %s input", k)
status = FAIL
return status
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/ResourceAllocationFromPool/04_reverse_errs.py
--- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/04_reverse_errs.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/04_reverse_errs.py Thu Feb 05 00:52:07 2009 -0800
@@ -63,13 +63,16 @@
logger.info("Got excepted rc code and error string")
status = PASS
else:
- logger.error("Unexpected rc code %s and description %s\n" %(rc, desc))
+ logger.error("Unexpected rc code %s and description %s\n",
+ rc, desc)
except Exception, details:
logger.error("Unknown exception happened")
logger.error(details)
if rc == 0:
- logger.error("ResourceAllocationSettingData should NOT return excepted result with a wrong InstanceID value of %s input" %k)
+ logger.error("ResourceAllocationSettingData should NOT return \
+ excepted result with a wrong InstanceID \
+ value of %s input", k)
status = FAIL
return status
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/ResourceAllocationFromPool/05_RAPF_err.py
--- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/05_RAPF_err.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/05_RAPF_err.py Thu Feb 05 00:52:07 2009 -0800
@@ -101,7 +101,7 @@
ret = PASS
if ret != PASS:
- logger.error("%s with %s was not returned" % (classname, exp_val))
+ logger.error("%s with %s was not returned", classname, exp_val)
vsxml.undefine(server)
status = FAIL
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/ResourcePool/01_enum.py
--- a/suites/libvirt-cim/cimtest/ResourcePool/01_enum.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ResourcePool/01_enum.py Thu Feb 05 00:52:07 2009 -0800
@@ -79,8 +79,8 @@
def verify_fields(pool_list, poolname, cn):
status = PASS
if len(poolname) < 1:
- logger.error("%s return %i instances, expected atleast 1 instance" \
- % (cn, len(poolname)))
+ logger.error("%s return %i instances, expected atleast 1 instance",
+ cn, len(poolname))
return FAIL
exp_value = pool_list[cn][0]
for i in range(0, len(poolname)):
@@ -119,14 +119,14 @@
try:
mempool = EnumInstances(ip, mp)
except Exception:
- logger.error(Globals.CIM_ERROR_ENUMERATE % mp)
+ logger.error(Globals.CIM_ERROR_ENUMERATE, mp)
return FAIL
status = verify_fields(pool_list, mempool, mp)
try:
propool = EnumInstances(ip, pp)
except Exception:
- logger.error(Globals.CIM_ERROR_ENUMERATE % pp)
+ logger.error(Globals.CIM_ERROR_ENUMERATE, pp)
return FAIL
status = verify_fields(pool_list, propool, pp)
@@ -134,14 +134,14 @@
try:
diskpool = EnumInstances(ip, dp)
except Exception:
- logger.error(Globals.CIM_ERROR_ENUMERATE % dp)
+ logger.error(Globals.CIM_ERROR_ENUMERATE, dp)
return FAIL
status = verify_fields(pool_list, diskpool, dp)
try:
netpool = EnumInstances(ip, np)
except Exception:
- logger.error(Globals.CIM_ERROR_ENUMERATE % np)
+ logger.error(Globals.CIM_ERROR_ENUMERATE, np)
return FAIL
status = verify_fields(pool_list, netpool, np)
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/ResourcePoolConfigurationCapabilities/01_enum.py
--- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationCapabilities/01_enum.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationCapabilities/01_enum.py Thu Feb 05 00:52:07 2009 -0800
@@ -43,7 +43,7 @@
if len(rpcc) != 1:
Globals.logger.error("%s_ResourcePoolConfigurationCapabilities return %i instances, \
- excepted only 1 instance" % (options.virt, len(rpcc)))
+ excepted only 1 instance", options.virt, len(rpcc))
return FAIL
if rpcc[0].InstanceID != "RPCC":
Globals.logger.error("error result of enum ResourcePoolConfigurationCapabilities")
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/01_enum.py
--- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/01_enum.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/01_enum.py Thu Feb 05 00:52:07 2009 -0800
@@ -51,7 +51,7 @@
try:
rpcservice = rpcs.enumerate(server, classname)
except Exception:
- logger.error(Globals.CIM_ERROR_ENUMERATE % classname)
+ logger.error(Globals.CIM_ERROR_ENUMERATE, classname)
return FAIL
valid_service = {"Name" : "RPCS",
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py
--- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Thu Feb 05 00:52:07 2009 -0800
@@ -72,8 +72,8 @@
logger.info("Error string is '%s'", desc)
return PASS
else:
- logger.error("Unexpected rc code %s and description %s\n" \
- %(err_no, desc))
+ logger.error("Unexpected rc code %s and description %s\n",
+ err_no, desc)
return FAIL
logger.error("The execution should not have reached here!!")
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/05_AddResourcesToResourcePool.py
--- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/05_AddResourcesToResourcePool.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/05_AddResourcesToResourcePool.py Thu Feb 05 00:52:07 2009 -0800
@@ -72,8 +72,8 @@
logger.info("Error string is '%s'", desc)
return PASS
else:
- logger.error("Unexpected rc code %s and description %s\n" \
- %(err_no, desc))
+ logger.error("Unexpected rc code %s and description %s\n",
+ err_no, desc)
print desc
return XFAIL_RC(bug)
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/06_RemoveResourcesFromResourcePool.py
--- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/06_RemoveResourcesFromResourcePool.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/06_RemoveResourcesFromResourcePool.py Thu Feb 05 00:52:07 2009 -0800
@@ -70,8 +70,8 @@
logger.info("Error string is '%s'", desc)
return PASS
else:
- logger.error("Unexpected rc code %s and description %s\n" \
- %(err_no, desc))
+ logger.error("Unexpected rc code %s and description %s\n",
+ err_no, desc)
return FAIL
logger.error("The execution should not have reached here!!")
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py
--- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py Thu Feb 05 00:52:07 2009 -0800
@@ -66,8 +66,8 @@
logger.info("Error string is '%s'", desc)
return PASS
else:
- logger.error("Unexpected rc code %s and description %s\n" \
- %(err_no, desc))
+ logger.error("Unexpected rc code %s and description %s\n",
+ err_no, desc)
return FAIL
logger.error("The execution should not have reached here!!")
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/SettingsDefine/01_forward.py
--- a/suites/libvirt-cim/cimtest/SettingsDefine/01_forward.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/SettingsDefine/01_forward.py Thu Feb 05 00:52:07 2009 -0800
@@ -77,7 +77,7 @@
for dev in dev_list:
guest, dev_id, status = parse_instance_id(dev.DeviceID)
if status != PASS:
- logger.error("Unable to parse InstanceID: %s" % dev.DeviceID)
+ logger.error("Unable to parse InstanceID: %s", dev.DeviceID)
return dev_insts, FAIL
if guest == guest_name:
@@ -102,7 +102,7 @@
for rasd in rasd_list:
guest, dev, status = parse_instance_id(rasd.InstanceID)
if status != PASS:
- logger.error("Unable to parse InstanceID: %s" % rasd.InstanceID)
+ logger.error("Unable to parse InstanceID: %s", rasd.InstanceID)
return rasd_insts, FAIL
if guest == guest_name:
@@ -126,8 +126,8 @@
if rasd['InstanceID'] == exp_rasd.InstanceID:
status = PASS
else:
- logger.info("Got %s instead of %s" % (rasd['InstanceID'],
- exp_rasd.InstanceID))
+ logger.info("Got %s instead of %s", rasd['InstanceID'],
+ exp_rasd.InstanceID)
status = FAIL
if status != PASS:
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/SettingsDefine/02_reverse.py
--- a/suites/libvirt-cim/cimtest/SettingsDefine/02_reverse.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/SettingsDefine/02_reverse.py Thu Feb 05 00:52:07 2009 -0800
@@ -104,7 +104,7 @@
for rasd in rasd_list:
guest, dev, status = parse_instance_id(rasd.InstanceID)
if status != PASS:
- logger.error("Unable to parse InstanceID: %s" % rasd.InstanceID)
+ logger.error("Unable to parse InstanceID: %s", rasd.InstanceID)
return rasd_insts, FAIL
if guest == guest_name:
@@ -124,7 +124,7 @@
for dev in dev_list:
guest, dev_id, status = parse_instance_id(dev.DeviceID)
if status != PASS:
- logger.error("Unable to parse InstanceID: %s" % dev.DeviceID)
+ logger.error("Unable to parse InstanceID: %s", dev.DeviceID)
return dev_insts, FAIL
if guest == guest_name:
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/SettingsDefine/03_sds_fwd_errs.py
--- a/suites/libvirt-cim/cimtest/SettingsDefine/03_sds_fwd_errs.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/SettingsDefine/03_sds_fwd_errs.py Thu Feb 05 00:52:07 2009 -0800
@@ -200,7 +200,7 @@
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)
+ logger.error("------ FAILED: %s------", field)
name_val[i] = temp
return ret_val
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py
--- a/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Thu Feb 05 00:52:07 2009 -0800
@@ -82,7 +82,7 @@
try:
instance = enumclass.GetInstance(ip, pool_class, key_list)
except Exception, detail:
- logger.error(CIM_ERROR_GETINSTANCE, '%s' % pool_class)
+ logger.error(CIM_ERROR_GETINSTANCE, '%s', pool_class)
logger.error("Exception: %s", detail)
sys.exit(FAIL)
return instance
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/SystemDevice/01_forward.py
--- a/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py Thu Feb 05 00:52:07 2009 -0800
@@ -63,7 +63,7 @@
ret = cxml.create(server)
if not ret:
- logger.error('Unable to create domain %s' % test_dom)
+ logger.error('Unable to create domain %s', test_dom)
return FAIL
sd_classname = get_typed_class(virt, 'SystemDevice')
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py
--- a/suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py Thu Feb 05 00:52:07 2009 -0800
@@ -63,7 +63,7 @@
try:
devs = enumclass.EnumInstances(options.ip, cn)
except Exception, detail:
- logger.error("Exception: %s" % detail)
+ logger.error("Exception: %s", detail)
cxml.destroy(options.ip)
cxml.undefine(options.ip)
return FAIL
@@ -81,7 +81,7 @@
SystemName=dev.SystemName,
SystemCreationClassName=dev.SystemCreationClassName)
except Exception, detail:
- logger.error("Exception: %s" % detail)
+ logger.error("Exception: %s", detail)
cxml.destroy(options.ip)
cxml.undefine(options.ip)
return FAIL
@@ -92,7 +92,7 @@
cxml.undefine(options.ip)
return FAIL
elif len(systems) != 1:
- logger.error("%s systems returned, expected 1" % len(systems))
+ logger.error("%s systems returned, expected 1", len(systems))
cxml.destroy(options.ip)
cxml.undefine(options.ip)
return FAIL
@@ -106,9 +106,9 @@
if system.Name == test_dom:
status = PASS
- logger.info("Examined %s %s" % (system.Name, dev.DeviceID))
+ logger.info("Examined %s %s", system.Name, dev.DeviceID)
else:
- logger.error("Association returned wrong system: %s" %
+ logger.error("Association returned wrong system: %s",
system.Name)
cxml.destroy(options.ip)
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/SystemDevice/03_fwderrs.py
--- a/suites/libvirt-cim/cimtest/SystemDevice/03_fwderrs.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/SystemDevice/03_fwderrs.py Thu Feb 05 00:52:07 2009 -0800
@@ -101,7 +101,7 @@
names[item] = ("DeviceID" , dev.DeviceID )
except Exception, details:
- logger.info("Exception %s for class %s" % (details , item))
+ logger.info("Exception %s for class %s", details , item)
return FAIL
if len(name) <=0 or len(names) <= 0:
@@ -150,10 +150,10 @@
if ((rc != exp_rc1 and desc.find(exp_desc1) <= 0) and
(rc != exp_rc2 and desc.find(exp_desc2) <= 0)):
status = FAIL
- logger.info("Class = %s , key = %s , keyval = %s " \
- % (item, i , keyval))
- logger.info("Unexpected rc %s and desc %s for %s"
- % (rc, desc, item))
+ logger.info("Class = %s , key = %s , keyval = %s ",
+ item, i, keyval)
+ logger.info("Unexpected rc %s and desc %s for %s",
+ rc, desc, item)
except Exception, details:
logger.info("Unknown exception happened")
@@ -162,8 +162,8 @@
if rc == 0:
logger.info("Success returned for wrong key and ID")
- logger.info("Class = %s , key = %s , keyval = %s " %
- (item, i , keyval))
+ logger.info("Class = %s , key = %s , keyval = %s ",
+ item, i , keyval)
return XFAIL_RC(bug)
except Exception, details:
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/VSSD/01_enum.py
--- a/suites/libvirt-cim/cimtest/VSSD/01_enum.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VSSD/01_enum.py Thu Feb 05 00:52:07 2009 -0800
@@ -67,28 +67,28 @@
break
if found == 1:
if vssd.ElementName != test_dom:
- logger.error("Invalid ElementName- expecting %s, go %s" %
+ logger.error("Invalid ElementName- expecting %s, go %s",
test_dom, vssd.ElementName)
vsxml.undefine(options.ip)
return FAIL
- logger.info("Examining VSSD class for the Guest %s" % test_dom)
+ logger.info("Examining VSSD class for the Guest %s", test_dom)
try:
name = vssd.ElementName
idx = live_cs.index(name)
del live_cs[idx]
except BaseException, details:
- logger.error("Exception %s" % details)
- logger.error("Provider reports VSSD `%s', but xm does not" %
+ logger.error("Exception %s", details)
+ logger.error("Provider reports VSSD `%s', but xm does not",
vssd.ElementName)
status = FAIL
else:
- logger.error("Missing VSSD instance for the system %s " % test_dom)
+ logger.error("Missing VSSD instance for the system %s ", test_dom)
status = FAIL
except BaseException, details:
- logger.error("Exception %s" % details)
+ logger.error("Exception %s", details)
status = FAIL
vsxml.undefine(options.ip)
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/VSSD/02_bootldr.py
--- a/suites/libvirt-cim/cimtest/VSSD/02_bootldr.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VSSD/02_bootldr.py Thu Feb 05 00:52:07 2009 -0800
@@ -66,14 +66,14 @@
name = system.ElementName
if name == test_dom :
if system.Bootloader == bootldr :
- logger.info("BootLoader for domain %s is %s" % (name, bootldr ))
+ logger.info("BootLoader for domain %s is %s", name, bootldr)
status = 0
else:
- logger.error("Bootloader is not set for VS %s" % test_dom)
+ logger.error("Bootloader is not set for VS %s", test_dom)
status = 1
except Exception, detail :
- logger.error("Exception : %s" % detail)
+ logger.error("Exception : %s", detail)
status = 1
xmlfile.undefine(options.ip)
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py
--- a/suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py Thu Feb 05 00:52:07 2009 -0800
@@ -101,7 +101,7 @@
# When no records are found.
if ret != PASS:
- logger.error("%s with %s was not returned" % (classname, exp_val))
+ logger.error("%s with %s was not returned", classname, exp_val)
status = FAIL
# We expect only one record to be returned.
@@ -153,7 +153,7 @@
InstanceID = instIdval)
if len(vssdc_assoc_info) == 1 and \
vssdc_assoc_info[0].classname == 'LXC_MemResourceAllocationSettingData':
- logger.info("%s returned expect objects" % assoc_cname)
+ logger.info("%s returned expect objects", assoc_cname)
elif len(vssdc_assoc_info) < 4:
logger.error("%s returned %i %s objects, expected 4",
assoc_cname, len(vssdc_assoc_info), qcn)
@@ -161,7 +161,7 @@
except Exception, details:
logger.error(CIM_ERROR_ASSOCIATORS, assoc_cname)
- logger.error("Exception : %s" % details)
+ logger.error("Exception : %s", details)
status = FAIL
return status, vssdc_assoc_info
@@ -202,7 +202,7 @@
logger.error("Mistmatching %s values", CCName )
break
except Exception, detail :
- logger.error("Exception in verify_rasd_values function: %s" % detail)
+ logger.error("Exception in verify_rasd_values function: %s", detail)
status = FAIL
return status
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/VirtualSystemManagementService/01_definesystem_name.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/01_definesystem_name.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/01_definesystem_name.py Thu Feb 05 00:52:07 2009 -0800
@@ -39,12 +39,12 @@
ret = cxml.cim_define(options.ip)
if not ret:
- logger.error("Unable to define %s" % default_dom)
+ logger.error("Unable to define %s", default_dom)
return FAIL
status = cxml.cim_start(options.ip)
if status != PASS:
- logger.error("Failed to start the defined domain: %s" % default_dom)
+ logger.error("Failed to start the defined domain: %s", default_dom)
cxml.cim_destroy(options.ip)
cxml.undefine(options.ip)
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/VirtualSystemManagementService/02_destroysystem.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/02_destroysystem.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/02_destroysystem.py Thu Feb 05 00:52:07 2009 -0800
@@ -76,7 +76,7 @@
list_after = domain_list(options.ip, options.virt)
if default_dom in list_after:
- logger.error("Domain %s not destroyed: provider didn't return error" % \
+ logger.error("Domain %s not destroyed: provider didn't return error",
default_dom)
cleanup_env(options.ip, cxml)
status = FAIL
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/VirtualSystemManagementService/05_destroysystem_neg.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/05_destroysystem_neg.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/05_destroysystem_neg.py Thu Feb 05 00:52:07 2009 -0800
@@ -73,7 +73,7 @@
logger.info('Got expected error desc: %s',err_desc)
return PASS
- logger.error('destroy_fail>> %s: Error executing DestroySystem' % tc)
+ logger.error('destroy_fail>> %s: Error executing DestroySystem', tc)
logger.error(details)
return FAIL
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/VirtualSystemManagementService/07_addresource_neg.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/07_addresource_neg.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/07_addresource_neg.py Thu Feb 05 00:52:07 2009 -0800
@@ -57,7 +57,7 @@
bad_inst = 'instance of what ever { dd = 3; //\ ]&'
ret = service.AddResourceSettings(AffectedConfiguration=vssd_ref,
ResourceSettings=[bad_inst])
- logger.info('ret[0] = %s' % ret[0])
+ logger.info('ret[0] = %s', ret[0])
if ret[0] == None:
logger.error('AddRS should NOT return OK with wrong RS input')
rc = 0
@@ -66,8 +66,8 @@
logger.info('Got expected rc code and error string.')
status = PASS
else:
- logger.error('Unexpected rc code %s and description:\n %s' %
- (rc, desc))
+ logger.error('Unexpected rc code %s and description:\n %s',
+ rc, desc)
status = FAIL
except Exception, details:
logger.error('Error invoking AddRS')
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py Thu Feb 05 00:52:07 2009 -0800
@@ -104,7 +104,7 @@
status = check_proc_sched(options.ip, options.virt)
if status != PASS:
- raise Exception("%s CPU scheduling not set properly", default_dom)
+ raise Exception("%s CPU scheduling not set properly" % default_dom)
status = PASS
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/VirtualSystemManagementService/10_hv_version.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/10_hv_version.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/10_hv_version.py Thu Feb 05 00:52:07 2009 -0800
@@ -50,14 +50,14 @@
local_ver = get_hv_ver(options.ip, options.virt)
if cim_ver != local_ver:
- logger.error("CIM says version is `%s', but libvirt says `%s'" \
- % (cim_ver, local_ver))
+ logger.error("CIM says version is `%s', but libvirt says `%s'",
+ cim_ver, local_ver)
if options.virt == 'LXC':
return XFAIL_RC(bug_libvirt)
else:
return FAIL
else:
- logger.info("Verified %s == %s" % (cim_ver, local_ver))
+ logger.info("Verified %s == %s", cim_ver, local_ver)
except Exception, details:
logger.error(details)
return FAIL
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py Thu Feb 05 00:52:07 2009 -0800
@@ -67,7 +67,7 @@
ret = cxml.cim_define(options.ip)
if not ret:
- logger.error("DefineSystem with (%s) units failed" % units)
+ logger.error("DefineSystem with (%s) units failed", units)
return FAIL
return PASS
@@ -94,10 +94,10 @@
cim_kb = int(the_rasd["VirtualQuantity"])
if cim_kb != mem_kb:
- logger.error("CIM reports %i KB instead of %i KB" % (cim_kb, mem_kb))
+ logger.error("CIM reports %i KB instead of %i KB", cim_kb, mem_kb)
return FAIL
- logger.info("Verified %i KB" % mem_kb)
+ logger.info("Verified %i KB", mem_kb)
return PASS
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/VirtualSystemManagementService/12_referenced_config.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/12_referenced_config.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/12_referenced_config.py Thu Feb 05 00:52:07 2009 -0800
@@ -50,12 +50,12 @@
def setup_first_guest(ip, virt, cxml):
ret = cxml.cim_define(ip)
if not ret:
- logger.error("Unable to define %s using DefineSystem()" % test_dom)
+ logger.error("Unable to define %s using DefineSystem()", test_dom)
return FAIL, None
status = cxml.cim_start(ip)
if status != PASS:
- logger.error("Unable to start %s" % test_dom)
+ logger.error("Unable to start %s", test_dom)
return FAIL, "define"
return PASS, "start"
@@ -98,7 +98,7 @@
ret = cxml2.cim_define(ip, ref_conf=ref)
if not ret:
- logger.error("Unable to define %s using DefineSystem()" % test_dom2)
+ logger.error("Unable to define %s using DefineSystem()", test_dom2)
return FAIL, None
return PASS, "define"
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/VirtualSystemManagementService/13_refconfig_additional_devs.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/13_refconfig_additional_devs.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/13_refconfig_additional_devs.py Thu Feb 05 00:52:07 2009 -0800
@@ -60,33 +60,33 @@
def verify_no_dups(ip, virt, cxml, dom):
if cxml.xml_get_disk_source() != cxml.dasd.Address:
- logger.error("%s: Exp disk source %s" % (dom, cxml.dasd.Address))
+ logger.error("%s: Exp disk source %s", dom, cxml.dasd.Address)
return FAIL
if cxml.xml_get_disk_dev() != cxml.dasd.VirtualDevice:
- logger.error("%s: Exp disk dev %s" % (dom, cxml.dasd.VirtualDevice))
+ logger.error("%s: Exp disk dev %s", dom, cxml.dasd.VirtualDevice)
return FAIL
if cxml.xml_get_net_type() != cxml.nasd.NetworkType:
- logger.error("%s: Exp net type %d" % (dom, cxml.nasd.NetworkType))
+ logger.error("%s: Exp net type %d", dom, cxml.nasd.NetworkType)
return FAIL
if cxml.xml_get_net_mac() != cxml.nasd.Address:
- logger.error("%s: Exp net mac %s" % (dom, cxml.nasd.Address))
+ logger.error("%s: Exp net mac %s", dom, cxml.nasd.Address)
return FAIL
vcpus = cxml.xml_get_vcpu()
if not vcpus.isdigit():
- logger.error("Unable to get vcpus value for %s" % dom)
+ logger.error("Unable to get vcpus value for %s", dom)
return FAIL
if int(vcpus) != cxml.pasd.VirtualQuantity:
- logger.error("%s: Exp vcpus %s" % (dom, cxml.pasd.VirtualQuantity))
+ logger.error("%s: Exp vcpus %s", dom, cxml.pasd.VirtualQuantity)
return FAIL
mem = cxml.xml_get_mem()
if not mem.isdigit():
- logger.error("Unable to get mem value for %s" % dom)
+ logger.error("Unable to get mem value for %s", dom)
return FAIL
if cxml.masd.AllocationUnits == "Bytes":
@@ -107,7 +107,7 @@
exp_mem <<= shift
if int(mem) != exp_mem:
- logger.error("%s: Exp mem %s" % (dom, exp_mem))
+ logger.error("%s: Exp mem %s", dom, exp_mem)
return FAIL
return PASS
@@ -123,7 +123,7 @@
try:
rc = cxml.cim_define(options.ip)
if not rc:
- logger.error("Unable define domain %s" % test_dom)
+ logger.error("Unable define domain %s", test_dom)
raise Exception("Unable to define domain %s" % test_dom)
ref = get_vssd_ref(options.ip, options.virt)
@@ -132,7 +132,7 @@
rc = cxml2.cim_define(options.ip, ref_conf=ref)
if not rc:
- logger.error("Unable define domain %s" % test_dom2)
+ logger.error("Unable define domain %s", test_dom2)
raise Exception("Unable to define %s" % test_dom2)
rc = call_request_state_change(test_dom2, options.ip,
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/VirtualSystemMigrationService/01_migratable_host.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/01_migratable_host.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/01_migratable_host.py Thu Feb 05 00:52:07 2009 -0800
@@ -48,7 +48,7 @@
cxml = virt_xml(guest_name)
ret = cxml.create(ip)
if not ret:
- logger.error("Error create domain %s" % guest_name)
+ logger.error("Error create domain %s", guest_name)
return FAIL, None, cxml
status, dom_cs = poll_for_state_change(ip, virt, guest_name,
@@ -104,8 +104,8 @@
status, ret = migrate_guest_to_host(service, cs_ref, target_ip)
if status == FAIL:
- logger.error("MigrateVirtualSystemToHost: unexpected list length %s"
- % len(ret))
+ logger.error("MigrateVirtualSystemToHost: unexpected list length %s",
+ len(ret))
cxml.destroy(options.ip)
cxml.undefine(options.ip)
return status
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/VirtualSystemMigrationService/02_host_migrate_type.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/02_host_migrate_type.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/02_host_migrate_type.py Thu Feb 05 00:52:07 2009 -0800
@@ -46,7 +46,7 @@
cxml = virt_xml(guest_name)
cxml.cim_define(ip)
except Exception:
- logger.error("Error define domain %s" % guest_name)
+ logger.error("Error define domain %s", guest_name)
return FAIL, None
classname = 'Xen_ComputerSystem'
@@ -106,7 +106,7 @@
return FAIL, None
except Exception:
- logger.error("Error start domain %s" % guest_name)
+ logger.error("Error start domain %s", guest_name)
return FAIL, None
return PASS, cxml
@@ -156,11 +156,11 @@
break
logger.info("Migrating guest with the following options:")
- logger.info("%s" % item)
+ logger.info("%s", item)
status, ret = migrate_guest_to_host(service, cs_ref, target_ip, item)
if status == FAIL:
- logger.error("MigrateVirtualSystemToHost: unexpected list length %s"
- % len(ret))
+ logger.error("MigrateVirtualSystemToHost: unexpected list length %s",
+ len(ret))
cxml.destroy(options.ip)
cxml.undefine(options.ip)
return status
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/VirtualSystemMigrationService/05_migratable_host_errs.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/05_migratable_host_errs.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/05_migratable_host_errs.py Thu Feb 05 00:52:07 2009 -0800
@@ -43,13 +43,13 @@
cxml = virt_xml(test_dom)
ret = cxml.cim_define(server)
if not ret:
- logger.error("Error define domain %s" % test_dom )
+ logger.error("Error define domain %s", test_dom )
return FAIL
status = cxml.cim_start(server)
if status != PASS:
cxml.undefine(server)
- logger.error("Error start domain %s" % test_dom )
+ logger.error("Error start domain %s", test_dom )
return status
status = FAIL
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/01_forward.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/01_forward.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/01_forward.py Thu Feb 05 00:52:07 2009 -0800
@@ -116,16 +116,16 @@
try:
if len(assoc_info) != 1:
- logger.error("%s returned %i resource objects for '%s'" % \
- (an, len(assoc_info), cn))
+ logger.error("%s returned %i resource objects for '%s'",
+ an, len(assoc_info), cn)
return FAIL
status = compare_all_prop(assoc_info[0], vssd)
if status != PASS:
logger.error("Properties of inst returned by %s didn't \
- match expected" % assoc_info[0].classname)
+ match expected", assoc_info[0].classname)
return FAIL
except Exception, detail :
- logger.error("Exception in assoc_values function: %s" % detail)
+ logger.error("Exception in assoc_values function: %s", detail)
return FAIL
return PASS
@@ -166,12 +166,12 @@
try:
vssd = enumclass.GetInstance(options.ip, vssd_cn, key_list)
if vssd is None:
- logger.error("VSSD instance for %s not found" % test_dom)
+ logger.error("VSSD instance for %s not found", test_dom)
cxml.undefine(options.ip)
return FAIL
except Exception, detail :
logger.error(Globals.CIM_ERROR_GETINSTANCE, vssd_cn)
- logger.error("Exception : %s" % detail)
+ logger.error("Exception : %s", detail)
cxml.undefine(options.ip)
return FAIL
@@ -191,7 +191,7 @@
except Exception, detail :
logger.error(Globals.CIM_ERROR_ASSOCIATORS, an)
- logger.error("Exception : %s" % detail)
+ logger.error("Exception : %s", detail)
status = FAIL
cxml.undefine(options.ip)
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py Thu Feb 05 00:52:07 2009 -0800
@@ -70,7 +70,7 @@
return FAIL
except Exception, detail :
- logger.error("Exception evaluating InstanceID: %s" % detail)
+ logger.error("Exception evaluating InstanceID: %s", detail)
return FAIL
return PASS
@@ -139,7 +139,7 @@
break
except Exception, detail :
- logger.error("Exception in assoc_values function: %s" % detail)
+ logger.error("Exception in assoc_values function: %s", detail)
status = FAIL
return status
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/03_vssdc_fwd_errs.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/03_vssdc_fwd_errs.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/03_vssdc_fwd_errs.py Thu Feb 05 00:52:07 2009 -0800
@@ -116,13 +116,13 @@
ret = cxml.cim_define(options.ip)
if not ret:
- logger.error('Unable to define domain %s' % test_dom)
+ logger.error('Unable to define domain %s', test_dom)
return FAIL
status = cxml.cim_start(options.ip)
if status != PASS:
cxml.undefine(options.ip)
- logger.error('Unable to start domain %s' % test_dom)
+ logger.error('Unable to start domain %s', test_dom)
return FAIL
global conn
diff -r edfa908a60d0 -r 4bb5b4c89bfd suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/04_vssdc_rev_errs.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/04_vssdc_rev_errs.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/04_vssdc_rev_errs.py Thu Feb 05 00:52:07 2009 -0800
@@ -109,13 +109,13 @@
ret = cxml.cim_define(options.ip)
if not ret:
- logger.error('Unable to define domain %s' % test_dom)
+ logger.error('Unable to define domain %s', test_dom)
return FAIL
status = cxml.cim_start(options.ip)
if status != PASS:
cxml.undefine(options.ip)
- logger.error('Unable to start domain %s' % test_dom)
+ logger.error('Unable to start domain %s', test_dom)
return FAIL
global conn
3
2
[PATCH] [TEST Split lines to 80-char width limit in SettingsDefineCapabilities/01_forward.py
by yunguolï¼ cn.ibm.com 06 Feb '09
by yunguolï¼ cn.ibm.com 06 Feb '09
06 Feb '09
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1233825583 28800
# Node ID 3fc2b8a203339c6a59b5f0e2a159e3e0a802ea6d
# Parent edfa908a60d058c7f1ba7394bd1d818999802287
[TEST Split lines to 80-char width limit in SettingsDefineCapabilities/01_forward.py
This tc fails because of the number of RASD objects, I've sent a patch with fix
Tested for KVM/LXC with current sources
Signed-off-by: Guolian Yun<yunguol(a)cn.ibm.com>
diff -r edfa908a60d0 -r 3fc2b8a20333 suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py
--- a/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Thu Feb 05 01:19:43 2009 -0800
@@ -92,10 +92,15 @@
Creating the lists that will be used for comparisons.
"""
+ memrasd = get_typed_class(virt, "MemResourceAllocationSettingData")
+ diskrasd = get_typed_class(virt, "DiskResourceAllocationSettingData")
+ netrasd = get_typed_class(virt, "NetResourceAllocationSettingData")
+ procrasd = get_typed_class(virt, "ProcResourceAllocationSettingData")
+
if virt == 'LXC':
instlist = [ pool[1].InstanceID ]
- cllist = [ get_typed_class(virt, "MemResourceAllocationSettingData") ]
- rtype = { get_typed_class(virt, "MemResourceAllocationSettingData") : 4 }
+ cllist = [ memrasd ]
+ rtype = { memrasd : 4 }
else:
instlist = [
pool[0].InstanceID,
@@ -103,17 +108,12 @@
pool[2].InstanceID,
pool[3].InstanceID
]
- cllist = [
- get_typed_class(virt, "DiskResourceAllocationSettingData"),
- get_typed_class(virt, "MemResourceAllocationSettingData"),
- get_typed_class(virt, "NetResourceAllocationSettingData"),
- get_typed_class(virt, "ProcResourceAllocationSettingData")
- ]
+ cllist = [ diskrasd, memrasd, netrasd, procrasd ]
rtype = {
- get_typed_class(virt, "DiskResourceAllocationSettingData") : 17,
- get_typed_class(virt, "MemResourceAllocationSettingData") : 4,
- get_typed_class(virt, "NetResourceAllocationSettingData") : 10,
- get_typed_class(virt, "ProcResourceAllocationSettingData") : 3
+ diskrasd : 17,
+ memrasd : 4,
+ netrasd : 10,
+ procrasd : 3
}
rangelist = {
"Default" : 0,
3
2
[PATCH] [TEST] Fix SettingsDefineCapabilities/01_forward.py with appropriate RASD objects for different platforms
by yunguolï¼ cn.ibm.com 06 Feb '09
by yunguolï¼ cn.ibm.com 06 Feb '09
06 Feb '09
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1233813653 28800
# Node ID 7ee851d72773c17390641ee50ec20387f9af08d1
# Parent edfa908a60d058c7f1ba7394bd1d818999802287
[TEST] Fix SettingsDefineCapabilities/01_forward.py with appropriate RASD objects for different platforms
Update the number of returned RASD objects to 16 for Xen, 8 for KVM
Tested for KVM/Xen/LXC with current sources, KVM with F9 rpm.
Signed-off-by: Guolian Yun<yunguol(a)cn.ibm.com>
diff -r edfa908a60d0 -r 7ee851d72773 suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py
--- a/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Wed Feb 04 22:00:53 2009 -0800
@@ -176,6 +176,9 @@
# For Diskpool, we have info 1 for each of Min, Max,
# default, Increment and 1 for each of PV and FV
# hence 4 * 2 = 8 records
+ exp_len = 16
+ elif 'DiskPool' in instid and virt == 'KVM' and \
+ curr_cim_rev >= libvirt_rasd_template_changes:
exp_len = 8
else:
exp_len = 4
3
2
[PATCH] [TEST]Fix HostSystem/03_hs_to_settdefcap.py with appropriate number of RASD objects for different platforms
by yunguolï¼ cn.ibm.com 06 Feb '09
by yunguolï¼ cn.ibm.com 06 Feb '09
06 Feb '09
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1233813279 28800
# Node ID 722d799284c3e5777c9ea4abd692e4cb36d9d233
# Parent edfa908a60d058c7f1ba7394bd1d818999802287
[TEST]Fix HostSystem/03_hs_to_settdefcap.py with appropriate number of RASD objects for different platforms
Update the number of returned RASD objects to 16 for Xen, 8 for KVM
Tested for KVM/Xen/LXC with current sources, KVM with F9 rpm.
Signed-off-by: Guolian Yun<yunguol(a)cn.ibm.com>
diff -r edfa908a60d0 -r 722d799284c3 suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py
--- a/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Wed Feb 04 21:54:39 2009 -0800
@@ -219,6 +219,9 @@
# For Diskpool, we have info 1 for each of Min, Max,
# default, Increment and 1 for each of PV and FV
# hence 4 * 2 = 8 records
+ exp_len = 16
+ elif 'DiskPool' in ap['InstanceID'] and virt == 'KVM' and \
+ curr_cim_rev >= libvirt_rasd_template_changes:
exp_len = 8
else:
exp_len = 4
3
3
05 Feb '09
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1232145843 28800
# Node ID d94576542b4d6479ad04da466406c0cdb391f6e8
# Parent 684561f21975c7420cb7e15affc1eec4a8ed35ae
[TEST] Add CodyingSystem and SubmittingPatches files
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 684561f21975 -r d94576542b4d doc/CodingStyle
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/CodingStyle Fri Jan 16 14:44:03 2009 -0800
@@ -0,0 +1,41 @@
+
+The CodingStyle for cimtest (and libcmpiutil) mostly mirrors that of
+libvirt-cim but with the following "clarifications":
+
+- Four-space indents
+
+- 80-char width limit. Break long function calls by:
+ a) putting *every* parameter of the call on its own line
+ -or-
+ b) putting as many params in a line as will fit in the 80-char limit;
+ overflow params are placed on the subsequent line
+
+- Split lines should aligned like the following:
+
+ VirtCIM.__init__(self, 'Xen', test_dom, disk, disk_file_path,
+ ntype, net_name, mac, vcpus, mem, mem_allocunits,
+ emu_type)
+
+- Identifiers should be named with underbars_and_lowercase.
+
+- When passing parameters to logger.error() and logger.info(), use
+ commas:
+
+ logger.error("%s is not a valid network type", net_type)
+
+ Not percent signs:
+
+ logger.error('Got CIM error %s with return code %s' % (desc, rc))
+
+- When passing parameters to Exception(), use percents:
+
+ raise Exception("Unable to define %s" % test_dom)
+
+ Not commas:
+
+ raise Exception("Unable to define %s", test_dom)
+
+- Except for special cases, import the needed functions from a module. Do not
+ import the entire module:
+
+ from XenKvmLib.classes import virt_types
diff -r 684561f21975 -r d94576542b4d doc/SubmittingPatches
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/SubmittingPatches Fri Jan 16 14:44:03 2009 -0800
@@ -0,0 +1,117 @@
+To submit patches to libvirt-cim, you must follow the DCO process, outlined
+below.
+
+Developer's Certificate of Origin 1.1
+ By making a contribution to this project, I certify that:
+
+ (a) The contribution was created in whole or in part by me and I
+ have the right to submit it under the open source license
+ indicated in the file; or
+
+ (b) The contribution is based upon previous work that, to the best
+ of my knowledge, is covered under an appropriate open source
+ license and I have the right under that license to submit that
+ work with modifications, whether created in whole or in part
+ by me, under the same open source license (unless I am
+ permitted to submit under a different license), as indicated
+ in the file; or
+
+ (c) The contribution was provided directly to me by some other
+ person who certified (a), (b) or (c) and I have not modified
+ it.
+
+ (d) I understand and agree that this project and the contribution
+ are public and that a record of the contribution (including all
+ personal information I submit with it, including my sign-off) is
+ maintained indefinitely and may be redistributed consistent with
+ this project or the open source license(s) involved.
+
+then you just add a line saying
+
+ Signed-off-by: Random J Developer <random(a)developer.example.org>
+
+using your real name (sorry, no pseudonyms or anonymous contributions.)
+
+
+
+Guidelines for Submitting Patches.
+
+ Patches should be submitted using Mercurial's patchbomb extension,
+ and we recommend using the queues extension as well. On top of that,
+ we have some guidelines you should follow when submitting patches.
+ This makes reviewing patches easier, which in turns improves the
+ chances of your patch being accepted in a timely fashion.
+
+Single Patches:
+
+ (a) When you add a patch to the queue you have an idea of where you're
+ going with it, and the commit message should reflect that. Be
+ specific. Avoid just saying something like, "Various fixes to
+ AllocationCapabilities." Add a list of what was actually fixed,
+ like, "Add EnumInstanceNames support," and, "Eliminate duplicate
+ instances."
+
+ (b) The first line of your commit message will be the subject of the
+ patch email when you send it out, so write it like a subject. Keep
+ it short and to the point, then start a new line and feel free to be
+ as verbose as you need to be. The entire commit message will be
+ included in the patch.
+
+ (c) Stay on task with a patch. If you notice other problems while you
+ are working on patch, and they are not most definitely specific to
+ your patch, they should be another patch. The same goes for
+ nitpicking. While it might be only a line or two here and there
+ that is off track, this is actually one of the easiest ways to make
+ a patch difficult to review. All the trivial changes hide what is
+ really going on. Make the unrelated changes a new patch or don't
+ make them at all.
+
+ (d) Before you email, export. If you have a patch called "alloc_fixes",
+ which would be emailed with "hg email alloc_fixes", you should first
+ run "hg export alloc_fixes". This lets you review your patch. Does
+ it have any typos in the comments? Did you accidentally include an
+ irrelevant change? Is your commit message still accurate and useful?
+ This is the single biggest step in ensuring you have a good patch.
+
+ (e) If your patch needs to be reworked and resent, prepend a "version
+ number" to the first line of the commit message. For example, "Add
+ EnumInstance to RASD," becomes "(#2) Add EnumInstance to RASD."
+ This helps mail readers thread discussions correctly and helps
+ maintainers know they are applying the right version of your patch.
+ At the end of the commit message, explain what is different from one
+ version to the next. Nobody likes having to diff a diff.
+
+ (f) If your patch depends on a patch that exists on the mailing list but
+ not in the tree, it is okay to send your patch to the list as long
+ as your commit message mentions the dependency. It is also a good
+ idea to import the patch into your tree before you make your patch.
+ For example, a new patch called "cu_statusf API change" is on the
+ list, and your patch needs the new API. Save the email (no need to
+ trim headers) as api_change.eml, then do "hg qimport api_change.eml"
+ and "hg qpush" so that the patch is applied to your tree. Now write
+ your patch on top of it. You should still indicate the dependency
+ in your commit message.
+
+
+Patchsets:
+
+ (a) When you send a group of patches, Mercurial's email extension will
+ create a "header" email. Make the subject and body of that email
+ meaningful, so we know how the patches relate. It's easy to say,
+ "Each patch has a commit message, it's obvious how they work
+ together," but the rest of the list usually won't agree with that.
+ If the commit messages for each patch are good, you shouldn't need
+ more than a sentence or two to tie them all together, but you do
+ need it.
+
+ (b) If any of your patches are rejected and you rework them, resend the
+ entire set. This prevents things like, "So use patch 1 of 4 from
+ the set I sent yesterday, 2 and 3 of 4 from the patch I sent an hour
+ later, and patch 4 of 4 from today."
+
+ (c) If you resend a patchset, apply part (e) of the Single Patches
+ guidelines to your "Patch [0 of 3]" header email, for all the same
+ reasons.
+
+Questions/Comments on the Guidelines should be directed to:
+ Kaitlin Rupert<kaitlin(a)linux.vnet.ibm.com>
3
9
# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1233740067 28800
# Node ID 5e1c6b862cd74b56451397df81818d7afea68ff2
# Parent 912b7615d48c8303fd3daa6e55669c6d66af23e4
[TEST] Fixing VSMS/09_procrasd_persist.py tc.
1) Added description to the tc.
2) Removed unnecessary import stmts
3) Changed the tc to use cim_define()
4) Added the check to verify the VirtualQuantity
5) Aligned the tc to fit in 80 columns
Tested for KVM/Xen/LXC with current sources, KVM with F9 rpm.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 912b7615d48c -r 5e1c6b862cd7 suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py Mon Feb 02 04:45:23 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py Wed Feb 04 01:34:27 2009 -0800
@@ -19,50 +19,68 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
+# Purpose:
+# Verify DefineSystem() properly uses the ProcRASD setting passed in
+# as part of the ResourceSeting property.
+#
+# Steps:
+# 1) Get the default rasds
+# 2) Set the ProcRASD VirtualQuantity, Weight, Limit, InstanceID values
+# 3) Define the guest using the configuration
+# 4) Verify the proc settings of the guest
+#
import sys
-import pywbem
-from XenKvmLib.common_util import call_request_state_change, \
- poll_for_state_change
-from XenKvmLib import vsms
+from pywbem.cim_types import Uint64, Uint32
+from XenKvmLib.vxml import get_class
from XenKvmLib.enumclass import GetInstance
-from XenKvmLib.common_util import get_typed_class
-from VirtLib import utils
+from XenKvmLib.classes import get_typed_class, inst_to_mof
from CimTest.Globals import logger
from XenKvmLib.const import do_main
from CimTest.ReturnCodes import FAIL, PASS
-from XenKvmLib.test_doms import destroy_and_undefine_domain
+from XenKvmLib.rasd import get_default_rasds
sup_types = ['Xen', 'XenFV', 'KVM']
-default_dom = 'rstest_domain'
+test_dom = 'procrasd_persist'
-nvcpu = 2
+nvcpu = 3
weight = 124
-limit = 256
+limit = 512
-REQUESTED_STATE = 2
-TIME = "00000000000000.000000:000"
+def setup_guest(ip, virt, cxml, prasd_cn):
+ rasds = get_default_rasds(ip, virt)
+ rasd_list= { prasd_cn : None }
+
+ for rasd in rasds:
+ if rasd.classname == prasd_cn:
+ rasd['InstanceID'] = '%s/proc' %test_dom
+ rasd['VirtualQuantity'] = Uint64(nvcpu)
+ rasd['Weight'] = Uint32(weight)
+ rasd['Limit'] = Uint64(limit)
+ rasd_list[prasd_cn] = inst_to_mof(rasd)
-def setup_rasd_mof(ip, vtype):
- vssd, rasd = vsms.default_vssd_rasd_str(default_dom, virt=vtype)
+ if rasd_list[prasd_cn] is None:
+ logger.error("Unable to set template ProcRASD")
+ return FAIL
- class_pasd = vsms.get_pasd_class(vtype)
- proc_inst = class_pasd(default_dom, nvcpu, weight, limit)
- proc_mof = proc_inst.mof()
+ cxml.set_res_settings(rasd_list)
+ ret = cxml.cim_define(ip)
+ if not ret:
+ logger.error("Unable to define %s ", test_dom)
+ return FAIL
- for i in range(len(rasd)):
- if "ProcResourceAllocationSettingData" in rasd[i]:
- rasd[i] = proc_mof
- return PASS, vssd, rasd
+ return PASS
- return FAIL, vssd, rasd
-
-def check_proc_sched(server, virt):
+def check_proc_sched(server, virt, cn_name):
try:
- key_list = {"InstanceID" : '%s/proc' %default_dom}
- cn_name = get_typed_class(virt, 'ProcResourceAllocationSettingData')
+ key_list = {"InstanceID" : '%s/proc' %test_dom}
proc = GetInstance(server, cn_name, key_list)
+ if proc.VirtualQuantity != nvcpu:
+ logger.error("VirtualQuantity is %i, expected %i",
+ proc.VirtualQuantity, nvcpu)
+ return FAIL
+
if proc.Limit != limit:
logger.error("Limit is %i, expected %i", proc.Limit, limit)
return FAIL
@@ -79,32 +97,20 @@ def check_proc_sched(server, virt):
@do_main(sup_types)
def main():
- options = main.options
+ options = main.options
+ virt = options.virt
+ server = options.ip
+
+ cxml = get_class(virt)(test_dom)
+ prasd_cn = get_typed_class(virt, "ProcResourceAllocationSettingData")
+ try:
+ status = setup_guest(server, virt, cxml, prasd_cn)
+ if status != PASS:
+ return status
- status, vssd, rasd = setup_rasd_mof(options.ip, options.virt)
- if status != PASS:
- return status
-
- try:
- service = vsms.get_vsms_class(options.virt)(options.ip)
- service.DefineSystem(SystemSettings=vssd,
- ResourceSettings=rasd,
- ReferenceConfiguration=' ')
-
- rc = call_request_state_change(default_dom, options.ip,
- REQUESTED_STATE, TIME, options.virt)
- if rc != 0:
- raise Exception("Unable to start %s using RequestedStateChange()" %
- default_dom)
-
- status, dom_cs = poll_for_state_change(options.ip, options.virt,
- default_dom, REQUESTED_STATE)
+ status = check_proc_sched(server, virt, prasd_cn)
if status != PASS:
- raise Exception("%s didn't change state as expected" % default_dom)
-
- status = check_proc_sched(options.ip, options.virt)
- if status != PASS:
- raise Exception("%s CPU scheduling not set properly", default_dom)
+ raise Exception("'%s' CPU scheduling not set properly" % test_dom)
status = PASS
@@ -112,8 +118,7 @@ def main():
logger.error("Exception: details %s", details)
status = FAIL
- destroy_and_undefine_domain(default_dom, options.ip, options.virt)
-
+# cxml.undefine(server)
return status
if __name__ == "__main__":
2
1
[PATCH] [TEST] #2 Update VSMS 14_define_sys_disk.py to use cim_define()
by Kaitlin Rupert 04 Feb '09
by Kaitlin Rupert 04 Feb '09
04 Feb '09
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1233685686 28800
# Node ID b1a757aa7efce7839998c49412f45d8c7f1596fa
# Parent b5e7e1cf87f88b2baa21645b5d2bed2286ffb0ca
[TEST] #2 Update VSMS 14_define_sys_disk.py to use cim_define()
Updates:
-Added comment to describe test
-Added flag to indicate whether guest should be undefined
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r b5e7e1cf87f8 -r b1a757aa7efc suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py Tue Feb 03 09:37:05 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py Tue Feb 03 10:28:06 2009 -0800
@@ -18,6 +18,14 @@
# You should have received a copy of the GNU General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# Purpose:
+# Verify providers support disk images with long paths / names
+#
+# Steps:
+# 1) Create a disk image with a long path
+# 2) Build RASD parameters, making sure to specify disk image created in step 1
+# 3) Verify guest is defined properly
#
import sys
@@ -25,14 +33,11 @@
from VirtLib.utils import run_remote
from CimTest.Globals import logger
from CimTest.ReturnCodes import FAIL, PASS
-from XenKvmLib.common_util import create_using_definesystem
-from XenKvmLib.test_doms import destroy_and_undefine_domain
from XenKvmLib.classes import get_typed_class, inst_to_mof
from XenKvmLib.rasd import get_default_rasds
-from XenKvmLib.vsms import get_vssd_mof
-from XenKvmLib.const import get_provider_version
from XenKvmLib.const import do_main, _image_dir, f9_changeset, \
- KVM_default_disk_dev
+ KVM_default_disk_dev, get_provider_version
+from XenKvmLib.vxml import get_class
sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']
test_dom = 'rstest_disk_domain'
@@ -50,28 +55,24 @@
return path
-def get_vssd_rasd(ip, virt, addr, disk_type):
- vssd = get_vssd_mof(virt, test_dom)
+def get_rasd_list(ip, virt, addr, disk_type):
+ drasd_cn = get_typed_class(virt, "DiskResourceAllocationSettingData")
rasds = get_default_rasds(ip, virt)
- rasd_list = []
+ rasd_list = {}
for rasd in rasds:
- if 'DiskPool' in rasd['PoolID']:
+ if rasd.classname == drasd_cn:
if disk_type != "" and rasd['Caption'] != disk_type:
continue
rasd['Address'] = addr
curr_cim_rev, changeset = get_provider_version(virt, ip)
if changeset == f9_changeset and virt == 'KVM':
rasd['VirtualDevice'] = KVM_default_disk_dev
- rasd_list.append(inst_to_mof(rasd))
+ rasd_list[rasd.classname] = inst_to_mof(rasd)
- params = { 'vssd' : vssd,
- 'rasd' : rasd_list
- }
-
- return params
+ return rasd_list
@do_main(sup_types)
def main():
@@ -84,21 +85,27 @@
else:
disk_cap = ""
+ cxml = get_class(options.virt)(test_dom)
+
+ guest_defined = False
+
try:
addr = make_long_disk_path(options.ip)
if addr is None:
raise Exception("Unable to create large disk image")
- define_params = get_vssd_rasd(options.ip, options.virt, addr, disk_cap)
- if len(define_params) != 2:
- raise Exception("Unable to get VSSD and RASDs for %s" % test_dom)
+ rasd_list = get_rasd_list(options.ip, options.virt, addr, disk_cap)
+ if len(rasd_list) < 1:
+ raise Exception("Unable to get template RASDs for %s" % test_dom)
- status = create_using_definesystem(test_dom, options.ip,
- params=define_params, ref_config="",
- virt=options.virt)
- if status != PASS:
+ cxml.set_res_settings(rasd_list)
+ ret = cxml.cim_define(options.ip)
+ if not ret:
raise Exception("Unable to define %s" % test_dom)
+ status = PASS
+ guest_defined = True
+
except Exception, details:
logger.error(details)
status = FAIL
@@ -106,7 +113,8 @@
if os.path.exists(addr):
os.remove(addr)
- destroy_and_undefine_domain(test_dom, options.ip, options.virt)
+ if guest_defined == True:
+ cxml.undefine(options.ip)
return status
2
2
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1232519221 28800
# Node ID 61209742da1d511a4b453d38432c2eeb35639a83
# Parent 189cc68a2f5a3251be1204bdaddfd90bb8740789
(#2) Add a migration_tester.py tool.
This can be used to drive migration between two different hosts.
How to call the tester:
python tools/migration_tester.py -u root -p pass -s fqdn:port -t fqdn -v virt_type guest_name --migration-type type
Ex:
python tools/migration_tester.py -u root -p pass -s source.myhost.com:5988 -t target.myhost.com -v Xen my_guest --migration-type live
Updates:
-Added comment at the beginning of the tool that describes the usage
-Improved the descriptions for username and password for the OptionParser
-Fixed some errors in the usage description in the commit log
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 189cc68a2f5a -r 61209742da1d tools/migration_tester.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/migration_tester.py Tue Jan 20 22:27:01 2009 -0800
@@ -0,0 +1,310 @@
+#!/usr/bin/python
+#
+# Copyright IBM Corp. 2009
+#
+# Authors:
+# Kaitlin Rupert <karupert(a)us.ibm.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# Usage: python tools/migration_tester.py -u root -p pass
+# -s source.myhost.com:5988 -t target.myhost.com -v Xen guest
+# --migration-type live
+#
+# Note: Be sure you can authenticate via ssh into the target machine prior
+# to running the test.
+#
+# You can set up ssh keys, or you will be prompted for the password
+# of the target machine
+
+import sys
+import time
+from optparse import OptionParser
+from pywbem import WBEMConnection, CIMInstanceName, CIMInstance, CIMError
+
+CIM_MIGRATE_OTHER=1
+CIM_MIGRATE_LIVE=2
+CIM_MIGRATE_RESUME=3
+CIM_MIGRATE_RESTART=4
+
+CIM_MIGRATE_URI_OTHER=1
+CIM_MIGRATE_URI_SSH=2
+CIM_MIGRATE_URI_TLS=3
+CIM_MIGRATE_URI_TLS_STRICT=4
+CIM_MIGRATE_URI_TCP=5
+CIM_MIGRATE_URI_UNIX=6
+
+CIM_JOBSTATE_COMPLETE=7
+
+class CIMClassMOF:
+
+ __supported_types = [int, str, bool]
+
+ def __init__(self, attrs = None):
+ """attrs should be dict
+ """
+
+ if attrs != None:
+ self.__dict__.update(attrs)
+
+ def mof(self):
+ """mof()
+
+ Return value is a string, containing the mof representation of the
+ object.
+
+ Attribute types supported are : int, str, bool.
+
+ Attributes with unsupported types will be silently ignored when
+ converting to mof representation.
+ """
+
+ mof_str = "instance of " + self.__class__.__name__ + " {\n"
+ for key, value in self.__dict__.items():
+ value_type = type(value)
+ if value_type not in self.__supported_types:
+ continue
+
+ mof_str += "%s = " % key
+ if value_type == int:
+ mof_str += "%d" % value
+ elif value_type == bool:
+ mof_str += str(value).lower()
+ else:
+ mof_str += '"%s"' % value
+ mof_str += ";\n"
+
+ mof_str += "};"
+ return mof_str
+
+ def __str__(self):
+ return self.mof()
+
+class CIM_VirtualSystemMigrationSettingData(CIMClassMOF):
+ def __init__(self, type, priority):
+ self.InstanceID = 'MigrationSettingData'
+ self.CreationClassName = self.__class__.__name__
+ self.MigrationType = type
+ self.Priority = priority
+
+class Xen_VirtualSystemMigrationSettingData(CIM_VirtualSystemMigrationSettingData):
+ def __init__(self, type, priority):
+ CIM_VirtualSystemMigrationSettingData.__init__(self, type, priority)
+
+class KVM_VirtualSystemMigrationSettingData(CIM_VirtualSystemMigrationSettingData):
+ def __init__(self, type, priority):
+ CIM_VirtualSystemMigrationSettingData.__init__(self, type, priority)
+
+def get_guest_ref(guest, virt):
+ guest_cn = "%s_ComputerSystem" % virt
+
+ keys = { 'Name' : guest,
+ 'CreationClassName' : guest_cn
+ }
+
+ try:
+ cs_ref = CIMInstanceName(guest_cn, keybindings=keys)
+
+ except CIMError, (err_no, desc):
+ print err_no, desc
+ return None
+
+ return cs_ref
+
+def get_msd(mtype, virt):
+ if mtype == "live":
+ mtype = CIM_MIGRATE_LIVE
+ elif mtype == "resume":
+ mtype = CIM_MIGRATE_RESUME
+ elif mtype == "restart":
+ mtype = CIM_MIGRATE_RESTART
+ else:
+ mtype = CIM_MIGRATE_OTHER
+
+ try:
+ vsmsd_cn_base = "_VirtualSystemMigrationSettingData"
+ msd = eval(virt + vsmsd_cn_base)(type=mtype, priority=0)
+
+ except CIMError, (err_no, desc):
+ print err_no, desc
+ return None
+
+ return msd.mof()
+
+def check_migrate(s_conn, cs_ref, ip, msd, virt):
+ vsms_cn = "%s_VirtualSystemMigrationService" % virt
+ try:
+ if msd == None:
+ res = s_conn.InvokeMethod("CheckVirtualSystemIsMigratableToHost",
+ vsms_cn,
+ ComputerSystem=cs_ref,
+ DestinationHost=ip)
+ else:
+ res = s_conn.InvokeMethod("CheckVirtualSystemIsMigratableToHost",
+ vsms_cn,
+ ComputerSystem=cs_ref,
+ DestinationHost=ip,
+ MigrationSettingData=msd)
+
+ if res == None or res[1]['IsMigratable'] != True:
+ print "Migration check failed."
+ return 1
+
+ except CIMError, (err_no, desc):
+ print err_no, desc
+ return 1
+
+ return 0
+
+def get_job_inst(s_conn, job_ref):
+ try:
+ inst = s_conn.GetInstance(job_ref)
+
+ except CIMError, (err_no, desc):
+ print err_no, desc
+ return None
+
+ return inst
+
+def poll_for_job_status(s_conn, job_ref):
+
+ job_inst = get_job_inst(s_conn, job_ref)
+ if not job_inst:
+ print "Unable to get job instance"
+ return 1
+
+ try:
+ while job_inst['JobState'] != CIM_JOBSTATE_COMPLETE:
+ time.sleep(3)
+ job_inst = get_job_inst(s_conn, job_ref)
+ if not job_inst:
+ print "Unable to get job instance"
+ return 1
+
+ if job_inst['Status'] != "Completed":
+ print "Migrate job failed: %s" % job_inst['Status']
+ return 1
+ except KeyboardInterrupt:
+ print "Migrate job took too long"
+ return 1
+
+ print "Migrate job succeeded: %s" % job_inst['Status']
+ return 0
+
+def migrate_host(s_conn, cs_ref, dest, msd, virt):
+ vsms_cn = "%s_VirtualSystemMigrationService" % virt
+
+ try:
+ if msd == None:
+ job = s_conn.InvokeMethod("MigrateVirtualSystemToHost",
+ vsms_cn,
+ ComputerSystem=cs_ref,
+ DestinationHost=dest)
+ else:
+ job = s_conn.InvokeMethod("MigrateVirtualSystemToHost",
+ vsms_cn,
+ ComputerSystem=cs_ref,
+ DestinationHost=dest,
+ MigrationSettingData=msd)
+
+ if len(job) < 1:
+ print "No job returned from migrate call"
+ return 1
+
+ status = poll_for_job_status(s_conn, job[1]['Job'])
+
+ except CIMError, (err_no, desc):
+ print err_no, desc
+ return 1
+
+ return 0
+
+def main():
+ usage = "usage: %prog [options] <target system>\nex: %prog my.target.com"
+ parser = OptionParser(usage)
+
+ parser.add_option("-s", "--src-url", dest="s_url", default="localhost:5988",
+ help="URL of CIMOM to connect to (host:port)")
+ parser.add_option("-t", "--target-url", dest="t_url",
+ default="localhost:5988",
+ help="URL of CIMOM to connect to (host:port)")
+ parser.add_option("-N", "--ns", dest="ns", default="root/virt",
+ help="Namespace (default is root/virt)")
+ parser.add_option("-u", "--user", dest="username", default=None,
+ help="Auth username for CIMOM on source system")
+ parser.add_option("-p", "--pass", dest="password", default=None,
+ help="Auth password for CIMOM on source system")
+ parser.add_option("-v", "--virt-type", dest="virt", default=None,
+ help="Virtualization type [ Xen | KVM ]")
+ parser.add_option("--migration-type", dest="type", default=None,
+ help="Migration type: [ live | resume | restart ]")
+ parser.add_option("--disable-check", dest="disable_ck", action="store_true",
+ help="Disable migration pre-check")
+
+ (options, args) = parser.parse_args()
+
+ if len(args) == 0:
+ print "Fatal: no guest specified."
+ sys.exit(1)
+
+ guest_name = args[0]
+
+ if ":" in options.s_url:
+ (sysname, port) = options.s_url.split(":")
+ else:
+ sysname = options.s_url
+
+ if ":" in options.t_url:
+ (t_sysname, port) = options.t_url.split(":")
+ else:
+ t_sysname = options.t_url
+
+ src_conn = WBEMConnection('http://%s' % sysname,
+ (options.username, options.password), options.ns)
+
+ guest_ref = get_guest_ref(guest_name, options.virt)
+ if guest_ref == None:
+ return 1
+
+ if options.virt == None:
+ print "Must specify virtualization type"
+ return 1
+
+ if options.virt != "Xen":
+ print "Only Xen migration is currently supported"
+ return 1
+
+ if options.type != None:
+ msd = get_msd(options.type, options.virt)
+ if msd == None:
+ return 1
+ else:
+ print "Using default MigrationSettingData"
+ msd = None
+
+ if not options.disable_ck:
+ status = check_migrate(src_conn, guest_ref, t_sysname, msd,
+ options.virt)
+ if status == 1:
+ return 1
+
+ print "Migrating %s.. this will take some time." % guest_name
+ status = migrate_host(src_conn, guest_ref, t_sysname, msd, options.virt)
+ return status
+
+if __name__=="__main__":
+ sys.exit(main())
+
+
2
1
[PATCH] [TEST] #2 Update VSMS 12_referenced_config.py to use cim_() function
by Kaitlin Rupert 04 Feb '09
by Kaitlin Rupert 04 Feb '09
04 Feb '09
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1233682625 28800
# Node ID b5e7e1cf87f88b2baa21645b5d2bed2286ffb0ca
# Parent fa1424f9b3f4ae005b4fcc34e18858035cc8f102
[TEST] #2 Update VSMS 12_referenced_config.py to use cim_() function.
Also re-wrote part of this test to fix the overall test flow.
Updates:
-Added comment
-Ensured cleanup only occurs when guest has been started / defined
-Use cs instance Name and CCN
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r fa1424f9b3f4 -r b5e7e1cf87f8 suites/libvirt-cim/cimtest/VirtualSystemManagementService/12_referenced_config.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/12_referenced_config.py Mon Feb 02 12:02:30 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/12_referenced_config.py Tue Feb 03 09:37:05 2009 -0800
@@ -19,21 +19,27 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
+# Purpose:
+# Verify DefineSystem() properly uses the settings of the referenced passed in
+# for the ReferenceConfiguration parameter.
+#
+# Steps:
+# 1) Define and start a guest
+# 2) Get the reference of the guest
+# 3) Define a second guest using the reference of the first guest
+# 4) Verify the settings of the second guest
+
import sys
-import pywbem
-from XenKvmLib.common_util import create_using_definesystem, \
- call_request_state_change, \
- poll_for_state_change, get_cs_instance
-from XenKvmLib import vsms
-from VirtLib import utils
+from XenKvmLib.common_util import get_cs_instance
from CimTest.Globals import logger
from XenKvmLib.const import do_main
from CimTest.ReturnCodes import FAIL, PASS
-from XenKvmLib.test_doms import destroy_and_undefine_domain
-from XenKvmLib.classes import get_typed_class
+from XenKvmLib.classes import get_typed_class, inst_to_mof
from XenKvmLib.assoc import AssociatorNames
from XenKvmLib.test_xml import dumpxml
+from XenKvmLib.vxml import get_class
+from XenKvmLib.rasd import get_default_rasds
sup_types = ['Xen', 'XenFV', 'KVM']
test_dom = 'rstest_domain'
@@ -41,36 +47,27 @@
mac = "aa:aa:aa:00:00:00"
-REQUESTED_STATE = 2
-TIME = "00000000000000.000000:000"
+def setup_first_guest(ip, virt, cxml):
+ ret = cxml.cim_define(ip)
+ if not ret:
+ logger.error("Unable to define %s using DefineSystem()" % test_dom)
+ return FAIL, None
-def setup_first_guest(ip, virt):
- status = create_using_definesystem(test_dom, ip, virt=virt)
- if status != PASS:
- logger.error("Unable to define %s using DefineSystem()" % test_dom)
- return FAIL
-
- rc = call_request_state_change(test_dom, ip, REQUESTED_STATE, TIME, virt)
- if rc != 0:
- logger.error("Unable to start %s" % test_dom)
- return FAIL
-
- status, cs = poll_for_state_change(ip, virt, test_dom, REQUESTED_STATE)
+ status = cxml.cim_start(ip)
if status != PASS:
logger.error("Unable to start %s" % test_dom)
- return FAIL
+ return FAIL, "define"
- return PASS
+ return PASS, "start"
def get_vssd_ref(ip, virt):
rc, cs = get_cs_instance(test_dom, ip, virt)
if rc != 0:
return None
- cn = "ComputerSystem"
- ccn = get_typed_class(virt, cn)
an = get_typed_class(virt, 'SettingsDefineState')
- vssd = AssociatorNames(ip, an, ccn, Name = test_dom, CreationClassName = ccn)
+ vssd = AssociatorNames(ip, an, cs.CreationClassName, Name=cs.Name,
+ CreationClassName=cs.CreationClassName)
if len(vssd) != 1:
logger.error("Returned %i vssd insts for '%s'", len(vssd), test_dom)
@@ -78,26 +75,33 @@
return vssd[0]
-def get_vssd_rasd(virt):
- vssd, def_rasd = vsms.default_vssd_rasd_str(dom_name=test_dom2,
- net_type='network',
- net_mac=mac, virt=virt)
+def setup_second_guest(ip, virt, cxml2, ref):
+ nrasd_cn = get_typed_class(virt, "NetResourceAllocationSettingData")
- rasd = []
- for inst in def_rasd:
- cn = get_typed_class(virt, "NetResourceAllocationSettingData")
- if cn in inst:
- rasd.append(inst)
+ rasds = get_default_rasds(ip, virt)
- params = {}
+ rasd_list = {}
- if len(rasd) != 1:
- return params
+ for rasd in rasds:
+ if rasd.classname == nrasd_cn:
+ rasd['Address'] = mac
+ rasd['NetworkType'] = "network"
+ rasd_list[nrasd_cn] = inst_to_mof(rasd)
+ else:
+ rasd_list[rasd.classname] = None
- params['vssd'] = vssd
- params['rasd'] = rasd
+ if rasd_list[nrasd_cn] is None:
+ logger.error("Unable to get template NetRASD")
+ return FAIL
- return params
+ cxml2.set_res_settings(rasd_list)
+
+ ret = cxml2.cim_define(ip, ref_conf=ref)
+ if not ret:
+ logger.error("Unable to define %s using DefineSystem()" % test_dom2)
+ return FAIL, None
+
+ return PASS, "define"
def get_dom_macs(server, dom, virt):
mac_list = []
@@ -117,33 +121,34 @@
@do_main(sup_types)
def main():
options = main.options
+ virt = options.virt
+ ip = options.ip
+
+ cxml = get_class(virt)(test_dom)
+ cxml2 = get_class(virt)(test_dom2)
+
+ guest1_setup = None
+ guest2_setup = None
try:
- status = setup_first_guest(options.ip, options.virt)
+ status, guest1_setup = setup_first_guest(ip, virt, cxml)
if status != PASS:
raise Exception("Unable to start %s" % test_dom)
- ref = get_vssd_ref(options.ip, options.virt)
+ ref = get_vssd_ref(ip, virt)
if ref is None:
raise Exception("Unable to get %s reference" % test_dom)
- define_params = get_vssd_rasd(options.virt)
- if len(define_params) != 2:
- raise Exception("Unable to build VSSD and RASD instances for %s" % \
- test_dom2)
-
- status = create_using_definesystem(test_dom2, options.ip,
- params=define_params, ref_config=ref,
- virt=options.virt)
+ status, guest2_setup = setup_second_guest(ip, virt, cxml2, ref)
if status != PASS:
raise Exception("Unable to define %s" % test_dom2)
- dom1_mac_list = get_dom_macs(options.ip, test_dom, options.virt)
+ dom1_mac_list = get_dom_macs(ip, test_dom, virt)
if len(dom1_mac_list) != 1:
raise Exception("%s has %d macs, expected 1" % (test_dom,
len(dom1_mac_list)))
- dom2_mac_list = get_dom_macs(options.ip, test_dom2, options.virt)
+ dom2_mac_list = get_dom_macs(ip, test_dom2, virt)
if len(dom2_mac_list) != 2:
raise Exception("%s has %d macs, expected 2" % (test_dom2,
len(dom2_mac_list)))
@@ -159,8 +164,14 @@
logger.error(details)
status = FAIL
- destroy_and_undefine_domain(test_dom, options.ip, options.virt)
- destroy_and_undefine_domain(test_dom2, options.ip, options.virt)
+ if guest1_setup == "start":
+ cxml.cim_destroy(ip)
+
+ if guest1_setup == "define":
+ cxml.undefine(ip)
+
+ if guest2_setup == "define":
+ cxml2.undefine(ip)
return status
2
1
Test Run Summary (Jan 19 2009): KVM on Fedora release 9.90.1 (Rawhide) with sfcb
by Guo Lian Yun 04 Feb '09
by Guo Lian Yun 04 Feb '09
04 Feb '09
=================================================
Test Run Summary (Jan 19 2009): KVM on Fedora release 9.90.1 (Rawhide)
with sfcb
=================================================
Distro: Fedora release 9.90.1 (Rawhide)
Kernel: 2.6.27-0.323.rc6.fc10.x86_64
libvirt: 0.4.5
Hypervisor: QEMU 0.9.1
CIMOM: sfcb sfcbd 1.3.3preview
Libvirt-cim revision: 800
Libvirt-cim changeset: 611757263edd
Cimtest revision: 598
Cimtest changeset: 32645e444b32
=================================================
FAIL : 1
XFAIL : 2
SKIP : 4
PASS : 134
-----------------
Total : 141
=================================================
FAIL Test Summary:
ElementConforms - 01_forward.py: FAIL
=================================================
XFAIL Test Summary:
ComputerSystem - 32_start_reboot.py: XFAIL
ComputerSystem - 33_suspend_reboot.py: XFAIL
=================================================
SKIP Test Summary:
VSSD - 02_bootldr.py: SKIP
VirtualSystemMigrationService - 01_migratable_host.py: SKIP
VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP
VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP
=================================================
Full report:
--------------------------------------------------------------------
AllocationCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
AllocationCapabilities - 02_alloccap_gi_errs.py: PASS
--------------------------------------------------------------------
ComputerSystem - 01_enum.py: PASS
--------------------------------------------------------------------
ComputerSystem - 02_nosystems.py: PASS
--------------------------------------------------------------------
ComputerSystem - 03_defineVS.py: PASS
--------------------------------------------------------------------
ComputerSystem - 04_defineStartVS.py: PASS
--------------------------------------------------------------------
ComputerSystem - 05_activate_defined_start.py: PASS
--------------------------------------------------------------------
ComputerSystem - 06_paused_active_suspend.py: PASS
--------------------------------------------------------------------
ComputerSystem - 22_define_suspend.py: PASS
--------------------------------------------------------------------
ComputerSystem - 23_pause_pause.py: PASS
--------------------------------------------------------------------
ComputerSystem - 27_define_pause_errs.py: PASS
--------------------------------------------------------------------
ComputerSystem - 32_start_reboot.py: XFAIL
ERROR - In fn cim_state_change()
ERROR - Failed to change state of the domain 'cs_test_domain'
ERROR - Exception: (1, u'Unable to reboot domain: this function
is not supported by the hypervisor: virDomainReboot')
ERROR - Exception: Unable reboot dom 'cs_test_domain'
InvokeMethod(RequestStateChange): Unable to reboot domain: this function
is not supported by the hypervisor: virDomainReboot
Bug:<00005>
--------------------------------------------------------------------
ComputerSystem - 33_suspend_reboot.py: XFAIL
ERROR - In fn cim_state_change()
ERROR - Failed to change state of the domain 'test_domain'
ERROR - Exception: (7, u'State not supported')
ERROR - Exception: Unable Suspend dom 'test_domain'
InvokeMethod(RequestStateChange): State not supported
Bug:<00012>
--------------------------------------------------------------------
ComputerSystem - 35_start_reset.py: PASS
--------------------------------------------------------------------
ComputerSystem - 40_RSC_start.py: PASS
--------------------------------------------------------------------
ComputerSystem - 41_cs_to_settingdefinestate.py: PASS
--------------------------------------------------------------------
ComputerSystem - 42_cs_gi_errs.py: PASS
--------------------------------------------------------------------
ComputerSystemIndication - 01_created_indication.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 01_forward.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 03_reverse_errs.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 04_forward_errs.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 01_forward.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 03_forward_errs.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 05_hostsystem_cap.py: PASS
--------------------------------------------------------------------
ElementConforms - 01_forward.py: FAIL
ERROR - verify_fields() exception:
u'KVM_AllocationCapabilities'
ERROR - Exception: Failed to verify instance
Class not found
--------------------------------------------------------------------
ElementConforms - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementConforms - 03_ectp_fwd_errs.py: PASS
--------------------------------------------------------------------
ElementConforms - 04_ectp_rev_errs.py: PASS
--------------------------------------------------------------------
ElementSettingData - 01_forward.py: PASS
--------------------------------------------------------------------
ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS
--------------------------------------------------------------------
EnabledLogicalElementCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS
--------------------------------------------------------------------
HostSystem - 01_enum.py: PASS
--------------------------------------------------------------------
HostSystem - 02_hostsystem_to_rasd.py: PASS
--------------------------------------------------------------------
HostSystem - 03_hs_to_settdefcap.py: PASS
--------------------------------------------------------------------
HostSystem - 04_hs_to_EAPF.py: PASS
--------------------------------------------------------------------
HostSystem - 05_hs_gi_errs.py: PASS
--------------------------------------------------------------------
HostSystem - 06_hs_to_vsms.py: PASS
--------------------------------------------------------------------
HostedDependency - 01_forward.py: PASS
--------------------------------------------------------------------
HostedDependency - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedDependency - 03_enabledstate.py: PASS
--------------------------------------------------------------------
HostedDependency - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 01_forward.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 03_forward_errs.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
HostedService - 01_forward.py: PASS
--------------------------------------------------------------------
HostedService - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedService - 03_forward_errs.py: PASS
--------------------------------------------------------------------
HostedService - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
LogicalDisk - 01_disk.py: PASS
--------------------------------------------------------------------
LogicalDisk - 02_nodevs.py: PASS
--------------------------------------------------------------------
LogicalDisk - 03_ld_gi_errs.py: PASS
--------------------------------------------------------------------
Memory - 01_memory.py: PASS
--------------------------------------------------------------------
Memory - 02_defgetmem.py: PASS
--------------------------------------------------------------------
Memory - 03_mem_gi_errs.py: PASS
--------------------------------------------------------------------
NetworkPort - 01_netport.py: PASS
--------------------------------------------------------------------
NetworkPort - 02_np_gi_errors.py: PASS
--------------------------------------------------------------------
NetworkPort - 03_user_netport.py: PASS
--------------------------------------------------------------------
Processor - 01_processor.py: PASS
--------------------------------------------------------------------
Processor - 02_definesys_get_procs.py: PASS
--------------------------------------------------------------------
Processor - 03_proc_gi_errs.py: PASS
--------------------------------------------------------------------
Profile - 01_enum.py: PASS
--------------------------------------------------------------------
Profile - 02_profile_to_elec.py: PASS
--------------------------------------------------------------------
Profile - 03_rprofile_gi_errs.py: PASS
--------------------------------------------------------------------
RASD - 01_verify_rasd_fields.py: PASS
--------------------------------------------------------------------
RASD - 02_enum.py: PASS
--------------------------------------------------------------------
RASD - 03_rasd_errs.py: PASS
--------------------------------------------------------------------
RASD - 04_disk_rasd_size.py: PASS
--------------------------------------------------------------------
RASD - 05_disk_rasd_emu_type.py: PASS
--------------------------------------------------------------------
RedirectionService - 01_enum_crs.py: PASS
--------------------------------------------------------------------
RedirectionService - 02_enum_crscap.py: PASS
--------------------------------------------------------------------
RedirectionService - 03_RedirectionSAP_errs.py: PASS
--------------------------------------------------------------------
ReferencedProfile - 01_verify_refprof.py: PASS
--------------------------------------------------------------------
ReferencedProfile - 02_refprofile_errs.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 01_forward.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 02_reverse.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 03_forward_errs.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 05_RAPF_err.py: PASS
--------------------------------------------------------------------
ResourcePool - 01_enum.py: PASS
--------------------------------------------------------------------
ResourcePool - 02_rp_gi_errors.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 01_enum.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py:
PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS
--------------------------------------------------------------------
SettingsDefine - 01_forward.py: PASS
--------------------------------------------------------------------
SettingsDefine - 02_reverse.py: PASS
--------------------------------------------------------------------
SettingsDefine - 03_sds_fwd_errs.py: PASS
--------------------------------------------------------------------
SettingsDefine - 04_sds_rev_errs.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 01_forward.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 03_forward_errs.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS
--------------------------------------------------------------------
SystemDevice - 01_forward.py: PASS
--------------------------------------------------------------------
SystemDevice - 02_reverse.py: PASS
--------------------------------------------------------------------
SystemDevice - 03_fwderrs.py: PASS
--------------------------------------------------------------------
VSSD - 01_enum.py: PASS
--------------------------------------------------------------------
VSSD - 02_bootldr.py: SKIP
--------------------------------------------------------------------
VSSD - 03_vssd_gi_errs.py: PASS
--------------------------------------------------------------------
VSSD - 04_vssd_to_rasd.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 01_definesystem_name.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 02_destroysystem.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 03_definesystem_ess.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 04_definesystem_ers.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 05_destroysystem_neg.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 06_addresource.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 07_addresource_neg.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 08_modifyresource.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 09_procrasd_persist.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 10_hv_version.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 11_define_memrasdunits.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 12_referenced_config.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 14_define_sys_disk.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 15_mod_system_settings.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationService - 01_migratable_host.py: SKIP
--------------------------------------------------------------------
VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP
--------------------------------------------------------------------
VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP
--------------------------------------------------------------------
VirtualSystemMigrationSettingData - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 01_forward.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 02_reverse.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotService - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py:
PASS
--------------------------------------------------------------------
3
2
03 Feb '09
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1233605202 28800
# Node ID f9b044c4d5ddeed5b2383186ebfb9337b102ba5d
# Parent 4327fd7361d8107c8f7fc827d62162e9151ff6dd
[TEST] Update VSMS 14_define_sys_disk.py to use cim_define()
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 4327fd7361d8 -r f9b044c4d5dd suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py Mon Feb 02 12:04:30 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py Mon Feb 02 12:06:42 2009 -0800
@@ -25,14 +25,11 @@
from VirtLib.utils import run_remote
from CimTest.Globals import logger
from CimTest.ReturnCodes import FAIL, PASS
-from XenKvmLib.common_util import create_using_definesystem
-from XenKvmLib.test_doms import destroy_and_undefine_domain
from XenKvmLib.classes import get_typed_class, inst_to_mof
from XenKvmLib.rasd import get_default_rasds
-from XenKvmLib.vsms import get_vssd_mof
-from XenKvmLib.const import get_provider_version
from XenKvmLib.const import do_main, _image_dir, f9_changeset, \
- KVM_default_disk_dev
+ KVM_default_disk_dev, get_provider_version
+from XenKvmLib.vxml import get_class
sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']
test_dom = 'rstest_disk_domain'
@@ -50,28 +47,24 @@
return path
-def get_vssd_rasd(ip, virt, addr, disk_type):
- vssd = get_vssd_mof(virt, test_dom)
+def get_rasd_list(ip, virt, addr, disk_type):
+ drasd_cn = get_typed_class(virt, "DiskResourceAllocationSettingData")
rasds = get_default_rasds(ip, virt)
- rasd_list = []
+ rasd_list = {}
for rasd in rasds:
- if 'DiskPool' in rasd['PoolID']:
+ if rasd.classname == drasd_cn:
if disk_type != "" and rasd['Caption'] != disk_type:
continue
rasd['Address'] = addr
curr_cim_rev, changeset = get_provider_version(virt, ip)
if changeset == f9_changeset and virt == 'KVM':
rasd['VirtualDevice'] = KVM_default_disk_dev
- rasd_list.append(inst_to_mof(rasd))
+ rasd_list[rasd.classname] = inst_to_mof(rasd)
- params = { 'vssd' : vssd,
- 'rasd' : rasd_list
- }
-
- return params
+ return rasd_list
@do_main(sup_types)
def main():
@@ -84,21 +77,24 @@
else:
disk_cap = ""
+ cxml = get_class(options.virt)(test_dom)
+
try:
addr = make_long_disk_path(options.ip)
if addr is None:
raise Exception("Unable to create large disk image")
- define_params = get_vssd_rasd(options.ip, options.virt, addr, disk_cap)
- if len(define_params) != 2:
- raise Exception("Unable to get VSSD and RASDs for %s" % test_dom)
+ rasd_list = get_rasd_list(options.ip, options.virt, addr, disk_cap)
+ if len(rasd_list) < 1:
+ raise Exception("Unable to get template RASDs for %s" % test_dom)
- status = create_using_definesystem(test_dom, options.ip,
- params=define_params, ref_config="",
- virt=options.virt)
- if status != PASS:
+ cxml.set_res_settings(rasd_list)
+ ret = cxml.cim_define(options.ip)
+ if not ret:
raise Exception("Unable to define %s" % test_dom)
+ status = PASS
+
except Exception, details:
logger.error(details)
status = FAIL
@@ -106,7 +102,7 @@
if os.path.exists(addr):
os.remove(addr)
- destroy_and_undefine_domain(test_dom, options.ip, options.virt)
+ cxml.undefine(options.ip)
return status
2
3
Test Run Summary (Feb 02 2009): KVM on Fedora release 9 (Sulphur) with Pegasus
by Deepti B Kalakeri 03 Feb '09
by Deepti B Kalakeri 03 Feb '09
03 Feb '09
=================================================
Test Run Summary (Feb 02 2009): KVM on Fedora release 9 (Sulphur) with Pegasus
=================================================
Distro: Fedora release 9 (Sulphur)
Kernel: 2.6.25.14-108.fc9.x86_64
libvirt: 0.4.4
Hypervisor: QEMU 0.9.1
CIMOM: Pegasus 2.7.0
Libvirt-cim revision: 613
Libvirt-cim changeset: 1fcf330fadf8+
Cimtest revision: 606
Cimtest changeset: 2ef1704ac586
=================================================
FAIL : 0
XFAIL : 3
SKIP : 11
PASS : 126
-----------------
Total : 140
=================================================
XFAIL Test Summary:
ComputerSystem - 32_start_reboot.py: XFAIL
ComputerSystem - 33_suspend_reboot.py: XFAIL
VirtualSystemManagementService - 15_mod_system_settings.py: XFAIL
=================================================
SKIP Test Summary:
ComputerSystem - 02_nosystems.py: SKIP
KVMRedirectionSAP - 01_enum_KVMredSAP.py: SKIP
LogicalDisk - 02_nodevs.py: SKIP
RASD - 05_disk_rasd_emu_type.py: SKIP
RedirectionService - 01_enum_crs.py: SKIP
RedirectionService - 02_enum_crscap.py: SKIP
RedirectionService - 03_RedirectionSAP_errs.py: SKIP
VSSD - 02_bootldr.py: SKIP
VirtualSystemMigrationService - 01_migratable_host.py: SKIP
VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP
VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP
=================================================
Full report:
--------------------------------------------------------------------
AllocationCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
AllocationCapabilities - 02_alloccap_gi_errs.py: PASS
--------------------------------------------------------------------
ComputerSystem - 01_enum.py: PASS
--------------------------------------------------------------------
ComputerSystem - 02_nosystems.py: SKIP
ERROR - System has defined domains; unable to run
--------------------------------------------------------------------
ComputerSystem - 03_defineVS.py: PASS
--------------------------------------------------------------------
ComputerSystem - 04_defineStartVS.py: PASS
--------------------------------------------------------------------
ComputerSystem - 05_activate_defined_start.py: PASS
--------------------------------------------------------------------
ComputerSystem - 06_paused_active_suspend.py: PASS
--------------------------------------------------------------------
ComputerSystem - 22_define_suspend.py: PASS
--------------------------------------------------------------------
ComputerSystem - 23_pause_pause.py: PASS
--------------------------------------------------------------------
ComputerSystem - 27_define_pause_errs.py: PASS
--------------------------------------------------------------------
ComputerSystem - 32_start_reboot.py: XFAIL
ERROR - Got CIM error CIM_ERR_FAILED: Domain Operation Failed with return code 1
ERROR - Exception: Unable reboot dom 'cs_test_domain'
InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Domain Operation Failed
Bug:<00005>
--------------------------------------------------------------------
ComputerSystem - 33_suspend_reboot.py: XFAIL
ERROR - Got CIM error CIM_ERR_NOT_SUPPORTED: State not supported with return code 7
ERROR - Exception: Unable Suspend dom 'test_domain'
InvokeMethod(RequestStateChange): CIM_ERR_NOT_SUPPORTED: State not supported
Bug:<00012>
--------------------------------------------------------------------
ComputerSystem - 35_start_reset.py: PASS
--------------------------------------------------------------------
ComputerSystem - 40_RSC_start.py: PASS
--------------------------------------------------------------------
ComputerSystem - 41_cs_to_settingdefinestate.py: PASS
--------------------------------------------------------------------
ComputerSystem - 42_cs_gi_errs.py: PASS
--------------------------------------------------------------------
ComputerSystemIndication - 01_created_indication.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 01_forward.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 03_reverse_errs.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 04_forward_errs.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 01_forward.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 03_forward_errs.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 05_hostsystem_cap.py: PASS
--------------------------------------------------------------------
ElementConforms - 01_forward.py: PASS
--------------------------------------------------------------------
ElementConforms - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementConforms - 03_ectp_fwd_errs.py: PASS
--------------------------------------------------------------------
ElementConforms - 04_ectp_rev_errs.py: PASS
--------------------------------------------------------------------
ElementSettingData - 01_forward.py: PASS
--------------------------------------------------------------------
ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS
--------------------------------------------------------------------
EnabledLogicalElementCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS
--------------------------------------------------------------------
HostSystem - 01_enum.py: PASS
--------------------------------------------------------------------
HostSystem - 02_hostsystem_to_rasd.py: PASS
--------------------------------------------------------------------
HostSystem - 03_hs_to_settdefcap.py: PASS
--------------------------------------------------------------------
HostSystem - 04_hs_to_EAPF.py: PASS
--------------------------------------------------------------------
HostSystem - 05_hs_gi_errs.py: PASS
--------------------------------------------------------------------
HostSystem - 06_hs_to_vsms.py: PASS
--------------------------------------------------------------------
HostedDependency - 01_forward.py: PASS
--------------------------------------------------------------------
HostedDependency - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedDependency - 03_enabledstate.py: PASS
--------------------------------------------------------------------
HostedDependency - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 01_forward.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 03_forward_errs.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
HostedService - 01_forward.py: PASS
--------------------------------------------------------------------
HostedService - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedService - 03_forward_errs.py: PASS
--------------------------------------------------------------------
HostedService - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
KVMRedirectionSAP - 01_enum_KVMredSAP.py: SKIP
--------------------------------------------------------------------
LogicalDisk - 01_disk.py: PASS
--------------------------------------------------------------------
LogicalDisk - 02_nodevs.py: SKIP
ERROR - System has defined domains; unable to run
--------------------------------------------------------------------
LogicalDisk - 03_ld_gi_errs.py: PASS
--------------------------------------------------------------------
Memory - 01_memory.py: PASS
--------------------------------------------------------------------
Memory - 02_defgetmem.py: PASS
--------------------------------------------------------------------
Memory - 03_mem_gi_errs.py: PASS
--------------------------------------------------------------------
NetworkPort - 01_netport.py: PASS
--------------------------------------------------------------------
NetworkPort - 02_np_gi_errors.py: PASS
--------------------------------------------------------------------
NetworkPort - 03_user_netport.py: PASS
--------------------------------------------------------------------
Processor - 01_processor.py: PASS
--------------------------------------------------------------------
Processor - 02_definesys_get_procs.py: PASS
--------------------------------------------------------------------
Processor - 03_proc_gi_errs.py: PASS
--------------------------------------------------------------------
Profile - 01_enum.py: PASS
--------------------------------------------------------------------
Profile - 02_profile_to_elec.py: PASS
--------------------------------------------------------------------
Profile - 03_rprofile_gi_errs.py: PASS
--------------------------------------------------------------------
RASD - 01_verify_rasd_fields.py: PASS
--------------------------------------------------------------------
RASD - 02_enum.py: PASS
--------------------------------------------------------------------
RASD - 03_rasd_errs.py: PASS
--------------------------------------------------------------------
RASD - 04_disk_rasd_size.py: PASS
--------------------------------------------------------------------
RASD - 05_disk_rasd_emu_type.py: SKIP
--------------------------------------------------------------------
RedirectionService - 01_enum_crs.py: SKIP
--------------------------------------------------------------------
RedirectionService - 02_enum_crscap.py: SKIP
--------------------------------------------------------------------
RedirectionService - 03_RedirectionSAP_errs.py: SKIP
--------------------------------------------------------------------
ReferencedProfile - 01_verify_refprof.py: PASS
--------------------------------------------------------------------
ReferencedProfile - 02_refprofile_errs.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 01_forward.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 02_reverse.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 03_forward_errs.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 05_RAPF_err.py: PASS
--------------------------------------------------------------------
ResourcePool - 01_enum.py: PASS
--------------------------------------------------------------------
ResourcePool - 02_rp_gi_errors.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 01_enum.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS
--------------------------------------------------------------------
SettingsDefine - 01_forward.py: PASS
--------------------------------------------------------------------
SettingsDefine - 02_reverse.py: PASS
--------------------------------------------------------------------
SettingsDefine - 03_sds_fwd_errs.py: PASS
--------------------------------------------------------------------
SettingsDefine - 04_sds_rev_errs.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 01_forward.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 03_forward_errs.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS
--------------------------------------------------------------------
SystemDevice - 01_forward.py: PASS
--------------------------------------------------------------------
SystemDevice - 02_reverse.py: PASS
--------------------------------------------------------------------
SystemDevice - 03_fwderrs.py: PASS
--------------------------------------------------------------------
VSSD - 01_enum.py: PASS
--------------------------------------------------------------------
VSSD - 02_bootldr.py: SKIP
--------------------------------------------------------------------
VSSD - 03_vssd_gi_errs.py: PASS
--------------------------------------------------------------------
VSSD - 04_vssd_to_rasd.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 01_definesystem_name.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 02_destroysystem.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 03_definesystem_ess.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 04_definesystem_ers.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 05_destroysystem_neg.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 06_addresource.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 07_addresource_neg.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 08_modifyresource.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 10_hv_version.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 11_define_memrasdunits.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 14_define_sys_disk.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 15_mod_system_settings.py: XFAIL
ERROR - rstest_domain not updated properly.
ERROR - Exp AutomaticRecoveryAction=3, got 2
Bug:<00010>
--------------------------------------------------------------------
VirtualSystemMigrationCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationService - 01_migratable_host.py: SKIP
--------------------------------------------------------------------
VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP
--------------------------------------------------------------------
VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP
--------------------------------------------------------------------
VirtualSystemMigrationSettingData - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 01_forward.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 02_reverse.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotService - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS
--------------------------------------------------------------------
--
Thanks and Regards,
Deepti B. Kalakeri
IBM Linux Technology Center
deeptik(a)linux.vnet.ibm.com
2
4
[PATCH] [TEST] Update VSMS 12_referenced_config.py to use cim_() function
by Kaitlin Rupert 03 Feb '09
by Kaitlin Rupert 03 Feb '09
03 Feb '09
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1233605070 28800
# Node ID 4327fd7361d8107c8f7fc827d62162e9151ff6dd
# Parent fa1424f9b3f4ae005b4fcc34e18858035cc8f102
[TEST] Update VSMS 12_referenced_config.py to use cim_() function.
Also re-wrote part of this test to fix the overall test flow.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r fa1424f9b3f4 -r 4327fd7361d8 suites/libvirt-cim/cimtest/VirtualSystemManagementService/12_referenced_config.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/12_referenced_config.py Mon Feb 02 12:02:30 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/12_referenced_config.py Mon Feb 02 12:04:30 2009 -0800
@@ -21,19 +21,15 @@
#
import sys
-import pywbem
-from XenKvmLib.common_util import create_using_definesystem, \
- call_request_state_change, \
- poll_for_state_change, get_cs_instance
-from XenKvmLib import vsms
-from VirtLib import utils
+from XenKvmLib.common_util import get_cs_instance
from CimTest.Globals import logger
from XenKvmLib.const import do_main
from CimTest.ReturnCodes import FAIL, PASS
-from XenKvmLib.test_doms import destroy_and_undefine_domain
-from XenKvmLib.classes import get_typed_class
+from XenKvmLib.classes import get_typed_class, inst_to_mof
from XenKvmLib.assoc import AssociatorNames
from XenKvmLib.test_xml import dumpxml
+from XenKvmLib.vxml import get_class
+from XenKvmLib.rasd import get_default_rasds
sup_types = ['Xen', 'XenFV', 'KVM']
test_dom = 'rstest_domain'
@@ -41,21 +37,13 @@
mac = "aa:aa:aa:00:00:00"
-REQUESTED_STATE = 2
-TIME = "00000000000000.000000:000"
-
-def setup_first_guest(ip, virt):
- status = create_using_definesystem(test_dom, ip, virt=virt)
- if status != PASS:
+def setup_first_guest(ip, virt, cxml):
+ ret = cxml.cim_define(ip)
+ if not ret:
logger.error("Unable to define %s using DefineSystem()" % test_dom)
return FAIL
- rc = call_request_state_change(test_dom, ip, REQUESTED_STATE, TIME, virt)
- if rc != 0:
- logger.error("Unable to start %s" % test_dom)
- return FAIL
-
- status, cs = poll_for_state_change(ip, virt, test_dom, REQUESTED_STATE)
+ status = cxml.cim_start(ip)
if status != PASS:
logger.error("Unable to start %s" % test_dom)
return FAIL
@@ -70,7 +58,7 @@
cn = "ComputerSystem"
ccn = get_typed_class(virt, cn)
an = get_typed_class(virt, 'SettingsDefineState')
- vssd = AssociatorNames(ip, an, ccn, Name = test_dom, CreationClassName = ccn)
+ vssd = AssociatorNames(ip, an, ccn, Name=test_dom, CreationClassName=ccn)
if len(vssd) != 1:
logger.error("Returned %i vssd insts for '%s'", len(vssd), test_dom)
@@ -78,26 +66,33 @@
return vssd[0]
-def get_vssd_rasd(virt):
- vssd, def_rasd = vsms.default_vssd_rasd_str(dom_name=test_dom2,
- net_type='network',
- net_mac=mac, virt=virt)
+def setup_second_guest(ip, virt, cxml2, ref):
+ nrasd_cn = get_typed_class(virt, "NetResourceAllocationSettingData")
- rasd = []
- for inst in def_rasd:
- cn = get_typed_class(virt, "NetResourceAllocationSettingData")
- if cn in inst:
- rasd.append(inst)
+ rasds = get_default_rasds(ip, virt)
- params = {}
+ rasd_list = {}
- if len(rasd) != 1:
- return params
+ for rasd in rasds:
+ if rasd.classname == nrasd_cn:
+ rasd['Address'] = mac
+ rasd['NetworkType'] = "network"
+ rasd_list[nrasd_cn] = inst_to_mof(rasd)
+ else:
+ rasd_list[rasd.classname] = None
- params['vssd'] = vssd
- params['rasd'] = rasd
+ if rasd_list[nrasd_cn] is None:
+ logger.error("Unable to get template NetRASD")
+ return FAIL
- return params
+ cxml2.set_res_settings(rasd_list)
+
+ ret = cxml2.cim_define(ip, ref_conf=ref)
+ if not ret:
+ logger.error("Unable to define %s using DefineSystem()" % test_dom2)
+ return FAIL
+
+ return PASS
def get_dom_macs(server, dom, virt):
mac_list = []
@@ -118,8 +113,10 @@
def main():
options = main.options
+ cxml = get_class(options.virt)(test_dom)
+ cxml2 = get_class(options.virt)(test_dom2)
try:
- status = setup_first_guest(options.ip, options.virt)
+ status = setup_first_guest(options.ip, options.virt, cxml)
if status != PASS:
raise Exception("Unable to start %s" % test_dom)
@@ -127,14 +124,7 @@
if ref is None:
raise Exception("Unable to get %s reference" % test_dom)
- define_params = get_vssd_rasd(options.virt)
- if len(define_params) != 2:
- raise Exception("Unable to build VSSD and RASD instances for %s" % \
- test_dom2)
-
- status = create_using_definesystem(test_dom2, options.ip,
- params=define_params, ref_config=ref,
- virt=options.virt)
+ status = setup_second_guest(options.ip, options.virt, cxml2, ref)
if status != PASS:
raise Exception("Unable to define %s" % test_dom2)
@@ -159,8 +149,9 @@
logger.error(details)
status = FAIL
- destroy_and_undefine_domain(test_dom, options.ip, options.virt)
- destroy_and_undefine_domain(test_dom2, options.ip, options.virt)
+ cxml.cim_destroy(options.ip)
+ cxml.undefine(options.ip)
+ cxml2.undefine(options.ip)
return status
2
2
[PATCH] [TEST]Fixing VSMS/05_migratable_host_errs.py tc by modifying it to use cim_define() and cim_start()
by Deepti B. Kalakeri 03 Feb '09
by Deepti B. Kalakeri 03 Feb '09
03 Feb '09
# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1233646768 28800
# Node ID 847fc58984293f69ef35a4c5294737cf1f8e7156
# Parent 912b7615d48c8303fd3daa6e55669c6d66af23e4
[TEST]Fixing VSMS/05_migratable_host_errs.py tc by modifying it to use cim_define() and cim_start().
Also,
1) removed unnecessary import statements, Exception block.
2) Used meaningful variable names
3) Indented the tc to fit in 80 columns.
4) Added the missing destroy and undefine() calls.
Tested for Xen with current sources.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 912b7615d48c -r 847fc5898429 suites/libvirt-cim/cimtest/VirtualSystemMigrationService/05_migratable_host_errs.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/05_migratable_host_errs.py Mon Feb 02 04:45:23 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/05_migratable_host_errs.py Mon Feb 02 23:39:28 2009 -0800
@@ -21,14 +21,12 @@
#
import sys
-import pywbem
from pywbem.cim_obj import CIMInstanceName
-from VirtLib import utils
from XenKvmLib import vxml
from XenKvmLib import vsmigrations
from CimTest.Globals import logger
from XenKvmLib.const import do_main
-from CimTest.ReturnCodes import PASS, FAIL, XFAIL
+from CimTest.ReturnCodes import PASS, FAIL
sup_types = ['Xen', 'XenFV']
@@ -39,49 +37,57 @@ exp_desc = 'Missing key (Name) in Comput
@do_main(sup_types)
def main():
options = main.options
+ server = options.ip
virt_xml = vxml.get_class(options.virt)
cxml = virt_xml(test_dom)
- ret = cxml.create(options.ip)
+ ret = cxml.cim_define(server)
if not ret:
- logger.error("Error create domain %s" % test_dom )
+ logger.error("Error define domain %s" % test_dom )
return FAIL
+ status = cxml.cim_start(server)
+ if status != PASS:
+ cxml.undefine(server)
+ logger.error("Error start domain %s" % test_dom )
+ return status
+
status = FAIL
- rc = -1
+ mig_successful = False
try:
- service = vsmigrations.Xen_VirtualSystemMigrationService(options.ip)
+ service = vsmigrations.Xen_VirtualSystemMigrationService(server)
except Exception:
- logger.error("Error when go to the class of Xen_VirtualSystemMigrationService")
+ logger.error("Error using Xen_VirtualSystemMigrationService")
+ cxml.destroy(server)
+ cxml.undefine(server)
return FAIL
classname = 'Xen_ComputerSystem'
- cs_ref = CIMInstanceName(classname, keybindings = {
- 'Wrong':test_dom,
- 'CreationClassName':classname})
+ cs_ref = CIMInstanceName(classname,
+ keybindings = { 'Wrong':test_dom,
+ 'CreationClassName':classname})
try:
service.CheckVirtualSystemIsMigratableToHost(ComputerSystem=cs_ref,
- DestinationHost=options.ip)
+ DestinationHost=server)
service.MigrateVirtualSystemToHost(ComputerSystem=cs_ref,
- DestinationHost=options.ip)
- rc = 0
- except pywbem.CIMError, (rc, desc):
+ DestinationHost=server)
+ mig_successful = True
+ except Exception, (rc, desc):
if rc == exp_rc and desc.find(exp_desc) >= 0:
- logger.info('Got expected rc code and error string.')
+ logger.info('Got expected rc code :%s', rc)
+ logger.info('Got expected error string:%s', desc)
status = PASS
else:
- logger.error('Unexpected rc code %s and description:\n %s' % (rc, desc))
- except Exception, details:
- logger.error('Unknown exception happened')
- logger.error(details)
+ logger.error('Unexpected rc code %s and description: %s', rc, desc)
- if rc == 0:
- logger.error('Migrate to host method should NOT return OK with a wrong key input')
+ if mig_successful == True:
+ logger.error('Migrate to host method should NOT return OK '
+ 'since wrong key was supplied')
- cxml.destroy(options.ip)
- cxml.undefine(options.ip)
+ cxml.destroy(server)
+ cxml.undefine(server)
return status
1
0
03 Feb '09
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1233604950 28800
# Node ID fa1424f9b3f4ae005b4fcc34e18858035cc8f102
# Parent 912b7615d48c8303fd3daa6e55669c6d66af23e4
[TEST] Update VSMS 03_definesystem_ess.py to use cim_define()
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 912b7615d48c -r fa1424f9b3f4 suites/libvirt-cim/cimtest/VirtualSystemManagementService/03_definesystem_ess.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/03_definesystem_ess.py Mon Feb 02 04:45:23 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/03_definesystem_ess.py Mon Feb 02 12:02:30 2009 -0800
@@ -23,17 +23,14 @@
#
import sys
-import pywbem
-from VirtLib import utils
-from XenKvmLib import vsms
-from XenKvmLib.test_doms import undefine_test_domain
-from XenKvmLib.common_util import create_using_definesystem
+from pywbem import CIM_ERR_FAILED
from CimTest.Globals import logger
from XenKvmLib.const import do_main
from CimTest.ReturnCodes import PASS, FAIL
+from XenKvmLib.vxml import get_class
sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
-exp_rc = 1 #CMPI_RC_ERR_FAILED
+exp_rc = CIM_ERR_FAILED
exp_desc = 'Unable to parse embedded object'
@do_main(sup_types)
@@ -42,25 +39,31 @@
dname = 'test_domain'
- vssd, rasd = vsms.default_vssd_rasd_str(dom_name=dname, virt=options.virt)
+ cxml = get_class(options.virt)(dname)
+ cxml.set_sys_settings("wrong")
- params = {'vssd' : 'wrong',
- 'rasd' : rasd
- }
+ ret = cxml.cim_define(options.ip)
+ if ret:
+ logger.error('DefineSystem should NOT return OK with a wrong ss input')
+ status = FAIL
- exp_err = {'exp_rc' : exp_rc,
- 'exp_desc' : exp_desc
- }
+ try:
+ if int(cxml.err_rc) != exp_rc:
+ raise Exception("Got rc: %d, exp %d." % (int(cxml.err_rc), exp_rc))
- rc = create_using_definesystem(dname, options.ip, params, ref_config=' ',
- exp_err=exp_err, virt=options.virt)
+ if cxml.err_desc.find(exp_desc) < 0:
+ raise Exception("Got desc: '%s', exp '%s'" % (cxml.err_desc,
+ exp_desc))
- if rc != PASS:
- logger.error('DefineSystem should NOT return OK with a wrong ss input')
+ status = PASS
- undefine_test_domain(dname, options.ip, virt=options.virt)
+ except Exception, details:
+ logger.error(details)
+ status = FAIL
- return rc
+ cxml.undefine(options.ip)
+
+ return status
if __name__ == "__main__":
sys.exit(main())
2
1
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1232519221 28800
# Node ID 6fa1f52dc8298b4d643fc94bb3f91715cc40dd58
# Parent e4f4e7c64325395494355516d4c111977f5b451a
Add a migration_tester.py tool.
This can be used to drive migration between two different hosts.
How to call the tester:
python tools/migrate_tester.py -u user -p pass -s fqdn:port -t fqdn guest_name
Ex:
python tools/migrate_tester.py -u root -p mypass -s my_host.my_domain.com:5988 -t my_target.my_domain.com my_guest
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r e4f4e7c64325 -r 6fa1f52dc829 tools/migration_tester.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/migration_tester.py Tue Jan 20 22:27:01 2009 -0800
@@ -0,0 +1,301 @@
+#!/usr/bin/python
+#
+# Copyright IBM Corp. 2009
+#
+# Authors:
+# Kaitlin Rupert <karupert(a)us.ibm.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+
+import sys
+import time
+from optparse import OptionParser
+from pywbem import WBEMConnection, CIMInstanceName, CIMInstance, CIMError
+
+CIM_MIGRATE_OTHER=1
+CIM_MIGRATE_LIVE=2
+CIM_MIGRATE_RESUME=3
+CIM_MIGRATE_RESTART=4
+
+CIM_MIGRATE_URI_OTHER=1
+CIM_MIGRATE_URI_SSH=2
+CIM_MIGRATE_URI_TLS=3
+CIM_MIGRATE_URI_TLS_STRICT=4
+CIM_MIGRATE_URI_TCP=5
+CIM_MIGRATE_URI_UNIX=6
+
+CIM_JOBSTATE_COMPLETE=7
+
+class CIMClassMOF:
+
+ __supported_types = [int, str, bool]
+
+ def __init__(self, attrs = None):
+ """attrs should be dict
+ """
+
+ if attrs != None:
+ self.__dict__.update(attrs)
+
+ def mof(self):
+ """mof()
+
+ Return value is a string, containing the mof representation of the
+ object.
+
+ Attribute types supported are : int, str, bool.
+
+ Attributes with unsupported types will be silently ignored when
+ converting to mof representation.
+ """
+
+ mof_str = "instance of " + self.__class__.__name__ + " {\n"
+ for key, value in self.__dict__.items():
+ value_type = type(value)
+ if value_type not in self.__supported_types:
+ continue
+
+ mof_str += "%s = " % key
+ if value_type == int:
+ mof_str += "%d" % value
+ elif value_type == bool:
+ mof_str += str(value).lower()
+ else:
+ mof_str += '"%s"' % value
+ mof_str += ";\n"
+
+ mof_str += "};"
+ return mof_str
+
+ def __str__(self):
+ return self.mof()
+
+class CIM_VirtualSystemMigrationSettingData(CIMClassMOF):
+ def __init__(self, type, priority):
+ self.InstanceID = 'MigrationSettingData'
+ self.CreationClassName = self.__class__.__name__
+ self.MigrationType = type
+ self.Priority = priority
+
+class Xen_VirtualSystemMigrationSettingData(CIM_VirtualSystemMigrationSettingData):
+ def __init__(self, type, priority):
+ CIM_VirtualSystemMigrationSettingData.__init__(self, type, priority)
+
+class KVM_VirtualSystemMigrationSettingData(CIM_VirtualSystemMigrationSettingData):
+ def __init__(self, type, priority):
+ CIM_VirtualSystemMigrationSettingData.__init__(self, type, priority)
+
+def get_guest_ref(guest, virt):
+ guest_cn = "%s_ComputerSystem" % virt
+
+ keys = { 'Name' : guest,
+ 'CreationClassName' : guest_cn
+ }
+
+ try:
+ cs_ref = CIMInstanceName(guest_cn, keybindings=keys)
+
+ except CIMError, (err_no, desc):
+ print err_no, desc
+ return None
+
+ return cs_ref
+
+def get_msd(mtype, virt):
+ if mtype == "live":
+ mtype = CIM_MIGRATE_LIVE
+ elif mtype == "resume":
+ mtype = CIM_MIGRATE_RESUME
+ elif mtype == "restart":
+ mtype = CIM_MIGRATE_RESTART
+ else:
+ mtype = CIM_MIGRATE_OTHER
+
+ try:
+ vsmsd_cn_base = "_VirtualSystemMigrationSettingData"
+ msd = eval(virt + vsmsd_cn_base)(type=mtype, priority=0)
+
+ except CIMError, (err_no, desc):
+ print err_no, desc
+ return None
+
+ return msd.mof()
+
+def check_migrate(s_conn, cs_ref, ip, msd, virt):
+ vsms_cn = "%s_VirtualSystemMigrationService" % virt
+ try:
+ if msd == None:
+ res = s_conn.InvokeMethod("CheckVirtualSystemIsMigratableToHost",
+ vsms_cn,
+ ComputerSystem=cs_ref,
+ DestinationHost=ip)
+ else:
+ res = s_conn.InvokeMethod("CheckVirtualSystemIsMigratableToHost",
+ vsms_cn,
+ ComputerSystem=cs_ref,
+ DestinationHost=ip,
+ MigrationSettingData=msd)
+
+ if res == None or res[1]['IsMigratable'] != True:
+ print "Migration check failed."
+ return 1
+
+ except CIMError, (err_no, desc):
+ print err_no, desc
+ return 1
+
+ return 0
+
+def get_job_inst(s_conn, job_ref):
+ try:
+ inst = s_conn.GetInstance(job_ref)
+
+ except CIMError, (err_no, desc):
+ print err_no, desc
+ return None
+
+ return inst
+
+def poll_for_job_status(s_conn, job_ref):
+
+ job_inst = get_job_inst(s_conn, job_ref)
+ if not job_inst:
+ print "Unable to get job instance"
+ return 1
+
+ try:
+ while job_inst['JobState'] != CIM_JOBSTATE_COMPLETE:
+ time.sleep(3)
+ job_inst = get_job_inst(s_conn, job_ref)
+ if not job_inst:
+ print "Unable to get job instance"
+ return 1
+
+ if job_inst['Status'] != "Completed":
+ print "Migrate job failed: %s" % job_inst['Status']
+ return 1
+ except KeyboardInterrupt:
+ print "Migrate job took too long"
+ return 1
+
+ print "Migrate job succeeded: %s" % job_inst['Status']
+ return 0
+
+def migrate_host(s_conn, cs_ref, dest, msd, virt):
+ vsms_cn = "%s_VirtualSystemMigrationService" % virt
+
+ try:
+ if msd == None:
+ job = s_conn.InvokeMethod("MigrateVirtualSystemToHost",
+ vsms_cn,
+ ComputerSystem=cs_ref,
+ DestinationHost=dest)
+ else:
+ job = s_conn.InvokeMethod("MigrateVirtualSystemToHost",
+ vsms_cn,
+ ComputerSystem=cs_ref,
+ DestinationHost=dest,
+ MigrationSettingData=msd)
+
+ if len(job) < 1:
+ print "No job returned from migrate call"
+ return 1
+
+ status = poll_for_job_status(s_conn, job[1]['Job'])
+
+ except CIMError, (err_no, desc):
+ print err_no, desc
+ return 1
+
+ return 0
+
+def main():
+ usage = "usage: %prog [options] <target system>\nex: %prog my.target.com"
+ parser = OptionParser(usage)
+
+ parser.add_option("-s", "--src-url", dest="s_url", default="localhost:5988",
+ help="URL of CIMOM to connect to (host:port)")
+ parser.add_option("-t", "--target-url", dest="t_url",
+ default="localhost:5988",
+ help="URL of CIMOM to connect to (host:port)")
+ parser.add_option("-N", "--ns", dest="ns", default="root/virt",
+ help="Namespace (default is root/virt)")
+ parser.add_option("-u", "--user", dest="username", default=None,
+ help="HTTP Auth username")
+ parser.add_option("-p", "--pass", dest="password", default=None,
+ help="HTTP Auth password")
+ parser.add_option("-v", "--virt-type", dest="virt", default=None,
+ help="Virtualization type [ Xen | KVM ]")
+ parser.add_option("--migration-type", dest="type", default=None,
+ help="Migration type: [ live | resume | restart ]")
+ parser.add_option("--disable-check", dest="disable_ck", action="store_true",
+ help="Disable migration pre-check")
+
+ (options, args) = parser.parse_args()
+
+ if len(args) == 0:
+ print "Fatal: no guest specified."
+ sys.exit(1)
+
+ guest_name = args[0]
+
+ if ":" in options.s_url:
+ (sysname, port) = options.s_url.split(":")
+ else:
+ sysname = options.s_url
+
+ if ":" in options.t_url:
+ (t_sysname, port) = options.t_url.split(":")
+ else:
+ t_sysname = options.t_url
+
+ src_conn = WBEMConnection('http://%s' % sysname,
+ (options.username, options.password), options.ns)
+
+ guest_ref = get_guest_ref(guest_name, options.virt)
+ if guest_ref == None:
+ return 1
+
+ if options.virt == None:
+ print "Must specify virtualization type"
+ return 1
+
+ if options.virt != "Xen":
+ print "Only Xen migration is currently supported"
+ return 1
+
+ if options.type != None:
+ msd = get_msd(options.type, options.virt)
+ if msd == None:
+ return 1
+ else:
+ print "Using default MigrationSettingData"
+ msd = None
+
+ if not options.disable_ck:
+ status = check_migrate(src_conn, guest_ref, t_sysname, msd,
+ options.virt)
+ if status == 1:
+ return 1
+
+ print "Migrating %s.. this will take some time." % guest_name
+ status = migrate_host(src_conn, guest_ref, t_sysname, msd, options.virt)
+ return status
+
+if __name__=="__main__":
+ sys.exit(main())
+
+
2
1
Test Run Summary (Feb 02 2009): Xen on Red Hat Enterprise Linux Server release 5.2 Beta (Tikanga) with Pegasus
by Deepti B Kalakeri 02 Feb '09
by Deepti B Kalakeri 02 Feb '09
02 Feb '09
================================================
Test Run Summary (Feb 02 2009): Xen on Red Hat Enterprise Linux Server release 5.2 Beta (Tikanga) with Pegasus
=================================================
Distro: Red Hat Enterprise Linux Server release 5.2 Beta (Tikanga)
Kernel: 2.6.18-88.el5xen
libvirt: 0.3.3
Hypervisor: Xen 3.1.0
CIMOM: Pegasus 2.7.0
Libvirt-cim revision: 807
Libvirt-cim changeset: 189cc68a2f5a
Cimtest revision: 606
Cimtest changeset: 2ef1704ac586
=================================================
FAIL : 10
XFAIL : 1
SKIP : 3
PASS : 128
-----------------
Total : 142
=================================================
FAIL Test Summary:
ElementConforms - 01_forward.py: FAIL
HostSystem - 03_hs_to_settdefcap.py: FAIL
KVMRedirectionSAP - 01_enum_KVMredSAP.py: FAIL
RASD - 01_verify_rasd_fields.py: FAIL
SettingsDefineCapabilities - 01_forward.py: FAIL
VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL
VirtualSystemMigrationService - 05_migratable_host_errs.py: FAIL
VirtualSystemSettingDataComponent - 02_reverse.py: FAIL
VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: FAIL
VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: FAIL
=================================================
XFAIL Test Summary:
ComputerSystem - 33_suspend_reboot.py: XFAIL
=================================================
SKIP Test Summary:
ComputerSystem - 02_nosystems.py: SKIP
LogicalDisk - 02_nodevs.py: SKIP
NetworkPort - 03_user_netport.py: SKIP
=================================================
Full report:
--------------------------------------------------------------------
AllocationCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
AllocationCapabilities - 02_alloccap_gi_errs.py: PASS
--------------------------------------------------------------------
ComputerSystem - 01_enum.py: PASS
--------------------------------------------------------------------
ComputerSystem - 02_nosystems.py: SKIP
--------------------------------------------------------------------
ComputerSystem - 03_defineVS.py: PASS
--------------------------------------------------------------------
ComputerSystem - 04_defineStartVS.py: PASS
--------------------------------------------------------------------
ComputerSystem - 05_activate_defined_start.py: PASS
--------------------------------------------------------------------
ComputerSystem - 06_paused_active_suspend.py: PASS
--------------------------------------------------------------------
ComputerSystem - 22_define_suspend.py: PASS
--------------------------------------------------------------------
ComputerSystem - 23_pause_pause.py: PASS
--------------------------------------------------------------------
ComputerSystem - 27_define_pause_errs.py: PASS
--------------------------------------------------------------------
ComputerSystem - 32_start_reboot.py: PASS
--------------------------------------------------------------------
ComputerSystem - 33_suspend_reboot.py: XFAIL
ERROR - Got CIM error CIM_ERR_NOT_SUPPORTED: State not supported with return code 7
ERROR - Exception: Unable Suspend dom 'test_domain'
InvokeMethod(RequestStateChange): CIM_ERR_NOT_SUPPORTED: State not supported
Bug:<00012>
--------------------------------------------------------------------
ComputerSystem - 35_start_reset.py: PASS
--------------------------------------------------------------------
ComputerSystem - 40_RSC_start.py: PASS
--------------------------------------------------------------------
ComputerSystem - 41_cs_to_settingdefinestate.py: PASS
--------------------------------------------------------------------
ComputerSystem - 42_cs_gi_errs.py: PASS
--------------------------------------------------------------------
ComputerSystemIndication - 01_created_indication.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 01_forward.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 03_reverse_errs.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 04_forward_errs.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 01_forward.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 03_forward_errs.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 05_hostsystem_cap.py: PASS
--------------------------------------------------------------------
ElementConforms - 01_forward.py: FAIL
ERROR - verify_fields() exception: u'Xen_AllocationCapabilities'
ERROR - Exception: Failed to verify instance
CIM_ERR_INVALID_CLASS: Linux_ComputerSystem
--------------------------------------------------------------------
ElementConforms - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementConforms - 03_ectp_fwd_errs.py: PASS
--------------------------------------------------------------------
ElementConforms - 04_ectp_rev_errs.py: PASS
--------------------------------------------------------------------
ElementSettingData - 01_forward.py: PASS
--------------------------------------------------------------------
ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS
--------------------------------------------------------------------
EnabledLogicalElementCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS
--------------------------------------------------------------------
HostSystem - 01_enum.py: PASS
--------------------------------------------------------------------
HostSystem - 02_hostsystem_to_rasd.py: PASS
--------------------------------------------------------------------
HostSystem - 03_hs_to_settdefcap.py: FAIL
ERROR - 'Xen_SettingsDefineCapabilities' returned 16 RASD objects instead of 8
CIM_ERR_INVALID_CLASS: Linux_ComputerSystem
--------------------------------------------------------------------
HostSystem - 04_hs_to_EAPF.py: PASS
--------------------------------------------------------------------
HostSystem - 05_hs_gi_errs.py: PASS
--------------------------------------------------------------------
HostSystem - 06_hs_to_vsms.py: PASS
--------------------------------------------------------------------
HostedDependency - 01_forward.py: PASS
--------------------------------------------------------------------
HostedDependency - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedDependency - 03_enabledstate.py: PASS
--------------------------------------------------------------------
HostedDependency - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 01_forward.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 03_forward_errs.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
HostedService - 01_forward.py: PASS
--------------------------------------------------------------------
HostedService - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedService - 03_forward_errs.py: PASS
--------------------------------------------------------------------
HostedService - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
KVMRedirectionSAP - 01_enum_KVMredSAP.py: FAIL
ERROR - Exception details: 'ElementName' Value Mismatch, Expected 5949:-1, Got -1:-1
ERROR - Exception: Failed to verify information for the defined dom:test_kvmredsap_dom
--------------------------------------------------------------------
LogicalDisk - 01_disk.py: PASS
--------------------------------------------------------------------
LogicalDisk - 02_nodevs.py: SKIP
ERROR - System has defined domains; unable to run
--------------------------------------------------------------------
LogicalDisk - 03_ld_gi_errs.py: PASS
--------------------------------------------------------------------
Memory - 01_memory.py: PASS
--------------------------------------------------------------------
Memory - 02_defgetmem.py: PASS
--------------------------------------------------------------------
Memory - 03_mem_gi_errs.py: PASS
--------------------------------------------------------------------
NetworkPort - 01_netport.py: PASS
--------------------------------------------------------------------
NetworkPort - 02_np_gi_errors.py: PASS
--------------------------------------------------------------------
NetworkPort - 03_user_netport.py: SKIP
--------------------------------------------------------------------
Processor - 01_processor.py: PASS
--------------------------------------------------------------------
Processor - 02_definesys_get_procs.py: PASS
--------------------------------------------------------------------
Processor - 03_proc_gi_errs.py: PASS
--------------------------------------------------------------------
Profile - 01_enum.py: PASS
--------------------------------------------------------------------
Profile - 02_profile_to_elec.py: PASS
--------------------------------------------------------------------
Profile - 03_rprofile_gi_errs.py: PASS
--------------------------------------------------------------------
RASD - 01_verify_rasd_fields.py: FAIL
ERROR - (6, u'CIM_ERR_NOT_FOUND: No such instance (domguest/xvda)')
ERROR - Enum RASDs failed
--------------------------------------------------------------------
RASD - 02_enum.py: PASS
--------------------------------------------------------------------
RASD - 03_rasd_errs.py: PASS
--------------------------------------------------------------------
RASD - 04_disk_rasd_size.py: PASS
--------------------------------------------------------------------
RASD - 05_disk_rasd_emu_type.py: PASS
--------------------------------------------------------------------
RedirectionService - 01_enum_crs.py: PASS
--------------------------------------------------------------------
RedirectionService - 02_enum_crscap.py: PASS
--------------------------------------------------------------------
RedirectionService - 03_RedirectionSAP_errs.py: PASS
--------------------------------------------------------------------
ReferencedProfile - 01_verify_refprof.py: PASS
--------------------------------------------------------------------
ReferencedProfile - 02_refprofile_errs.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 01_forward.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 02_reverse.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 03_forward_errs.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 05_RAPF_err.py: PASS
--------------------------------------------------------------------
ResourcePool - 01_enum.py: PASS
--------------------------------------------------------------------
ResourcePool - 02_rp_gi_errors.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 01_enum.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS
--------------------------------------------------------------------
SettingsDefine - 01_forward.py: PASS
--------------------------------------------------------------------
SettingsDefine - 02_reverse.py: PASS
--------------------------------------------------------------------
SettingsDefine - 03_sds_fwd_errs.py: PASS
--------------------------------------------------------------------
SettingsDefine - 04_sds_rev_errs.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 01_forward.py: FAIL
ERROR - Xen_SettingsDefineCapabilities returned 16 ResourcePool objects instead of 8
--------------------------------------------------------------------
SettingsDefineCapabilities - 03_forward_errs.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS
--------------------------------------------------------------------
SystemDevice - 01_forward.py: PASS
--------------------------------------------------------------------
SystemDevice - 02_reverse.py: PASS
--------------------------------------------------------------------
SystemDevice - 03_fwderrs.py: PASS
--------------------------------------------------------------------
VSSD - 01_enum.py: PASS
--------------------------------------------------------------------
VSSD - 02_bootldr.py: PASS
--------------------------------------------------------------------
VSSD - 03_vssd_gi_errs.py: PASS
--------------------------------------------------------------------
VSSD - 04_vssd_to_rasd.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 01_definesystem_name.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 02_destroysystem.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 03_definesystem_ess.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 04_definesystem_ers.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 05_destroysystem_neg.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 06_addresource.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 07_addresource_neg.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 08_modifyresource.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 09_procrasd_persist.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 10_hv_version.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 11_define_memrasdunits.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 12_referenced_config.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 14_define_sys_disk.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 15_mod_system_settings.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationService - 01_migratable_host.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL
ERROR - EnabledState is 9 instead of 2.
ERROR - Try to increase the timeout and run the test again
ERROR - Error start domain dom_migrate
--------------------------------------------------------------------
VirtualSystemMigrationService - 05_migratable_host_errs.py: FAIL
ERROR - Error create domain dom_migration
--------------------------------------------------------------------
VirtualSystemMigrationSettingData - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 01_forward.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 02_reverse.py: FAIL
ERROR - Failed to create the dom: VSSDC_dom
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: FAIL
ERROR - Unable to create domain domu1
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: FAIL
ERROR - Unable to create domain domu1
--------------------------------------------------------------------
VirtualSystemSnapshotService - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS
--------------------------------------------------------------------
--
Thanks and Regards,
Deepti B. Kalakeri
IBM Linux Technology Center
deeptik(a)linux.vnet.ibm.com
2
2
[PATCH] [TEST] Fixed VSSD/04_vssdc_rev_errs.py tc by using cim_define() and cim_start()
by Deepti B. Kalakeri 02 Feb '09
by Deepti B. Kalakeri 02 Feb '09
02 Feb '09
# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1233578723 28800
# Node ID 4124eabc89cabd32e3fe905194a55dac0c949249
# Parent 48a13c2a3f549ed5c93e9e0d99d9399b63c3ec0f
[TEST] Fixed VSSD/04_vssdc_rev_errs.py tc by using cim_define() and cim_start().
Also, fixed indentation in the tc to fit the 80 columns.
Tested for Xen with current sources.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 48a13c2a3f54 -r 4124eabc89ca suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/04_vssdc_rev_errs.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/04_vssdc_rev_errs.py Mon Feb 02 04:28:37 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/04_vssdc_rev_errs.py Mon Feb 02 04:45:23 2009 -0800
@@ -69,13 +69,13 @@ from CimTest.Globals import CIM_USER, CI
sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']
-test_dom = "domu1"
+test_dom = "domu1"
expr_values = {
- "INVALID_InstID_Keyname" : { 'rc' : pywbem.CIM_ERR_NOT_FOUND, \
- 'desc' : 'No such instance (InstanceID)' }, \
- "INVALID_InstID_Keyval" : { 'rc' : pywbem.CIM_ERR_NOT_FOUND, \
- 'desc' : 'No such instance (InstanceID)'}
+ "INVALID_InstID_Keyname" : { 'rc' : pywbem.CIM_ERR_NOT_FOUND,
+ 'desc' : 'No such instance (InstanceID)' },
+ "INVALID_InstID_Keyval" : { 'rc' : pywbem.CIM_ERR_NOT_FOUND,
+ 'desc' : 'No such instance (InstanceID)'}
}
def try_invalid_assoc(name_val, i, field, virt="Xen"):
@@ -87,8 +87,8 @@ def try_invalid_assoc(name_val, i, field
for j in range(len(name_val)/2):
k = j * 2
keys[name_val[k]] = name_val[k+1]
- 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 %s------", classname, field)
name_val[i] = temp
@@ -98,36 +98,41 @@ def try_invalid_assoc(name_val, i, field
@do_main(sup_types)
def main():
options = main.options
- if not options.ip:
- parser.print_help()
- return FAIL
+ virt = options.virt
status = PASS
destroy_and_undefine_all(options.ip)
- virt_xml = vxml.get_class(options.virt)
+ virt_xml = vxml.get_class(virt)
cxml = virt_xml(test_dom)
- ret = cxml.create(options.ip)
+
+ ret = cxml.cim_define(options.ip)
if not ret:
- logger.error('Unable to create domain %s' % test_dom)
+ logger.error('Unable to define domain %s' % test_dom)
+ return FAIL
+
+ status = cxml.cim_start(options.ip)
+ if status != PASS:
+ cxml.undefine(options.ip)
+ logger.error('Unable to start domain %s' % test_dom)
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)
tc_scen = ['INVALID_InstID_Keyname', 'INVALID_InstID_Keyval']
- if options.virt == "Xen" or options.virt == "XenFV":
+ if virt == "Xen" or virt == "XenFV":
inst_id = "Xen:%s" % test_dom
else:
- inst_id = "%s:%s" % (options.virt, test_dom)
+ inst_id = "%s:%s" % (virt, test_dom)
name_val = ['InstanceID', inst_id]
for i in range(len(tc_scen)):
- retval = try_invalid_assoc(name_val, i, tc_scen[i], options.virt)
+ retval = try_invalid_assoc(name_val, i, tc_scen[i], virt)
if retval != PASS:
status = retval
1
0
[PATCH] [TEST] Fixed VSSD/03_vssdc_fwd_errs.py tc by using cim_define() and cim_start()
by Deepti B. Kalakeri 02 Feb '09
by Deepti B. Kalakeri 02 Feb '09
02 Feb '09
# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1233577717 28800
# Node ID 48a13c2a3f549ed5c93e9e0d99d9399b63c3ec0f
# Parent aa594a83ba23554622b360346bb18088d510e293
[TEST] Fixed VSSD/03_vssdc_fwd_errs.py tc by using cim_define() and cim_start().
Also, fixed indentation in the tc to fit the 80 columns.
Tested for Xen with current sources.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r aa594a83ba23 -r 48a13c2a3f54 suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/03_vssdc_fwd_errs.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/03_vssdc_fwd_errs.py Mon Feb 02 04:03:45 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/03_vssdc_fwd_errs.py Mon Feb 02 04:28:37 2009 -0800
@@ -71,10 +71,11 @@ test_vcpus = 1
test_vcpus = 1
expr_values = {
- "INVALID_InstID_Keyname" : { 'rc' : pywbem.CIM_ERR_FAILED, \
- 'desc' : 'Missing InstanceID' }, \
- "INVALID_InstID_Keyval" : { 'rc' : pywbem.CIM_ERR_NOT_FOUND, \
- 'desc' : 'No such instance (INVALID_InstID_Keyval)'}
+ "INVALID_InstID_Keyname" : { 'rc' : pywbem.CIM_ERR_FAILED,
+ 'desc' : 'Missing InstanceID' },
+ "INVALID_InstID_Keyval" : { 'rc' : pywbem.CIM_ERR_NOT_FOUND,
+ 'desc' : 'No such instance '\
+ '(INVALID_InstID_Keyval)'}
}
def try_invalid_assoc(classname, name_val, i, field, virt="Xen"):
@@ -96,41 +97,46 @@ def try_invalid_assoc(classname, name_va
@do_main(sup_types)
def main():
options = main.options
- if not options.ip:
- parser.print_help()
- return FAIL
-
+ virt = options.virt
status = PASS
destroy_and_undefine_all(options.ip)
- if options.virt == "Xen":
+ if virt == "Xen":
test_disk = "xvda"
else:
test_disk = "hda"
- virt_xml = vxml.get_class(options.virt)
- if options.virt == 'LXC':
+ virt_xml = vxml.get_class(virt)
+ if virt == 'LXC':
cxml = virt_xml(test_dom)
else:
- cxml = virt_xml(test_dom, vcpus = test_vcpus, mac = test_mac, disk = test_disk)
- ret = cxml.create(options.ip)
+ cxml = virt_xml(test_dom, vcpus = test_vcpus,
+ mac = test_mac, disk = test_disk)
+
+ ret = cxml.cim_define(options.ip)
if not ret:
- logger.error('Unable to create domain %s' % test_dom)
+ logger.error('Unable to define domain %s' % test_dom)
+ return FAIL
+
+ status = cxml.cim_start(options.ip)
+ if status != PASS:
+ cxml.undefine(options.ip)
+ logger.error('Unable to start domain %s' % test_dom)
return FAIL
global conn
- conn = assoc.myWBEMConnection('http://%s' % options.ip, (CIM_USER, \
- CIM_PASS), CIM_NS)
- disk_rasd = get_typed_class(options.virt, 'DiskResourceAllocationSettingData')
- mem_rasd = get_typed_class(options.virt, 'MemResourceAllocationSettingData')
- net_rasd = get_typed_class(options.virt, 'NetResourceAllocationSettingData')
- proc_rasd = get_typed_class(options.virt, 'ProcResourceAllocationSettingData')
+ conn = assoc.myWBEMConnection('http://%s' % options.ip, (CIM_USER,
+ CIM_PASS), CIM_NS)
+ disk_rasd = get_typed_class(virt, 'DiskResourceAllocationSettingData')
+ mem_rasd = get_typed_class(virt, 'MemResourceAllocationSettingData')
+ net_rasd = get_typed_class(virt, 'NetResourceAllocationSettingData')
+ proc_rasd = get_typed_class(virt, 'ProcResourceAllocationSettingData')
class_id = {
- disk_rasd : test_disk, \
- mem_rasd : 'mem', \
- net_rasd : test_mac, \
+ disk_rasd : test_disk,
+ mem_rasd : 'mem',
+ net_rasd : test_mac,
proc_rasd : '0'
}
@@ -140,7 +146,7 @@ def main():
devid = "%s/%s" % (test_dom, devid)
name_val = ['InstanceID', devid]
for i in range(len(tc_scen)):
- retval = try_invalid_assoc(classname, name_val, i, tc_scen[i], options.virt)
+ retval = try_invalid_assoc(classname, name_val, i, tc_scen[i], virt)
if retval != PASS:
status = retval
1
0
[PATCH] [TEST] Fixing the EAFP/01_forward.py and VSSDC/02_reverse.py by using cim_define() and cim_start()
by Deepti B. Kalakeri 02 Feb '09
by Deepti B. Kalakeri 02 Feb '09
02 Feb '09
# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1233576225 28800
# Node ID aa594a83ba23554622b360346bb18088d510e293
# Parent 2ef1704ac58621c6e35bf604a32dd311e3bc6a3a
[TEST] Fixing the EAFP/01_forward.py and VSSDC/02_reverse.py by using cim_define() and cim_start().
Common changes to EAFP/01_forward.py and VSSDC/02_reverse.py:
-------------------------------------------------------------
Modified the tc to use cim_define() and cim_start() instead of create()
which was causing the tc to fail with Xen.
Changes to EAFP/01_forward.py:
------------------------------
1) Added try, except block.
Changes to VSSDC/02_reverse.py:
-------------------------------
1) Removed unnecessary Global import statement.
2) Did some Indentation changes to the tc to fit 80 columns.
The test cases can be further improved in the next cycle to make use of EnumInstances() and compare_all_prop()
to reduce the code and make it look more cleaner.
Tested for Xen with current sources.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 2ef1704ac586 -r aa594a83ba23 suites/libvirt-cim/cimtest/ElementAllocatedFromPool/01_forward.py
--- a/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/01_forward.py Fri Jan 30 13:05:27 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/01_forward.py Mon Feb 02 04:03:45 2009 -0800
@@ -96,7 +96,6 @@ def get_pool_details(server, virt, vsxml
key_list = {"InstanceID" : k}
inst = get_inst(server, virt, cn, key_list)
if inst is None:
- vsxml.destroy(server)
return FAIL, gi_inst_list
cn = get_typed_class(virt, cn)
gi_inst_list[cn] = { 'InstanceID' : inst.InstanceID,
@@ -127,9 +126,11 @@ def verify_eafp_values(server, virt, in_
if assoc_eafp_info['InstanceID'] != gi_inst['InstanceID']:
field_err(assoc_eafp_info, gi_inst, 'InstanceID')
return FAIL
+
if assoc_eafp_info['PoolID'] != gi_inst['PoolID']:
field_err(assoc_eafp_info, gi_inst, 'PoolID')
return FAIL
+
except Exception, detail:
logger.error(CIM_ERROR_ASSOCIATORS, an)
logger.error("Exception: %s", detail)
@@ -156,31 +157,40 @@ def main():
vsxml = virt_type(test_dom, vcpus = test_vcpus, mac = test_mac,
disk = test_disk)
- ret = vsxml.create(server)
+ ret = vsxml.cim_define(server)
if not ret:
- logger.error("Failed to Create the dom: '%s'", test_dom)
+ logger.error("Failed to define the dom: '%s'", test_dom)
return FAIL
-
- mem_cn = get_typed_class(virt, "Memory")
- ldlist = {
- mem_cn : "%s/%s" % (test_dom, "mem"),
- }
- if virt != 'LXC':
- disk_cn = get_typed_class(virt, "LogicalDisk")
- net_cn = get_typed_class(virt, "NetworkPort")
- proc_cn = get_typed_class(virt, "Processor")
- ldlist[disk_cn] = "%s/%s" % (test_dom, test_disk)
- ldlist[net_cn] = "%s/%s" % (test_dom, test_mac)
- ldlist[proc_cn] = "%s/%s" % (test_dom, "0")
+ status = vsxml.cim_start(server)
+ if status != PASS:
+ logger.error("Failed to start the dom: '%s'", test_dom)
+ vsxml.undefine(server)
+ return FAIL
+ try:
+ mem_cn = get_typed_class(virt, "Memory")
+ ldlist = { mem_cn : "%s/%s" % (test_dom, "mem") }
- status, gi_inst_list = get_pool_details(server, virt, vsxml,
- default_pool_name)
- if status != PASS:
- return status
-
- status = verify_eafp_values(server, virt, ldlist, gi_inst_list)
+ if virt != 'LXC':
+ disk_cn = get_typed_class(virt, "LogicalDisk")
+ net_cn = get_typed_class(virt, "NetworkPort")
+ proc_cn = get_typed_class(virt, "Processor")
+ ldlist[disk_cn] = "%s/%s" % (test_dom, test_disk)
+ ldlist[net_cn] = "%s/%s" % (test_dom, test_mac)
+ ldlist[proc_cn] = "%s/%s" % (test_dom, "0")
+
+ status, gi_inst_list = get_pool_details(server, virt, vsxml,
+ default_pool_name)
+ if status != PASS:
+ raise Exception("Failed to get pool details")
+
+ status = verify_eafp_values(server, virt, ldlist, gi_inst_list)
+ except Exception, details:
+ logger.error("Exception details : %s", details)
+
vsxml.destroy(server)
+ vsxml.undefine(server)
+
return status
if __name__ == "__main__":
diff -r 2ef1704ac586 -r aa594a83ba23 suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py Fri Jan 30 13:05:27 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py Mon Feb 02 04:03:45 2009 -0800
@@ -47,13 +47,12 @@ import sys
import sys
from XenKvmLib import enumclass
from VirtLib import utils
-from CimTest import Globals
from XenKvmLib import assoc
from XenKvmLib.test_doms import destroy_and_undefine_all
from XenKvmLib import vxml
from XenKvmLib.classes import get_typed_class
from XenKvmLib.rasd import InstId_err
-from CimTest.Globals import logger
+from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORS
from XenKvmLib.const import do_main
from CimTest.ReturnCodes import PASS, FAIL
@@ -157,16 +156,24 @@ def main():
test_disk = "xvdb"
else:
test_disk = "hdb"
+
virt_xml = vxml.get_class(options.virt)
if options.virt == 'LXC':
cxml = virt_xml(test_dom)
else:
- cxml = virt_xml(test_dom, vcpus = test_vcpus, mac = test_mac, disk = test_disk)
- ret = cxml.create(options.ip)
+ cxml = virt_xml(test_dom, vcpus = test_vcpus,
+ mac = test_mac, disk = test_disk)
+
+ ret = cxml.cim_define(options.ip)
if not ret:
- logger.error("Failed to create the dom: %s", test_dom)
- status = FAIL
- return status
+ logger.error("Failed to define the dom: %s", test_dom)
+ return FAIL
+
+ ret = cxml.cim_start(options.ip)
+ if ret != PASS:
+ cxml.undefine(options.ip)
+ logger.error("Failed to start the dom: %s", test_dom)
+ return ret
if options.virt == "XenFV":
instIdval = "Xen:%s" % test_dom
@@ -179,10 +186,10 @@ def main():
assoc_info = assoc.AssociatorNames(options.ip, an, cn,
InstanceID = instIdval)
status = assoc_values(options.ip, assoc_info, options.virt)
+
except Exception, detail :
- logger.error(Globals.CIM_ERROR_ASSOCIATORS,
- 'VirtualSystemSettingDataComponent')
- logger.error("Exception : %s" % detail)
+ logger.error(CIM_ERROR_ASSOCIATORS, an)
+ logger.error("Exception : %s", detail)
status = FAIL
cxml.destroy(options.ip)
1
0
Test Run Summary (Feb 02 2009): LXC on Fedora release 9.90.1 (Rawhide) with sfcb
by Deepti B Kalakeri 02 Feb '09
by Deepti B Kalakeri 02 Feb '09
02 Feb '09
=================================================
Test Run Summary (Feb 02 2009): LXC on Fedora release 9.90.1 (Rawhide) with sfcb
=================================================
Distro: Fedora release 9.90.1 (Rawhide)
Kernel: 2.6.27-0.323.rc6.fc10.x86_64
libvirt: 0.4.5
Hypervisor: QEMU 0.9.1
CIMOM: sfcb sfcbd 1.3.3preview
Libvirt-cim revision: 805
Libvirt-cim changeset: c87e67c92f7c
Cimtest revision: 606
Cimtest changeset: 2ef1704ac586
=================================================
FAIL : 1
XFAIL : 8
SKIP : 32
PASS : 101
-----------------
Total : 142
=================================================
FAIL Test Summary:
ElementConforms - 01_forward.py: FAIL
=================================================
XFAIL Test Summary:
ComputerSystem - 06_paused_active_suspend.py: XFAIL
ComputerSystem - 23_pause_pause.py: XFAIL
ComputerSystem - 32_start_reboot.py: XFAIL
ComputerSystem - 33_suspend_reboot.py: XFAIL
HostSystem - 02_hostsystem_to_rasd.py: XFAIL
HostedDependency - 03_enabledstate.py: XFAIL
VSSD - 04_vssd_to_rasd.py: XFAIL
VirtualSystemManagementService - 15_mod_system_settings.py: XFAIL
=================================================
SKIP Test Summary:
ComputerSystem - 02_nosystems.py: SKIP
ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP
ComputerSystemIndication - 01_created_indication.py: SKIP
ElementAllocatedFromPool - 03_reverse_errs.py: SKIP
ElementAllocatedFromPool - 04_forward_errs.py: SKIP
LogicalDisk - 01_disk.py: SKIP
LogicalDisk - 02_nodevs.py: SKIP
LogicalDisk - 03_ld_gi_errs.py: SKIP
NetworkPort - 01_netport.py: SKIP
NetworkPort - 02_np_gi_errors.py: SKIP
NetworkPort - 03_user_netport.py: SKIP
Processor - 01_processor.py: SKIP
Processor - 02_definesys_get_procs.py: SKIP
Processor - 03_proc_gi_errs.py: SKIP
RASD - 04_disk_rasd_size.py: SKIP
RASD - 05_disk_rasd_emu_type.py: SKIP
ResourceAllocationFromPool - 05_RAPF_err.py: SKIP
ResourcePoolConfigurationService - 03_CreateResourcePool.py: SKIP
ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: SKIP
ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: SKIP
ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: SKIP
ResourcePoolConfigurationService - 07_DeleteResourcePool.py: SKIP
VSSD - 02_bootldr.py: SKIP
VirtualSystemManagementService - 06_addresource.py: SKIP
VirtualSystemManagementService - 08_modifyresource.py: SKIP
VirtualSystemManagementService - 09_procrasd_persist.py: SKIP
VirtualSystemManagementService - 11_define_memrasdunits.py: SKIP
VirtualSystemManagementService - 12_referenced_config.py: SKIP
VirtualSystemManagementService - 13_refconfig_additional_devs.py: SKIP
VirtualSystemMigrationService - 01_migratable_host.py: SKIP
VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP
VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP
=================================================
Full report:
--------------------------------------------------------------------
AllocationCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
AllocationCapabilities - 02_alloccap_gi_errs.py: PASS
--------------------------------------------------------------------
ComputerSystem - 01_enum.py: PASS
--------------------------------------------------------------------
ComputerSystem - 02_nosystems.py: SKIP
ERROR - System has defined domains; unable to run
--------------------------------------------------------------------
ComputerSystem - 03_defineVS.py: PASS
--------------------------------------------------------------------
ComputerSystem - 04_defineStartVS.py: PASS
--------------------------------------------------------------------
ComputerSystem - 05_activate_defined_start.py: PASS
--------------------------------------------------------------------
ComputerSystem - 06_paused_active_suspend.py: XFAIL
ERROR - Got CIM error Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend with return code 1
ERROR - Exception variable: Unable pause dom 'DomST1'
InvokeMethod(RequestStateChange): Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend
Bug:<00011>
--------------------------------------------------------------------
ComputerSystem - 22_define_suspend.py: PASS
--------------------------------------------------------------------
ComputerSystem - 23_pause_pause.py: XFAIL
ERROR - Got CIM error Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend with return code 1
ERROR - Exception: 'Unable pause dom 'cs_test_domain''
InvokeMethod(RequestStateChange): Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend
Bug:<00011>
--------------------------------------------------------------------
ComputerSystem - 27_define_pause_errs.py: PASS
--------------------------------------------------------------------
ComputerSystem - 32_start_reboot.py: XFAIL
ERROR - Got CIM error Unable to reboot domain: this function is not supported by the hypervisor: virDomainReboot with return code 1
ERROR - Exception: Unable reboot dom 'cs_test_domain'
InvokeMethod(RequestStateChange): Unable to reboot domain: this function is not supported by the hypervisor: virDomainReboot
Bug:<00005>
--------------------------------------------------------------------
ComputerSystem - 33_suspend_reboot.py: XFAIL
ERROR - Got CIM error State not supported with return code 7
ERROR - Exception: Unable Suspend dom 'test_domain'
InvokeMethod(RequestStateChange): State not supported
Bug:<00012>
--------------------------------------------------------------------
ComputerSystem - 35_start_reset.py: PASS
--------------------------------------------------------------------
ComputerSystem - 40_RSC_start.py: PASS
--------------------------------------------------------------------
ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP
--------------------------------------------------------------------
ComputerSystem - 42_cs_gi_errs.py: PASS
--------------------------------------------------------------------
ComputerSystemIndication - 01_created_indication.py: SKIP
--------------------------------------------------------------------
ElementAllocatedFromPool - 01_forward.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 03_reverse_errs.py: SKIP
--------------------------------------------------------------------
ElementAllocatedFromPool - 04_forward_errs.py: SKIP
--------------------------------------------------------------------
ElementCapabilities - 01_forward.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 03_forward_errs.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 05_hostsystem_cap.py: PASS
--------------------------------------------------------------------
ElementConforms - 01_forward.py: FAIL
ERROR - verify_fields() exception: u'LXC_AllocationCapabilities'
ERROR - Exception: Failed to verify instance
Class not found
--------------------------------------------------------------------
ElementConforms - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementConforms - 03_ectp_fwd_errs.py: PASS
--------------------------------------------------------------------
ElementConforms - 04_ectp_rev_errs.py: PASS
--------------------------------------------------------------------
ElementSettingData - 01_forward.py: PASS
--------------------------------------------------------------------
ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS
--------------------------------------------------------------------
EnabledLogicalElementCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS
--------------------------------------------------------------------
HostSystem - 01_enum.py: PASS
--------------------------------------------------------------------
HostSystem - 02_hostsystem_to_rasd.py: XFAIL
ERROR - InstanceID Mismatch
ERROR - Returned CrossClass_GuestDom/mouse:xen instead of CrossClass_GuestDom/mouse:usb
Class not found
Bug:<00009>
--------------------------------------------------------------------
HostSystem - 03_hs_to_settdefcap.py: PASS
--------------------------------------------------------------------
HostSystem - 04_hs_to_EAPF.py: PASS
--------------------------------------------------------------------
HostSystem - 05_hs_gi_errs.py: PASS
--------------------------------------------------------------------
HostSystem - 06_hs_to_vsms.py: PASS
--------------------------------------------------------------------
HostedDependency - 01_forward.py: PASS
--------------------------------------------------------------------
HostedDependency - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedDependency - 03_enabledstate.py: XFAIL
ERROR - Exception: (1, u'Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend')
ERROR - Failed to suspend the dom: hd_domain1
InvokeMethod(RequestStateChange): Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend
Bug:<00011>
--------------------------------------------------------------------
HostedDependency - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 01_forward.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 03_forward_errs.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
HostedService - 01_forward.py: PASS
--------------------------------------------------------------------
HostedService - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedService - 03_forward_errs.py: PASS
--------------------------------------------------------------------
HostedService - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
KVMRedirectionSAP - 01_enum_KVMredSAP.py: PASS
--------------------------------------------------------------------
LogicalDisk - 01_disk.py: SKIP
--------------------------------------------------------------------
LogicalDisk - 02_nodevs.py: SKIP
ERROR - System has defined domains; unable to run
--------------------------------------------------------------------
LogicalDisk - 03_ld_gi_errs.py: SKIP
--------------------------------------------------------------------
Memory - 01_memory.py: PASS
--------------------------------------------------------------------
Memory - 02_defgetmem.py: PASS
--------------------------------------------------------------------
Memory - 03_mem_gi_errs.py: PASS
--------------------------------------------------------------------
NetworkPort - 01_netport.py: SKIP
--------------------------------------------------------------------
NetworkPort - 02_np_gi_errors.py: SKIP
--------------------------------------------------------------------
NetworkPort - 03_user_netport.py: SKIP
--------------------------------------------------------------------
Processor - 01_processor.py: SKIP
--------------------------------------------------------------------
Processor - 02_definesys_get_procs.py: SKIP
--------------------------------------------------------------------
Processor - 03_proc_gi_errs.py: SKIP
--------------------------------------------------------------------
Profile - 01_enum.py: PASS
--------------------------------------------------------------------
Profile - 02_profile_to_elec.py: PASS
--------------------------------------------------------------------
Profile - 03_rprofile_gi_errs.py: PASS
--------------------------------------------------------------------
RASD - 01_verify_rasd_fields.py: PASS
--------------------------------------------------------------------
RASD - 02_enum.py: PASS
--------------------------------------------------------------------
RASD - 03_rasd_errs.py: PASS
--------------------------------------------------------------------
RASD - 04_disk_rasd_size.py: SKIP
--------------------------------------------------------------------
RASD - 05_disk_rasd_emu_type.py: SKIP
--------------------------------------------------------------------
RedirectionService - 01_enum_crs.py: PASS
--------------------------------------------------------------------
RedirectionService - 02_enum_crscap.py: PASS
--------------------------------------------------------------------
RedirectionService - 03_RedirectionSAP_errs.py: PASS
--------------------------------------------------------------------
ReferencedProfile - 01_verify_refprof.py: PASS
--------------------------------------------------------------------
ReferencedProfile - 02_refprofile_errs.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 01_forward.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 02_reverse.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 03_forward_errs.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 05_RAPF_err.py: SKIP
--------------------------------------------------------------------
ResourcePool - 01_enum.py: PASS
--------------------------------------------------------------------
ResourcePool - 02_rp_gi_errors.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 01_enum.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 03_CreateResourcePool.py: SKIP
--------------------------------------------------------------------
ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: SKIP
--------------------------------------------------------------------
ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: SKIP
--------------------------------------------------------------------
ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: SKIP
--------------------------------------------------------------------
ResourcePoolConfigurationService - 07_DeleteResourcePool.py: SKIP
--------------------------------------------------------------------
SettingsDefine - 01_forward.py: PASS
--------------------------------------------------------------------
SettingsDefine - 02_reverse.py: PASS
--------------------------------------------------------------------
SettingsDefine - 03_sds_fwd_errs.py: PASS
--------------------------------------------------------------------
SettingsDefine - 04_sds_rev_errs.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 01_forward.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 03_forward_errs.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS
--------------------------------------------------------------------
SystemDevice - 01_forward.py: PASS
--------------------------------------------------------------------
SystemDevice - 02_reverse.py: PASS
--------------------------------------------------------------------
SystemDevice - 03_fwderrs.py: PASS
--------------------------------------------------------------------
VSSD - 01_enum.py: PASS
--------------------------------------------------------------------
VSSD - 02_bootldr.py: SKIP
--------------------------------------------------------------------
VSSD - 03_vssd_gi_errs.py: PASS
--------------------------------------------------------------------
VSSD - 04_vssd_to_rasd.py: XFAIL
ERROR - InstanceID Mismatch
ERROR - Returned VSSDC_dom/mouse:xen instead of VSSDC_dom/mouse:usb
Bug:<00009>
--------------------------------------------------------------------
VirtualSystemManagementCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 01_definesystem_name.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 02_destroysystem.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 03_definesystem_ess.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 04_definesystem_ers.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 05_destroysystem_neg.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 06_addresource.py: SKIP
--------------------------------------------------------------------
VirtualSystemManagementService - 07_addresource_neg.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 08_modifyresource.py: SKIP
--------------------------------------------------------------------
VirtualSystemManagementService - 09_procrasd_persist.py: SKIP
--------------------------------------------------------------------
VirtualSystemManagementService - 10_hv_version.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 11_define_memrasdunits.py: SKIP
--------------------------------------------------------------------
VirtualSystemManagementService - 12_referenced_config.py: SKIP
--------------------------------------------------------------------
VirtualSystemManagementService - 13_refconfig_additional_devs.py: SKIP
--------------------------------------------------------------------
VirtualSystemManagementService - 14_define_sys_disk.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 15_mod_system_settings.py: XFAIL
ERROR - rstest_domain not updated properly.
ERROR - Exp AutomaticRecoveryAction=3, got 2
Bug:<00008>
--------------------------------------------------------------------
VirtualSystemMigrationCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationService - 01_migratable_host.py: SKIP
--------------------------------------------------------------------
VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP
--------------------------------------------------------------------
VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP
--------------------------------------------------------------------
VirtualSystemMigrationSettingData - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 01_forward.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 02_reverse.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotService - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS
--------------------------------------------------------------------
--
Thanks and Regards,
Deepti B. Kalakeri
IBM Linux Technology Center
deeptik(a)linux.vnet.ibm.com
1
0