aboutsummaryrefslogtreecommitdiffstats
path: root/qtip
diff options
context:
space:
mode:
authorzhihui wu <wu.zhihui1@zte.com.cn>2017-05-10 07:22:20 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-05-10 07:22:20 +0000
commitb2614e45ec4f7c7d21be7f9b15edafd4086d88de (patch)
tree53dd5b106e5619d7740e6517f7c8ca5c9a9f4896 /qtip
parent4594ef75c5fa7fcf8013f6558a2940884a922e20 (diff)
parente358ab1d8d464d7b9cb064fde29ffa6fba93e48b (diff)
Merge "Remove prompts for options while creating workspace"
Diffstat (limited to 'qtip')
-rw-r--r--qtip/cli/commands/cmd_workspace.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/qtip/cli/commands/cmd_workspace.py b/qtip/cli/commands/cmd_workspace.py
index 9636f7fb..42d4e2d5 100644
--- a/qtip/cli/commands/cmd_workspace.py
+++ b/qtip/cli/commands/cmd_workspace.py
@@ -21,10 +21,20 @@ def cli():
@cli.command("create", help="Create QTIP workspace")
-def create():
+@click.option('--pod', default='unknown', help='Name of pod under test')
+@click.option('--installer', help='OPNFV installer')
+@click.option('--master-host', help='Installer hostname')
+@click.option('--scenario', default='unknown', help='OPNFV scenario')
+@click.argument('name')
+def create(pod, installer, master_host, scenario, name):
extra_vars = {
'qtip_package': utils.QTIP_PACKAGE,
- 'cwd': os.getcwd()
+ 'cwd': os.getcwd(),
+ 'pod_name': pod,
+ 'installer': installer,
+ 'scenario': scenario,
+ 'installer_master_host': master_host,
+ 'workspace': name
}
os.system("ANSIBLE_ROLES_PATH={qtip_package}/{roles_path} ansible-playbook"
" {qtip_package}/{roles_path}/qtip-workspace/create.yml"