diff options
Diffstat (limited to 'testcases/vPing')
-rw-r--r-- | testcases/vPing/CI/libraries/vPing_ssh.py (renamed from testcases/vPing/CI/libraries/vPing2.py) | 9 | ||||
-rw-r--r-- | testcases/vPing/CI/libraries/vPing_userdata.py (renamed from testcases/vPing/CI/libraries/vPing.py) | 9 |
2 files changed, 16 insertions, 2 deletions
diff --git a/testcases/vPing/CI/libraries/vPing2.py b/testcases/vPing/CI/libraries/vPing_ssh.py index 1ce6dc9e5..3050aad57 100644 --- a/testcases/vPing/CI/libraries/vPing2.py +++ b/testcases/vPing/CI/libraries/vPing_ssh.py @@ -37,12 +37,15 @@ 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 """ -logger = logging.getLogger('vPing') +logger = logging.getLogger('vPing_ssh') logger.setLevel(logging.DEBUG) ch = logging.StreamHandler() @@ -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...") @@ -288,6 +294,7 @@ def push_results(start_time_ts, duration, test_status): scenario = functest_utils.get_scenario(logger) pod_name = functest_utils.get_pod_name(logger) functest_utils.push_results_to_db(TEST_DB, + "functest", "vPing", logger, pod_name, scenario, payload={'timestart': start_time_ts, diff --git a/testcases/vPing/CI/libraries/vPing.py b/testcases/vPing/CI/libraries/vPing_userdata.py index 1368bbec1..90562969b 100644 --- a/testcases/vPing/CI/libraries/vPing.py +++ b/testcases/vPing/CI/libraries/vPing_userdata.py @@ -35,12 +35,15 @@ 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 """ -logger = logging.getLogger('vPing') +logger = logging.getLogger('vPing_userdata') logger.setLevel(logging.DEBUG) ch = logging.StreamHandler() @@ -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...") @@ -276,6 +282,7 @@ def push_results(start_time_ts, duration, test_status): scenario = functest_utils.get_scenario(logger) pod_name = functest_utils.get_pod_name(logger) functest_utils.push_results_to_db(TEST_DB, + "functest", "vPing_userdata", logger, pod_name, scenario, payload={'timestart': start_time_ts, |