projects
/
osm
/
osmclient.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
new --force option for xxx-delete commands in sol005 client
[osm/osmclient.git]
/
osmclient
/
sol005
/
nsd.py
diff --git
a/osmclient/sol005/nsd.py
b/osmclient/sol005/nsd.py
index
055d2e5
..
ef9e5ab
100644
(file)
--- a/
osmclient/sol005/nsd.py
+++ b/
osmclient/sol005/nsd.py
@@
-90,9
+90,13
@@
class Nsd(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
):
nsd = self.get(name)
nsd = self.get(name)
- http_code, resp = self._http.delete_cmd('{}/{}'.format(self._apiBase, nsd['_id']))
+ querystring = ''
+ if force:
+ querystring = '?FORCE=True'
+ http_code, resp = self._http.delete_cmd('{}/{}{}'.format(self._apiBase,
+ nsd['_id'], querystring))
if resp:
resp = json.loads(resp)
#print 'RESP: {}'.format(resp)
if resp:
resp = json.loads(resp)
#print 'RESP: {}'.format(resp)