X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osmclient%2Fsol005%2Fvim.py;h=d540c638afadfcb541888f764ef1ce0cc4f566d6;hb=0a7f1259519c504ddb2b47b9c47b6c0543144145;hp=0dcc4ad16191ee7a562ac38e84c4c83474616344;hpb=cd6336d96439b916485a198fea38c3ebd14e2f4d;p=osm%2Fosmclient.git diff --git a/osmclient/sol005/vim.py b/osmclient/sol005/vim.py index 0dcc4ad..d540c63 100644 --- 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) - 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) - 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: - print resp['_id'] + print resp['id'] def update_vim_account_dict(self, vim_account, vim_access): vim_account['vim_type'] = vim_access['vim-type']