(bug 650) adding WIM account instantiation parameter.
[osm/osmclient.git] / osmclient / scripts / osm.py
index 194196b..45ae5e7 100755 (executable)
@@ -270,7 +270,7 @@ def vnfd_list(ctx, nf_type, filter):
     else:
         resp = ctx.obj.vnfd.list()
     #print yaml.safe_dump(resp)
-    table = PrettyTable(['vnfd name', 'id'])
+    table = PrettyTable(['nfpkg name', 'id'])
     fullclassname = ctx.obj.__module__ + "." + ctx.obj.__class__.__name__
     if fullclassname == 'osmclient.sol005.client.Client':
         for vnfd in resp:
@@ -1122,6 +1122,8 @@ def nfpkg_create(ctx, filename, overwrite):
               prompt=True, help='name of the NS descriptor')
 @click.option('--vim_account',
               prompt=True, help='default VIM account id or name for the deployment')
+@click.option('--wim_account',
+              default=None, help='default WIM account for intersite connectivity. False to not use a WIM')
 @click.option('--admin_status',
               default='ENABLED',
               help='administration status')
@@ -1139,6 +1141,7 @@ def ns_create(ctx,
               nsd_name,
               ns_name,
               vim_account,
+              wim_account,
               admin_status,
               ssh_keys,
               config,
@@ -1156,7 +1159,8 @@ def ns_create(ctx,
             ns_name,
             config=config,
             ssh_keys=ssh_keys,
-            account=vim_account)
+            account=vim_account,
+            wim_account=wim_account)
     except ClientException as inst:
         print((inst.message))
         exit(1)
@@ -2236,8 +2240,9 @@ def project_show(ctx, name):
               confirmation_prompt=True,
               help='user password')
 @click.option('--projects',
-              prompt=True,
+              prompt="Comma separate list of projects",
               multiple=True,
+              callback=lambda ctx, param, value: ''.join(value).split(',') if all(len(x)==1 for x in value) else value,
               help='list of project ids that the user belongs to')
 #@click.option('--description',
 #              default='no description',