diff options
Diffstat (limited to 'testcases')
-rwxr-xr-x | testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py | 6 | ||||
-rwxr-xr-x | testcases/VIM/OpenStack/CI/libraries/run_rally.py | 6 | ||||
-rw-r--r-- | testcases/VIM/OpenStack/CI/libraries/run_tempest.py | 7 | ||||
-rw-r--r-- | testcases/vIMS/CI/vIMS.py | 5 | ||||
-rw-r--r-- | testcases/vPing/CI/libraries/vPing_ssh.py | 6 | ||||
-rw-r--r-- | testcases/vPing/CI/libraries/vPing_userdata.py | 6 |
6 files changed, 36 insertions, 0 deletions
diff --git a/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py b/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py index e1870046c..9a9260eb8 100755 --- a/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py +++ b/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py @@ -54,6 +54,9 @@ parser.add_argument("-s", "--smoke", parser.add_argument("-v", "--verbose", help="Print verbose info about the progress", action="store_true") +parser.add_argument("-n", "--noclean", + help="Don't clean the created resources for this test.", + action="store_true") args = parser.parse_args() @@ -455,6 +458,9 @@ def main(): logger.debug("Pushing Rally summary into DB...") push_results_to_db("Rally", payload) + if args.noclean: + exit(0) + logger.debug("Deleting image '%s' with ID '%s'..." \ % (GLANCE_IMAGE_NAME, image_id)) if not functest_utils.delete_glance_image(nova_client, image_id): diff --git a/testcases/VIM/OpenStack/CI/libraries/run_rally.py b/testcases/VIM/OpenStack/CI/libraries/run_rally.py index 18f60acc1..6b1aae2eb 100755 --- a/testcases/VIM/OpenStack/CI/libraries/run_rally.py +++ b/testcases/VIM/OpenStack/CI/libraries/run_rally.py @@ -47,6 +47,9 @@ parser.add_argument("-r", "--report", parser.add_argument("-v", "--verbose", help="Print verbose info about the progress", action="store_true") +parser.add_argument("-n", "--noclean", + help="Don't clean the created resources for this test.", + action="store_true") args = parser.parse_args() @@ -271,6 +274,9 @@ def main(): print(args.test_name) run_task(args.test_name) + if args.noclean: + exit(0) + logger.debug("Deleting image '%s' with ID '%s'..." \ % (GLANCE_IMAGE_NAME, image_id)) if not functest_utils.delete_glance_image(nova_client, image_id): diff --git a/testcases/VIM/OpenStack/CI/libraries/run_tempest.py b/testcases/VIM/OpenStack/CI/libraries/run_tempest.py index b8ed2716e..9638a274d 100644 --- a/testcases/VIM/OpenStack/CI/libraries/run_tempest.py +++ b/testcases/VIM/OpenStack/CI/libraries/run_tempest.py @@ -39,6 +39,9 @@ parser.add_argument("-m", "--mode", help="Tempest test mode [smoke, all]", parser.add_argument("-r", "--report", help="Create json result file", action="store_true") +parser.add_argument("-n", "--noclean", + help="Don't clean the created resources for this test.", + action="store_true") args = parser.parse_args() @@ -295,6 +298,10 @@ def main(): create_tempest_resources() configure_tempest() run_tempest(MODE) + + if args.noclean: + exit(0) + free_tempest_resources() diff --git a/testcases/vIMS/CI/vIMS.py b/testcases/vIMS/CI/vIMS.py index a8ac97f5c..c50334936 100644 --- a/testcases/vIMS/CI/vIMS.py +++ b/testcases/vIMS/CI/vIMS.py @@ -40,6 +40,9 @@ parser.add_argument("-d", "--debug", help="Debug mode", action="store_true") parser.add_argument("-r", "--report", help="Create json result file", action="store_true") +parser.add_argument("-n", "--noclean", + help="Don't clean the created resources for this test.", + action="store_true") args = parser.parse_args() """ logging configuration """ @@ -461,6 +464,8 @@ def main(): cfy.undeploy_manager() ############### GENERAL CLEANUP ################ + if args.noclean: + exit(0) ks_creds = functest_utils.get_credentials("keystone") diff --git a/testcases/vPing/CI/libraries/vPing_ssh.py b/testcases/vPing/CI/libraries/vPing_ssh.py index 9c83c80e7..d8b50f7e9 100644 --- a/testcases/vPing/CI/libraries/vPing_ssh.py +++ b/testcases/vPing/CI/libraries/vPing_ssh.py @@ -37,6 +37,9 @@ parser.add_argument("-d", "--debug", help="Debug mode", action="store_true") parser.add_argument("-r", "--report", help="Create json result file", action="store_true") +parser.add_argument("-n", "--noclean", + help="Don't clean the created resources for this test.", + action="store_true") args = parser.parse_args() @@ -198,6 +201,9 @@ def create_private_neutron_net(neutron): def cleanup(nova, neutron, image_id, network_dic, port_id1, port_id2, secgroup_id): + if args.noclean: + logger.debug("The OpenStack resources are not deleted.") + return True # delete both VMs logger.info("Cleaning up...") diff --git a/testcases/vPing/CI/libraries/vPing_userdata.py b/testcases/vPing/CI/libraries/vPing_userdata.py index be1ed3f8e..c81a1fddb 100644 --- a/testcases/vPing/CI/libraries/vPing_userdata.py +++ b/testcases/vPing/CI/libraries/vPing_userdata.py @@ -35,6 +35,9 @@ parser.add_argument("-d", "--debug", help="Debug mode", action="store_true") parser.add_argument("-r", "--report", help="Create json result file", action="store_true") +parser.add_argument("-n", "--noclean", + help="Don't clean the created resources for this test.", + action="store_true") args = parser.parse_args() @@ -192,6 +195,9 @@ def create_private_neutron_net(neutron): def cleanup(nova, neutron, image_id, network_dic, port_id1, port_id2): + if args.noclean: + logger.debug("The OpenStack resources are not deleted.") + return True # delete both VMs logger.info("Cleaning up...") |