X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osmclient%2Fsol005%2Fnsd.py;h=dac0adcdaee74caf2fb8424cadddd9d79df4773b;hb=74341f044cb996f8002ba8f66f4ab0de765098a3;hp=3288e954d0f489841b8e1d86951f8201ea998690;hpb=6ff7ac96b5b8e74f5f1c36231f19c87f12715149;p=osm%2Fosmclient.git diff --git a/osmclient/sol005/nsd.py b/osmclient/sol005/nsd.py index 3288e95..dac0adc 100644 --- a/osmclient/sol005/nsd.py +++ b/osmclient/sol005/nsd.py @@ -91,9 +91,11 @@ class Nsd(object): def delete(self, name): nsd = self.get(name) - resp = self._http.delete_cmd('{}/{}'.format(self._apiBase, nsd['_id'])) - #print 'RESP: '.format(resp) - if resp is None: + http_code, resp = self._http.delete_cmd('{}/{}'.format(self._apiBase, nsd['_id'])) + #print 'RESP: {}'.format(resp) + if http_code == 202: + print 'Deletion in progress' + elif http_code == 204: print 'Deleted' else: raise ClientException("failed to delete nsd {}: {}".format(name, resp))