From: linux_geek Date: Thu, 17 Nov 2016 03:44:27 +0000 (+0500) Subject: Ansible related commands in its own module. X-Git-Tag: danube.1.0~178^2~1 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F65%2F24465%2F1;p=qtip.git Ansible related commands in its own module. JIRA: QTIP-154 JIRA: QTIP-150 Change-Id: I1bdd8d74d8978fd86ea659dae914f12874b6687d Signed-off-by: Taseer Ahmed --- diff --git a/qtip/cli/commands/cmd_ansible.py b/qtip/cli/commands/cmd_ansible.py index 001185a3..857e68e2 100644 --- a/qtip/cli/commands/cmd_ansible.py +++ b/qtip/cli/commands/cmd_ansible.py @@ -30,3 +30,32 @@ class Ansible: def status(self): click.echo("check connectivity") pass + + +@click.group() +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()