- nsd = self.get(name)
- # It is redundant, since the previous one already gets the whole nsdinfo
- # The only difference is that a different primitive is exercised
- _, resp = self._http.get2_cmd('{}/{}'.format(self._apiBase, nsd['_id']))
- #print(yaml.safe_dump(resp))
- if resp:
- return json.loads(resp)
- raise NotFound("nsd {} not found".format(name))
+ try:
+ nsd = self.get(name)
+ # It is redundant, since the previous one already gets the whole nsdinfo
+ # The only difference is that a different primitive is exercised
+ _, resp = self._http.get2_cmd('{}/{}'.format(self._apiBase, nsd['_id']))
+ #print(yaml.safe_dump(resp))
+ if resp:
+ return json.loads(resp)
+ except NotFound:
+ raise NotFound("nsd '{}' not found".format(name))
+ raise NotFound("nsd '{}' not found".format(name))