:raises ClientError: if the specified version does not match the client version
'''
fullclassname = obj.__module__ + "." + obj.__class__.__name__
- message = 'the following commands or options are only supported with the option "--sol005": {}'.format(what)
+ message = 'The following commands or options are only supported with the option "--sol005": {}'.format(what)
if version == 'v1':
- message = 'the following commands or options are not supported when using option "--sol005": {}'.format(what)
+ message = 'The following commands or options are not supported when using option "--sol005": {}'.format(what)
if fullclassname != 'osmclient.{}.client.Client'.format(version):
raise ClientException(message)
return
@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',
'''
try:
resp = ctx.obj.vim.get(name)
+ if 'vim_password' in resp:
+ resp['vim_password']='********'
except ClientException as inst:
print(inst.message)
exit(1)