X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osmclient%2Fsol005%2Fvim.py;h=293362a3e7ad5d0df2f592ffb3b03f752b5ef5d9;hb=3f592284d97ed71e8d7bab435586f12623691e47;hp=6e15e5bbea602e2e49a3a1608bd270883ede1259;hpb=061856b26ecc63183378489fa7eb6ed5a6f0250f;p=osm%2Fosmclient.git diff --git a/osmclient/sol005/vim.py b/osmclient/sol005/vim.py index 6e15e5b..293362a 100644 --- a/osmclient/sol005/vim.py +++ b/osmclient/sol005/vim.py @@ -66,7 +66,7 @@ class Vim(object): if not resp or 'id' not in resp: raise ClientException('unexpected response from server - {}'.format( resp)) - print resp['id'] + print(resp['id']) else: msg = "" if resp: @@ -81,9 +81,9 @@ class Vim(object): vim_config = {} if 'config' in vim_account: - if config=="" and (sdncontroller or sdn_port_mapping): + if vim_account.get('config')=="" and (sdn_controller or sdn_port_mapping): raise ClientException("clearing config is incompatible with updating SDN info") - if config=="": + if vim_account.get('config')=="": vim_config = None else: vim_config = yaml.safe_load(vim_account['config']) @@ -105,7 +105,7 @@ class Vim(object): if not resp or 'id' not in resp: raise ClientException('unexpected response from server - {}'.format( resp)) - print resp['id'] + print(resp['id']) else: msg = "" if resp: @@ -144,9 +144,9 @@ class Vim(object): #print 'HTTP CODE: {}'.format(http_code) #print 'RESP: {}'.format(resp) if http_code == 202: - print 'Deletion in progress' + print('Deletion in progress') elif http_code == 204: - print 'Deleted' + print('Deleted') else: msg = "" if resp: