aboutsummaryrefslogtreecommitdiffstats
path: root/cli/cli_base.py
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2016-07-08 17:22:54 +0200
committerJose Lausuch <jose.lausuch@ericsson.com>2016-07-08 15:56:04 +0000
commit57e4df971fcf1d292e37516c247c8e9a08d282a1 (patch)
treec07a91e58d1915d733749223a64a1d4042c6c079 /cli/cli_base.py
parent7040e5340d6ac325a9f214db7ac248d136832692 (diff)
Add --noclean option in the CLI
JIRA: FUNCTEST-340 Change-Id: I00cd0a9bf5744bf7ce8998d4bf6427c0766a1322 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'cli/cli_base.py')
-rw-r--r--cli/cli_base.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/cli/cli_base.py b/cli/cli_base.py
index 583b0ab8d..45be1d001 100644
--- a/cli/cli_base.py
+++ b/cli/cli_base.py
@@ -117,8 +117,11 @@ def testcase_show(testname):
@testcase.command('run', help="Executes a test case.")
@click.argument('testname', type=click.STRING, required=True)
-def testcase_run(testname):
- _testcase.run(testname)
+@click.option('-n', '--noclean', is_flag=True, default=False,
+ help='The created openstack resources by the test'
+ 'will not be cleaned after the execution.')
+def testcase_run(testname, noclean):
+ _testcase.run(testname, noclean)
@tier.command('list', help="Lists the available tiers.")
@@ -140,5 +143,8 @@ def tier_gettests(tiername):
@tier.command('run', help="Executes all the tests within a tier.")
@click.argument('tiername', type=click.STRING, required=True)
-def tier_run(tiername):
- _tier.run(tiername)
+@click.option('-n', '--noclean', is_flag=True, default=False,
+ help='The created openstack resources by the tests'
+ 'will not be cleaned after the execution.')
+def tier_run(tiername, noclean):
+ _tier.run(tiername, noclean)