projects
/
osm
/
osmclient.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
return http_code,data tuple in DELETE operations for sol005 client
[osm/osmclient.git]
/
osmclient
/
sol005
/
vim.py
diff --git
a/osmclient/sol005/vim.py
b/osmclient/sol005/vim.py
index
8a0b11a
..
0dcc4ad
100644
(file)
--- a/
osmclient/sol005/vim.py
+++ b/
osmclient/sol005/vim.py
@@
-88,8
+88,11
@@
class Vim(object):
vim_id = vim_name
if not utils.validate_uuid4(vim_name):
vim_id = self.get_id(vim_name)
vim_id = vim_name
if not utils.validate_uuid4(vim_name):
vim_id = self.get_id(vim_name)
- resp = self._http.delete_cmd('{}/{}'.format(self._apiBase,vim_id))
- if resp is None:
+ http_code, resp = self._http.delete_cmd('{}/{}'.format(self._apiBase,vim_id))
+ #print 'RESP: {}'.format(resp)
+ if http_code == 202:
+ print 'Deletion in progress'
+ elif http_code == 204:
print 'Deleted'
else:
raise ClientException("failed to delete vim {} - {}".format(vim_name, resp))
print 'Deleted'
else:
raise ClientException("failed to delete vim {} - {}".format(vim_name, resp))