@click.option("--nsd_name", prompt=True, help="name of the NS descriptor")
@click.option(
"--vim_account",
- prompt=True,
+ default=None,
help="default VIM account id or name for the deployment",
)
+@click.option(
+ "--paas_account",
+ default=None,
+ help="default PaaS account id or name for the deployment",
+)
@click.option("--admin_status", default="ENABLED", help="administration status")
@click.option(
"--ssh_keys",
nsd_name,
ns_name,
vim_account,
+ paas_account,
admin_status,
ssh_keys,
config,
)
with open(config_file, "r") as cf:
config = cf.read()
+ if not (vim_account or paas_account):
+ raise ClientException(
+ 'specify "vim_account" or "paas_account", both options can not be empty'
+ )
+ if vim_account and paas_account:
+ raise ClientException(
+ '"vim_account" and "paas_account" can not be used together, use only one of them'
+ )
ctx.obj.ns.create(
nsd_name,
ns_name,
config=config,
ssh_keys=ssh_keys,
- account=vim_account,
+ vim_account=vim_account,
+ paas_account=paas_account,
+ admin_status=admin_status,
wait=wait,
timeout=timeout,
)
- # except ClientException as e:
- # print(str(e))
- # exit(1)
def nst_create(ctx, filename, overwrite):