Skip to content

Commit

Permalink
Lisinng resources with obj_uids will return the list of object that e…
Browse files Browse the repository at this point in the history
…xists,

similarly when listing one resource, if the resource dosent exists empty list
should be retured.
Closes-Bug: 1465881

Change-Id: I87a64555094db10986c0e5078b56cdf314fa0bb0
  • Loading branch information
cijohnson committed Jun 16, 2015
1 parent 018cc75 commit fe90314
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/api-lib/vnc_api.py
Expand Up @@ -627,9 +627,13 @@ def resource_list(self, obj_type, parent_id=None, parent_fq_name=None,
content = self._request_server(rest.OP_POST,
uri, json_body)
else: # GET /<collection>
content = self._request_server(rest.OP_GET,
obj_class.create_uri,
data = query_params)
try:
content = self._request_server(rest.OP_GET,
obj_class.create_uri,
data = query_params)
except NoIdError:
# dont allow NoIdError propagate to user
return []

if not detail:
return json.loads(content)
Expand Down

0 comments on commit fe90314

Please sign in to comment.