# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1211211376 25200
# Node ID 80682d57c067810c97a92fce162c29dab2ea5451
# Parent d013f73cf783cac1b458cec6dbc0c0308786f1e9
[TEST] #2 Updating the cleanup_restore() function call in the tc to pass the server and
virt parameters.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r d013f73cf783 -r 80682d57c067
suites/libvirt-cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py
--- a/suites/libvirt-cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py Thu May 15
06:07:17 2008 -0700
+++ b/suites/libvirt-cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py Mon May 19
08:36:16 2008 -0700
@@ -76,6 +76,7 @@ def main():
options = main.options
server = options.ip
+ virt = options.virt
# Verify DiskPool on machine
status = create_diskpool_file()
if status != PASS:
@@ -130,7 +131,7 @@ def main():
status = ret_value
if status != PASS:
break
- cleanup_restore()
+ cleanup_restore(server, virt)
return status
if __name__ == "__main__":
sys.exit(main())
diff -r d013f73cf783 -r 80682d57c067
suites/libvirt-cim/cimtest/ElementAllocatedFromPool/03_reverse_errs.py
--- a/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/03_reverse_errs.py Thu May 15
06:07:17 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/03_reverse_errs.py Mon May 19
08:36:16 2008 -0700
@@ -170,9 +170,9 @@ def err_invalid_keyvalue():
break
return status
-def clean_and_exit(server, msg):
+def clean_and_exit(server, virt, msg):
logger.error("------FAILED: Invalid %s.------", msg)
- cleanup_restore()
+ cleanup_restore(server, virt)
vsxml.undefine(server)
@do_main(platform_sup)
@@ -207,20 +207,20 @@ def main():
assoc_classname = get_typed_class(virt, "ElementAllocatedFromPool")
ret = err_invalid_keyname()
if ret != PASS:
- clean_and_exit(options.ip, "KeyName")
+ clean_and_exit(options.ip, virt, "KeyName")
return ret
ret = err_invalid_keyvalue()
if ret != PASS:
- clean_and_exit(options.ip, "KeyValue")
+ clean_and_exit(options.ip, virt, "KeyValue")
return ret
ret = err_invalid_ccname()
if ret != PASS:
- clean_and_exit(options.ip, "CCName")
+ clean_and_exit(options.ip, virt, "CCName")
return ret
- cleanup_restore()
+ cleanup_restore(options.ip, virt)
vsxml.undefine(options.ip)
return PASS
if __name__ == "__main__":
diff -r d013f73cf783 -r 80682d57c067
suites/libvirt-cim/cimtest/ElementAllocatedFromPool/04_forward_errs.py
--- a/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/04_forward_errs.py Thu May 15
06:07:17 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/04_forward_errs.py Mon May 19
08:36:16 2008 -0700
@@ -477,9 +477,9 @@ def err_invalid_syscreationclassname_key
return try_assoc(conn, exp_ret, test_dom, test_keys, test_vals, log_msg)
-def clean_and_exit(server, msg):
+def clean_and_exit(server, virt, msg):
logger.error("------FAILED: Invalid %s.------", msg)
- cleanup_restore()
+ cleanup_restore(server, virt)
vsxml.undefine(server)
@do_main(platform_sup)
@@ -519,50 +519,50 @@ def main():
ret = err_invalid_sysname_keyname(conn, exp_list[0])
if ret != PASS:
- clean_and_exit(options.ip, "SystemName KeyName")
+ clean_and_exit(options.ip, virt, "SystemName KeyName")
return ret
ret = err_invalid_sysname_keyvalue(conn, exp_list[0])
if ret != PASS:
- clean_and_exit(options.ip, "SystemName Key Value")
+ clean_and_exit(options.ip, virt, "SystemName Key Value")
return ret
ret = err_invalid_devid_keyname(conn, exp_list[1])
if ret != PASS:
- clean_and_exit(options.ip, "DeviceID Keyname")
+ clean_and_exit(options.ip, virt, "DeviceID Keyname")
return ret
ret = err_invalid_devid_keyvalue(conn, exp_list[2])
if ret != PASS:
- clean_and_exit(options.ip, "DeviceID Keyvalue")
+ clean_and_exit(options.ip, virt, "DeviceID Keyvalue")
return ret
ret = err_invalid_classname(conn, exp_list[3])
if ret != PASS:
- clean_and_exit(options.ip, "classname Keyname")
+ clean_and_exit(options.ip, virt, "classname Keyname")
return ret
ret = err_invalid_creationclassname_keyname(conn, exp_list[4])
if ret != PASS:
- clean_and_exit(options.ip, "creationclassname Keyname")
+ clean_and_exit(options.ip, virt, "creationclassname Keyname")
return ret
ret = err_invalid_creationclassname_keyvalue(conn, exp_list[4])
if ret != PASS:
- clean_and_exit(options.ip, "creationclassname Keyvalue")
+ clean_and_exit(options.ip, virt, "creationclassname Keyvalue")
return ret
ret = err_invalid_syscreationclassname_keyname(conn, exp_list[5])
if ret != PASS:
- clean_and_exit(options.ip, "System creationclassname Keyname")
+ clean_and_exit(options.ip, virt, "System creationclassname Keyname")
return ret
ret = err_invalid_syscreationclassname_keyvalue(conn, exp_list[5])
if ret != PASS:
- clean_and_exit(options.ip, "System creationclassname Keyvalue")
+ clean_and_exit(options.ip, virt, "System creationclassname Keyvalue")
return ret
- cleanup_restore()
+ cleanup_restore(options.ip, virt)
vsxml.undefine(options.ip)
return PASS
if __name__ == "__main__":
diff -r d013f73cf783 -r 80682d57c067
suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py
--- a/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py Thu May 15 06:07:17 2008
-0700
+++ b/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py Mon May 19 08:36:16 2008
-0700
@@ -179,7 +179,7 @@ def get_assocname_info(server, cn, an, q
status = FAIL
if status != PASS:
- cleanup_restore()
+ cleanup_restore(server, virt='Xen')
test_domain_function(test_dom, server, "destroy")
return status, assoc_info
@@ -221,7 +221,7 @@ def verify_eafp_values(server, in_pllist
except Exception, detail:
logger.error(CIM_ERROR_ASSOCIATORS, an)
logger.error("Exception: %s", detail)
- cleanup_restore()
+ cleanup_restore(server, virt='Xen')
status = FAIL
return status
@@ -229,7 +229,7 @@ def main():
def main():
options= main.options
server = options.ip
-
+ virt=options.virt
# Get the host info
status, host_name, classname = get_host_info(server)
if status != PASS:
@@ -256,14 +256,14 @@ def main():
status = setup_env(server)
if status != PASS:
- cleanup_restore()
+ cleanup_restore(server, vir=virt)
test_domain_function(test_dom, server, cmd = "destroy")
return status
in_pllist = pool_init_list(pool)
status = verify_eafp_values(server, in_pllist)
ret = test_domain_function(test_dom, server, cmd = "destroy")
- cleanup_restore()
+ cleanup_restore(server, virt=virt)
return status
if __name__ == "__main__":
sys.exit(main())
diff -r d013f73cf783 -r 80682d57c067 suites/libvirt-cim/cimtest/ResourcePool/01_enum.py
--- a/suites/libvirt-cim/cimtest/ResourcePool/01_enum.py Thu May 15 06:07:17 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ResourcePool/01_enum.py Mon May 19 08:36:16 2008 -0700
@@ -141,7 +141,7 @@ def main():
return FAIL
status = verify_fields(pool_list, netpool, get_typed_class(virt, np_cn))
- cleanup_restore()
+ cleanup_restore(ip, virt)
return status
if __name__ == "__main__":
diff -r d013f73cf783 -r 80682d57c067
suites/libvirt-cim/cimtest/ResourcePool/02_rp_gi_errors.py
--- a/suites/libvirt-cim/cimtest/ResourcePool/02_rp_gi_errors.py Thu May 15 06:07:17 2008
-0700
+++ b/suites/libvirt-cim/cimtest/ResourcePool/02_rp_gi_errors.py Mon May 19 08:36:16 2008
-0700
@@ -109,7 +109,7 @@ def main():
if not ret:
logger.error("Failed to create the Virtual Network '%s'",
test_network)
- cleanup_restore()
+ cleanup_restore(ip, virt)
return SKIP
netid = "%s/%s" % ("NetworkPool", test_network)
@@ -124,16 +124,16 @@ def main():
ret_value = err_invalid_instid_keyname(conn, cn, instid)
if ret_value != PASS:
logger.error("------ FAILED: Invalid InstanceID Key Name.------")
- cleanup_restore()
+ cleanup_restore(ip, virt)
return ret_value
ret_value = err_invalid_instid_keyvalue(conn, cn)
if ret_value != PASS:
logger.error("------ FAILED: Invalid InstanceID Key Value.------")
- cleanup_restore()
+ cleanup_restore(ip, virt)
return ret_value
- cleanup_restore()
+ cleanup_restore(ip, virt)
return PASS
if __name__ == "__main__":