From: garciadeblas Date: Thu, 3 May 2018 16:37:54 +0000 (+0200) Subject: osm.py: print error message when using vnf-list with --sol005 X-Git-Tag: v4.0.0~21 X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2Fosmclient.git;a=commitdiff_plain;h=6ff7ac96b5b8e74f5f1c36231f19c87f12715149 osm.py: print error message when using vnf-list with --sol005 Change-Id: Ib3a6b85b409cab098c24243f38ea035650438dc3 Signed-off-by: garciadeblas --- diff --git a/osmclient/scripts/osm.py b/osmclient/scripts/osm.py index 6560514..2a321fc 100755 --- a/osmclient/scripts/osm.py +++ b/osmclient/scripts/osm.py @@ -217,7 +217,12 @@ def vnfd_list2(ctx, filter): @click.pass_context def vnf_list(ctx): ''' list all VNF instances''' - resp = ctx.obj.vnf.list() + try: + check_client_version(ctx.obj, ctx.command.name, 'v1') + resp = ctx.obj.vnf.list() + except ClientException as inst: + print(inst.message) + exit(1) table = PrettyTable( ['vnf name', 'id',