X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osmclient%2Fsol005%2Fnsd.py;h=ef9e5ab4d10288123af3dbdfdb0ed0dcf59e68dc;hb=6d10e04620f3985e23dcce03d366f5734ba72a7c;hp=4ae755b0dcb6e199432404ef59022a2b881cc460;hpb=f157128052e59df5c37489926f7d5755714c3cbf;p=osm%2Fosmclient.git diff --git a/osmclient/sol005/nsd.py b/osmclient/sol005/nsd.py index 4ae755b..ef9e5ab 100644 --- a/osmclient/sol005/nsd.py +++ b/osmclient/sol005/nsd.py @@ -90,9 +90,15 @@ class Nsd(object): 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) - 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 http_code == 202: print 'Deletion in progress'