- _, resp = self._http.get2_cmd('{}/{}'.format(self._apiBase, nsi_id))
- #resp = self._http.get_cmd('{}/{}/nsd_content'.format(self._apiBase, nsi_id))
- #print(yaml.safe_dump(resp))
- if resp:
- return json.loads(resp)
+ try:
+ _, resp = self._http.get2_cmd('{}/{}'.format(self._apiBase, nsi_id))
+ #resp = self._http.get_cmd('{}/{}/nsd_content'.format(self._apiBase, nsi_id))
+ #print(yaml.safe_dump(resp))
+ if resp:
+ return json.loads(resp)
+ except NotFound:
+ raise NotFound("nsi '{}' not found".format(name))