[PATCH] Enable KVM migration migration support in the migration_tester.py tool
by Kaitlin Rupert
# 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:
15 years, 10 months
[PATCH] Add KVM_MigrationJob class. Also fix migration uri
by Kaitlin Rupert
# 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;
15 years, 10 months
[PATCH] [TEST] #2 Update test cases to follow the new coding style
by yunguol@cn.ibm.com
# 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
15 years, 10 months
[PATCH] [TESt]dfs
by yunguol@cn.ibm.com
# 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
15 years, 10 months
[PATCH] [TEST] Update test cases to follow the new coding style
by yunguol@cn.ibm.com
# 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
15 years, 10 months
[PATCH] [TEST Split lines to 80-char width limit in SettingsDefineCapabilities/01_forward.py
by yunguol@cn.ibm.com
# 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,
15 years, 10 months
[PATCH] [TEST] Fix SettingsDefineCapabilities/01_forward.py with appropriate RASD objects for different platforms
by yunguol@cn.ibm.com
# 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
15 years, 10 months
[PATCH] [TEST]Fix HostSystem/03_hs_to_settdefcap.py with appropriate number of RASD objects for different platforms
by yunguol@cn.ibm.com
# 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
15 years, 10 months
[PATCH] [TEST] Add CodyingSystem and SubmittingPatches files
by Kaitlin Rupert
# 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>
15 years, 10 months
[PATCH] [TEST] Fixing VSMS/09_procrasd_persist.py tc
by Deepti B. Kalakeri
# 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__":
15 years, 10 months