projects
/
osm
/
osmclient.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
move wim_account parameter inside config of ns-create
[osm/osmclient.git]
/
osmclient
/
sol005
/
vim.py
diff --git
a/osmclient/sol005/vim.py
b/osmclient/sol005/vim.py
index
6e15e5b
..
293362a
100644
(file)
--- 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))
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:
else:
msg = ""
if resp:
@@
-81,9
+81,9
@@
class Vim(object):
vim_config = {}
if 'config' in vim_account:
vim_config = {}
if 'config' in vim_account:
- if
config=="" and (sdn
controller 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")
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'])
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))
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:
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 '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:
elif http_code == 204:
- print
'Deleted'
+ print
('Deleted')
else:
msg = ""
if resp:
else:
msg = ""
if resp: