##############################################################################
import click
-
-from cli.commands.ansible import Ansible
+from qtip.cli.commands import cmd_perftest
+from qtip.cli.commands import cmd_suite
+from qtip.cli.commands import cmd_ansible
CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help'])
+cli = click.CommandCollection(sources=[cmd_perftest.cli, cmd_suite.cli, cmd_ansible.cli])
-@click.group(context_settings=CONTEXT_SETTINGS)
-@click.version_option(version='0.1.dev0')
-def cli():
- pass
-
-_ansible = Ansible()
-
-
-@cli.group()
-@click.pass_context
-def ansible(ctx):
- pass
-
-
-@ansible.command('prepare', help="Prepares the ansible environment. "
- "This step is needed run benchmarks.")
-def ansible_prepare():
- _ansible.prepare()
-
-
-@ansible.command('show', help="Shows the current ansible configuration.")
-def ansible_show():
- _ansible.show()
-
-
-@ansible.command('status', help="Checks if ansible still connects to hosts.")
-def ansible_status():
- _ansible.status()
+if __name__ == '__main__':
+ cli()
author='OPNFV',
author_email='zhang.yujunz@zte.com.cn',
install_requires=['click', 'pyyaml', 'prettytable'],
- packages=['cli'],
+ packages=['qtip.cli'],
entry_points={
- 'console_scripts': ['qtip=cli.entry:cli']
+ 'console_scripts': ['qtip=qtip.cli.entry:cli']
},
license='Apache-2.0',
keywords="performance benchmark opnfv",