curl_cmd.close()
# TODO 202 accepted should be returned somehow
if data.getvalue():
- return http_code, json.loads(data.getvalue().decode())
+ return http_code, data.getvalue().decode()
else:
return http_code, None
def delete(self, name):
ns = self.get(name)
http_code, resp = self._http.delete_cmd('{}/{}'.format(self._apiBase,ns['_id']))
+ if resp:
+ resp = json.loads(resp)
#print 'RESP: {}'.format(resp)
if http_code == 202:
print 'Deletion in progress'
def delete(self, name):
nsd = self.get(name)
http_code, resp = self._http.delete_cmd('{}/{}'.format(self._apiBase, nsd['_id']))
+ if resp:
+ resp = json.loads(resp)
#print 'RESP: {}'.format(resp)
if http_code == 202:
print 'Deletion in progress'
def delete(self, name):
sdn_controller = self.get(name)
http_code, resp = self._http.delete_cmd('{}/{}'.format(self._apiBase,sdn_controller['_id']))
+ if resp:
+ resp = json.loads(resp)
#print 'RESP: {}'.format(resp)
if http_code == 202:
print 'Deletion in progress'
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))
+ if resp:
+ resp = json.loads(resp)
#print 'RESP: {}'.format(resp)
if http_code == 202:
print 'Deletion in progress'
def delete(self, name):
vnfd = self.get(name)
http_code, resp = self._http.delete_cmd('{}/{}'.format(self._apiBase,vnfd['_id']))
+ if resp:
+ resp = json.loads(resp)
#print 'RESP: {}'.format(resp)
if http_code == 202:
print 'Deletion in progress'