projects
/
osm
/
osmclient.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix vim-update by using PUT and proper handling of SDN info
[osm/osmclient.git]
/
osmclient
/
sol005
/
vnfd.py
diff --git
a/osmclient/sol005/vnfd.py
b/osmclient/sol005/vnfd.py
index
cc5f04a
..
c903f93
100644
(file)
--- a/
osmclient/sol005/vnfd.py
+++ b/
osmclient/sol005/vnfd.py
@@
-89,9
+89,15
@@
class Vnfd(object):
def get_artifact(self, name, artifact, filename):
self.get_thing(name, 'artifacts/{}'.format(artifact), filename)
def get_artifact(self, name, artifact, filename):
self.get_thing(name, 'artifacts/{}'.format(artifact), filename)
- def delete(self, name):
+ def delete(self, name
, force=False
):
vnfd = self.get(name)
vnfd = self.get(name)
- http_code, resp = self._http.delete_cmd('{}/{}'.format(self._apiBase,vnfd['_id']))
+ querystring = ''
+ if force:
+ querystring = '?FORCE=True'
+ http_code, resp = self._http.delete_cmd('{}/{}{}'.format(self._apiBase,
+ vnfd['_id'], querystring))
+ if resp:
+ resp = json.loads(resp)
#print 'RESP: {}'.format(resp)
if http_code == 202:
print 'Deletion in progress'
#print 'RESP: {}'.format(resp)
if http_code == 202:
print 'Deletion in progress'