2 ##############################################################################
3 # Copyright (c) 2016 Huawei Technologies Co.,Ltd and others.
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
13 from command_group.testcase import Testcase
15 CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help'])
18 @click.group(context_settings=CONTEXT_SETTINGS)
19 @click.version_option(version='0.1')
22 """cli for bottlenecks project
25 bottlenecks testcase run <testcase>
29 _testcase = Testcase()
34 """testcase cli group for bottlenecks project"""
37 @testcase.command('run', help="To execute a test case.")
38 @click.argument('testname', type=click.STRING, required=True)
39 @click.option('-n', '--noclean', is_flag=True, default=False,
40 help='Openstack resources created by the test'
41 'will not be cleaned after the testcase execution.')
42 def testcase_run(testname, noclean):
43 _testcase.run(testname, noclean)