projects
/
osm
/
osmclient.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
support of PATCH method for sol005 client
[osm/osmclient.git]
/
osmclient
/
sol005
/
vim.py
diff --git
a/osmclient/sol005/vim.py
b/osmclient/sol005/vim.py
index
0dcc4ad
..
d540c63
100644
(file)
--- a/
osmclient/sol005/vim.py
+++ b/
osmclient/sol005/vim.py
@@
-59,13
+59,14
@@
class Vim(object):
def update(self, vim_name, vim_account):
vim = self.get(vim_name)
def update(self, vim_name, vim_account):
vim = self.get(vim_name)
- resp = self._http.put_cmd(endpoint='{}/{}'.format(self._apiBase,vim['_id']),
+ #resp = self._http.put_cmd(endpoint='{}/{}'.format(self._apiBase,vim['_id']),
+ resp = self._http.patch_cmd(endpoint='{}/{}'.format(self._apiBase,vim['_id']),
postfields_dict=vim_account)
postfields_dict=vim_account)
- if not resp or '_id' not in resp:
- raise ClientException('failed to update vim: '.format(
-
resp))
+ #print 'RESP: {}'.format(resp)
+ if not resp or 'id' not in resp:
+
raise ClientException('failed to update vim: '.format(
resp))
else:
else:
- print resp['
_
id']
+ print resp['id']
def update_vim_account_dict(self, vim_account, vim_access):
vim_account['vim_type'] = vim_access['vim-type']
def update_vim_account_dict(self, vim_account, vim_access):
vim_account['vim_type'] = vim_access['vim-type']