- http_code, resp2 = self._http.get2_cmd('{}/{}/{}'.format(self._apiBase, nsd['_id'], thing))
+ http_code, resp = self._http.get2_cmd('{}/{}/{}'.format(self._apiBase, nsd['_id'], thing))
raise NotFound("nsd {} not found".format(name))
def get_descriptor(self, name, filename):
raise NotFound("nsd {} not found".format(name))
def get_descriptor(self, name, filename):
for (key,val) in headers.items()]
self._http.set_http_header(http_header)
if update_endpoint:
for (key,val) in headers.items()]
self._http.set_http_header(http_header)
if update_endpoint:
self._apiBase = '{}{}{}'.format(self._apiName,
self._apiVersion, self._apiResource)
endpoint = '{}{}'.format(self._apiBase,ow_string)
self._apiBase = '{}{}{}'.format(self._apiName,
self._apiVersion, self._apiResource)
endpoint = '{}{}'.format(self._apiBase,ow_string)
- resp = self._http.post_cmd(endpoint=endpoint, filename=filename)
+ http_code, resp = self._http.post_cmd(endpoint=endpoint, filename=filename)
+ if resp:
+ resp = json.loads(resp)