X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=lib%2Fosm%2Fosmclient%2Fclient.py;h=d91d297883ba4fa4a112568da9ef14d6e30e976a;hb=7e33ad65244c7babe04cefcaf2a1dc2bc72e278f;hp=a65808f2b1c6c9b0551e28ab9e5184b136bc29b2;hpb=a03da5e2aab552daa3e7ced70b3e90466c7c8b82;p=osm%2FLW-UI.git diff --git a/lib/osm/osmclient/client.py b/lib/osm/osmclient/client.py index a65808f..d91d297 100644 --- a/lib/osm/osmclient/client.py +++ b/lib/osm/osmclient/client.py @@ -252,13 +252,16 @@ class Client(object): return self._send_get(_url, headers=self._headers) return None - def ns_delete(self, id): + def ns_delete(self, id, force=None): token = self.get_token() if token: self._headers['Authorization'] = 'Bearer {}'.format(token) - #self._headers['Content-Type'] = 'application/yaml' self._headers['accept'] = 'application/json' - _url = "{0}/nslcm/v1/ns_instances_content/{1}".format(self._base_path, id) + query_path = '' + if force: + query_path = '?FORCE=true' + _url = "{0}/nslcm/v1/ns_instances_content/{1}{2}".format(self._base_path, id, query_path) + return self._send_delete(_url, headers=self._headers) return None