X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osmclient%2Fsol005%2Fvim.py;h=ec1ccaddeb466d6a004848154938004dffc42264;hb=refs%2Fchanges%2F57%2F6157%2F1;hp=dca8444ecaf9d4290a57ac216cf966be7d380570;hpb=714ae5cdd921c3d69ff35575febb96e7ff0fac27;p=osm%2Fosmclient.git diff --git a/osmclient/sol005/vim.py b/osmclient/sol005/vim.py index dca8444..ec1ccad 100644 --- a/osmclient/sol005/vim.py +++ b/osmclient/sol005/vim.py @@ -90,11 +90,15 @@ class Vim(object): return vim['uuid'] raise NotFound("vim {} not found".format(name)) - def delete(self, vim_name): + def delete(self, vim_name, force=False): vim_id = vim_name if not utils.validate_uuid4(vim_name): vim_id = self.get_id(vim_name) - http_code, resp = self._http.delete_cmd('{}/{}'.format(self._apiBase,vim_id)) + querystring = '' + if force: + querystring = '?FORCE=True' + http_code, resp = self._http.delete_cmd('{}/{}{}'.format(self._apiBase, + vim_id, querystring)) if resp: resp = json.loads(resp) #print 'RESP: {}'.format(resp)