diff options
author | jose.lausuch <jose.lausuch@ericsson.com> | 2016-02-10 18:14:52 +0100 |
---|---|---|
committer | Morgan Richomme <morgan.richomme@orange.com> | 2016-02-10 17:26:10 +0000 |
commit | c84024e777a124bc3a6ac875e3d8504de855a937 (patch) | |
tree | 912341eaa39774e27ab6ca9cf453e467d1277fa5 /testcases/vPing/CI | |
parent | c8e6dd1924000097265ed7bf2f64cb3b89154aeb (diff) |
Add -n|--no-clean flag to vPing,Tempest,Rally,vIMS scripts
Use --no-clean flag in run_tests.sh to tell the test scripts to cleanup
or not the resources
Change-Id: I597eca5199e1eaf16b1f03a223222d33e4adf170
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
(cherry picked from commit abc81e24d33b9bf8d2f8fb05dc5f5f57443abe93)
Diffstat (limited to 'testcases/vPing/CI')
-rw-r--r-- | testcases/vPing/CI/libraries/vPing_ssh.py | 6 | ||||
-rw-r--r-- | testcases/vPing/CI/libraries/vPing_userdata.py | 6 |
2 files changed, 12 insertions, 0 deletions
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...") |