X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osmclient%2Fscripts%2Fosm.py;h=3ef81acf5e87064f70b8461a7d922d1842500afc;hb=refs%2Fchanges%2F26%2F10026%2F11;hp=e3b5ac6f2252572220bb8f320230dd37af60579a;hpb=7b7b5cdd7856dd11f1c5fb8051d90d684ae9dfbe;p=osm%2Fosmclient.git diff --git a/osmclient/scripts/osm.py b/osmclient/scripts/osm.py index e3b5ac6..3ef81ac 100755 --- a/osmclient/scripts/osm.py +++ b/osmclient/scripts/osm.py @@ -1306,6 +1306,7 @@ def vnf_show(ctx, name, literal, filter, kdu): time.sleep(5) t += 5 print ("Could not determine KDU status") + return if literal: print(yaml.safe_dump(resp, indent=4, default_flow_style=False)) @@ -2537,7 +2538,7 @@ def vim_list(ctx, filter, long): if long: table = PrettyTable(['vim name', 'uuid', 'project', 'operational state', 'error details']) else: - table = PrettyTable(['vim name', 'uuid']) + table = PrettyTable(['vim name', 'uuid', 'operational state']) for vim in resp: if long: vim_details = ctx.obj.vim.get(vim['uuid']) @@ -2561,7 +2562,7 @@ def vim_list(ctx, filter, long): table.add_row([vim['name'], vim['uuid'], '{} ({})'.format(project_name, project_id), vim_state, wrap_text(text=error_details, width=80)]) else: - table.add_row([vim['name'], vim['uuid']]) + table.add_row([vim['name'], vim['uuid'], vim['_admin'].get('operationalState', '-')]) table.align = 'l' print(table) @@ -3920,7 +3921,7 @@ def upload_package(ctx, filename, skip_charm_build): @click.option('--vnf_name', default=None, help='member-vnf-index if the target is a vnf instead of a ns)') @click.option('--kdu_name', default=None, help='kdu-name if the target is a kdu)') @click.option('--vdu_id', default=None, help='vdu-id if the target is a vdu') -@click.option('--vdu_count', default=None, help='number of vdu instance of this vdu_id') +@click.option('--vdu_count', default=None, type=int, help='number of vdu instance of this vdu_id') @click.option('--action_name', prompt=True, help='action name') @click.option('--params', default=None, help='action params in YAML/JSON inline string') @click.option('--params_file', default=None, help='YAML/JSON file with action params') @@ -3956,7 +3957,7 @@ def ns_action(ctx, op_data['kdu_name'] = kdu_name if vdu_id: op_data['vdu_id'] = vdu_id - if vdu_count: + if vdu_count is not None: op_data['vdu_count_index'] = vdu_count if timeout: op_data['timeout_ns_action'] = timeout