
# HG changeset patch # User Kaitlin Rupert <karupert@us.ibm.com> # Date 1219433898 25200 # Node ID 3c32f9334194cc6b8a8d5300f994a71454369a81 # Parent 055021cae0200442791afada78d07ff3309a791c [TEST] Make network related changes to CS tests. Also tidy up import calls. Signed-off-by: Kaitlin Rupert <karupert@us.ibm.com> diff -r 055021cae020 -r 3c32f9334194 suites/libvirt-cim/cimtest/ComputerSystem/06_paused_active_suspend.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/06_paused_active_suspend.py Fri Aug 22 12:38:18 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/06_paused_active_suspend.py Fri Aug 22 12:38:18 2008 -0700 @@ -50,7 +50,6 @@ from XenKvmLib.common_util import call_request_state_change, \ poll_for_state_change from CimTest.ReturnCodes import PASS, FAIL -from XenKvmLib.common_util import create_netpool_conf, destroy_netpool sup_types = ['Xen', 'KVM', 'XenFV'] test_dom = "DomST1" @@ -67,9 +66,6 @@ virt = options.virt destroy_and_undefine_all(server) - status, test_network = create_netpool_conf(server, virt) - if status != PASS: - return FAIL cxml = vxml.get_class(virt)(test_dom, mem) @@ -88,7 +84,6 @@ if status != PASS: cxml.destroy(server) - destroy_netpool(server, virt, test_network) return status from_State = dom_cs.EnabledState @@ -100,7 +95,6 @@ logger.error("Unable to suspend dom '%s' using RequestedStateChange()", test_dom) cxml.destroy(server) - destroy_netpool(server, virt, test_network) return status #Polling for the value of EnabledState to be set to 9. @@ -111,7 +105,6 @@ if status != PASS: cxml.destroy(server) - destroy_netpool(server, virt, test_network) return status enabledState = dom_cs.EnabledState @@ -133,7 +126,6 @@ status = FAIL cxml.destroy(server) - destroy_netpool(server, virt, test_network) return status if __name__ == "__main__": diff -r 055021cae020 -r 3c32f9334194 suites/libvirt-cim/cimtest/ComputerSystem/22_define_suspend.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/22_define_suspend.py Fri Aug 22 12:38:18 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/22_define_suspend.py Fri Aug 22 12:38:18 2008 -0700 @@ -36,8 +36,7 @@ from CimTest.Globals import do_main, logger from CimTest.ReturnCodes import PASS, FAIL from XenKvmLib.common_util import create_using_definesystem, \ - call_request_state_change, get_cs_instance, \ - create_netpool_conf, destroy_netpool + call_request_state_change, get_cs_instance sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] test_dom = "domgst" @@ -62,17 +61,12 @@ def main(): options = main.options - status, test_network = create_netpool_conf(options.ip, options.virt, False) - if status != PASS: - return FAIL - try: # define the vs status = create_using_definesystem(test_dom, options.ip, virt=options.virt) if status != PASS: logger.error("Unable to define %s using DefineSystem()" % test_dom) - destroy_netpool(options.ip, options.virt, test_network) return status # suspend the vs @@ -95,7 +89,6 @@ logger.error("Error: %s" % detail) status = FAIL - destroy_netpool(options.ip, options.virt, test_network) destroy_and_undefine_domain(test_dom, options.ip, options.virt) return status diff -r 055021cae020 -r 3c32f9334194 suites/libvirt-cim/cimtest/ComputerSystem/23_suspend_suspend.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/23_suspend_suspend.py Fri Aug 22 12:38:18 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/23_suspend_suspend.py Fri Aug 22 12:38:18 2008 -0700 @@ -44,11 +44,10 @@ from CimTest.Globals import do_main, logger from CimTest.ReturnCodes import PASS, FAIL from XenKvmLib.test_doms import destroy_and_undefine_domain -from XenKvmLib.common_util import create_using_definesystem -from XenKvmLib.common_util import call_request_state_change -from XenKvmLib.common_util import try_request_state_change -from XenKvmLib.common_util import poll_for_state_change -from XenKvmLib.common_util import create_netpool_conf, destroy_netpool +from XenKvmLib.common_util import create_using_definesystem, \ + call_request_state_change, \ + try_request_state_change, \ + poll_for_state_change sup_types = ['Xen', 'XenFV', 'KVM'] @@ -65,10 +64,6 @@ options = main.options server = options.ip virt = options.virt - - status, test_network = create_netpool_conf(server, virt, False) - if status != PASS: - return FAIL tc_scen = [('Start', [ACTIVE_STATE, ACTIVE_STATE]), \ ('Suspend', [SUSPND_STATE, SUSPND_STATE])] @@ -106,7 +101,6 @@ status = FAIL if status != PASS: - destroy_netpool(server, virt, test_network) destroy_and_undefine_domain(default_dom, server, virt) return status @@ -116,7 +110,6 @@ rq_state, TIME, err_no, err_desc, virt) - destroy_netpool(server, virt, test_network) destroy_and_undefine_domain(default_dom, server, virt) return status diff -r 055021cae020 -r 3c32f9334194 suites/libvirt-cim/cimtest/ComputerSystem/27_define_suspend_errs.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/27_define_suspend_errs.py Fri Aug 22 12:38:18 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/27_define_suspend_errs.py Fri Aug 22 12:38:18 2008 -0700 @@ -42,9 +42,8 @@ from CimTest.Globals import do_main, logger from CimTest.ReturnCodes import PASS, FAIL from XenKvmLib.test_doms import destroy_and_undefine_domain -from XenKvmLib.common_util import try_request_state_change -from XenKvmLib.common_util import create_using_definesystem -from XenKvmLib.common_util import create_netpool_conf, destroy_netpool +from XenKvmLib.common_util import try_request_state_change, \ + create_using_definesystem sup_types = ['Xen', 'XenFV', 'LXC', 'KVM'] @@ -61,10 +60,6 @@ server = options.ip virt = options.virt status = FAIL - - status, test_network = create_netpool_conf(server, virt, False) - if status != PASS: - return FAIL try: # define the vs @@ -76,7 +71,6 @@ except Exception, details: logger.error("Exception: %s", details) - destroy_netpool(server, virt, test_network) destroy_and_undefine_domain(default_dom, server, virt) return FAIL @@ -87,7 +81,6 @@ if status != PASS: logger.error("Expected Defined -> Suspended state transition to fail") - destroy_netpool(server, virt, test_network) destroy_and_undefine_domain(default_dom, server, virt) return status diff -r 055021cae020 -r 3c32f9334194 suites/libvirt-cim/cimtest/ComputerSystem/32_start_reboot.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/32_start_reboot.py Fri Aug 22 12:38:18 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/32_start_reboot.py Fri Aug 22 12:38:18 2008 -0700 @@ -43,10 +43,9 @@ from CimTest.Globals import do_main, logger from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC from XenKvmLib.test_doms import destroy_and_undefine_domain -from XenKvmLib.common_util import create_using_definesystem -from XenKvmLib.common_util import call_request_state_change -from XenKvmLib.common_util import poll_for_state_change -from XenKvmLib.common_util import create_netpool_conf, destroy_netpool +from XenKvmLib.common_util import create_using_definesystem, \ + call_request_state_change, \ + poll_for_state_change sup_types = ['Xen', 'XenFV', 'KVM'] @@ -62,10 +61,6 @@ status = FAIL server = options.ip virt = options.virt - - status, test_network = create_netpool_conf(server, virt, False) - if status != PASS: - return FAIL tc_scen = [('Start', [ACTIVE_STATE, ACTIVE_STATE]), \ ('Reboot', [ACTIVE_STATE, REBOOT_STATE])] @@ -105,7 +100,6 @@ logger.error("Exception: %s", detail) status = FAIL - destroy_netpool(server, virt, test_network) destroy_and_undefine_domain(default_dom, server, virt) return status diff -r 055021cae020 -r 3c32f9334194 suites/libvirt-cim/cimtest/ComputerSystem/33_suspend_reboot.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/33_suspend_reboot.py Fri Aug 22 12:38:18 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/33_suspend_reboot.py Fri Aug 22 12:38:18 2008 -0700 @@ -46,11 +46,10 @@ from CimTest.Globals import do_main, logger from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC from XenKvmLib.test_doms import destroy_and_undefine_domain -from XenKvmLib.common_util import create_using_definesystem -from XenKvmLib.common_util import call_request_state_change -from XenKvmLib.common_util import poll_for_state_change -from XenKvmLib.common_util import try_request_state_change -from XenKvmLib.common_util import create_netpool_conf, destroy_netpool +from XenKvmLib.common_util import create_using_definesystem, \ + call_request_state_change, \ + poll_for_state_change, \ + try_request_state_change sup_types = ['Xen', 'XenFV', 'KVM'] @@ -68,10 +67,6 @@ status = FAIL server = options.ip virt = options.virt - - status, test_network = create_netpool_conf(server, virt, False) - if status != PASS: - return FAIL tc_scen = [('Start', [ACTIVE_STATE, ACTIVE_STATE]), ('Suspend', [SUSPND_STATE, SUSPND_STATE]), @@ -111,7 +106,6 @@ logger.error("Exception: %s", detail) status = FAIL - destroy_netpool(server, virt, test_network) destroy_and_undefine_domain(default_dom, server, virt) return status diff -r 055021cae020 -r 3c32f9334194 suites/libvirt-cim/cimtest/ComputerSystem/35_start_reset.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/35_start_reset.py Fri Aug 22 12:38:18 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/35_start_reset.py Fri Aug 22 12:38:18 2008 -0700 @@ -44,11 +44,9 @@ from CimTest.Globals import do_main, logger from CimTest.ReturnCodes import PASS, FAIL from XenKvmLib.test_doms import destroy_and_undefine_domain -from XenKvmLib.common_util import get_cs_instance -from XenKvmLib.common_util import create_using_definesystem -from XenKvmLib.common_util import call_request_state_change -from XenKvmLib.common_util import poll_for_state_change -from XenKvmLib.common_util import create_netpool_conf, destroy_netpool +from XenKvmLib.common_util import get_cs_instance, create_using_definesystem, \ + call_request_state_change, \ + poll_for_state_change sup_types = ['Xen', 'XenFV', 'KVM'] @@ -64,10 +62,6 @@ status = FAIL server = options.ip virt = options.virt - - status, test_network = create_netpool_conf(server, virt, False) - if status != PASS: - return FAIL tc_scen = [('Start', [ACTIVE_STATE, ACTIVE_STATE]), ('Reset', [ACTIVE_STATE, RESET_STATE])] @@ -107,7 +101,6 @@ logger.error("Exception: %s", detail) status = FAIL - destroy_netpool(server, virt, test_network) destroy_and_undefine_domain(default_dom, server, virt) return status diff -r 055021cae020 -r 3c32f9334194 suites/libvirt-cim/cimtest/ComputerSystem/40_RSC_start.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/40_RSC_start.py Fri Aug 22 12:38:18 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/40_RSC_start.py Fri Aug 22 12:38:18 2008 -0700 @@ -55,10 +55,6 @@ virt = options.virt status = FAIL - status, test_network = create_netpool_conf(server, virt, False) - if status != PASS: - return FAIL - try: rc = create_using_definesystem(default_dom, server, virt=virt) @@ -87,7 +83,6 @@ except Exception, detail: logger.error("Exception: %s", detail) - destroy_netpool(server, virt, test_network) destroy_and_undefine_domain(default_dom, server, virt) return status