X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osmclient%2Fsol005%2Fvnfd.py;h=c903f93fea7ce85cf8499c1454837bf392bfae8e;hb=refs%2Fchanges%2F57%2F6157%2F1;hp=cc5f04a2e155c2a7262afd59828041657f3d9fd2;hpb=93b9862dd5092327dab103ce44cf27bb89606b69;p=osm%2Fosmclient.git diff --git a/osmclient/sol005/vnfd.py b/osmclient/sol005/vnfd.py index cc5f04a..c903f93 100644 --- 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 delete(self, name): + def delete(self, name, force=False): 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'