X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osmclient%2Fscripts%2Fosm.py;h=d71eaaae432e07d4f2aa902fc7db2af86ed57690;hb=refs%2Fchanges%2F39%2F9739%2F4;hp=2cca98d180004e9c750d5f58fbb976a9829f59d8;hpb=adb1e630c03aab0a1dbe8c52728e4185318a933a;p=osm%2Fosmclient.git diff --git a/osmclient/scripts/osm.py b/osmclient/scripts/osm.py index 2cca98d..d71eaaa 100755 --- a/osmclient/scripts/osm.py +++ b/osmclient/scripts/osm.py @@ -2597,8 +2597,10 @@ def vim_list(ctx, filter, long): @cli_osm.command(name='vim-show', short_help='shows the details of a VIM account') @click.argument('name') +@click.option('--filter', multiple=True, + help='restricts the information to the fields in the filter') @click.pass_context -def vim_show(ctx, name): +def vim_show(ctx, name, filter): """shows the details of a VIM account NAME: name or ID of the VIM account @@ -2614,7 +2616,8 @@ def vim_show(ctx, name): table = PrettyTable(['key', 'attribute']) for k, v in list(resp.items()): - table.add_row([k, wrap_text(text=json.dumps(v, indent=2),width=100)]) + if not filter or k in filter: + table.add_row([k, wrap_text(text=json.dumps(v, indent=2),width=100)]) table.align = 'l' print(table)