Skip to content

Commit

Permalink
config-perf: add filters parameter in client-library list api
Browse files Browse the repository at this point in the history
Change-Id: I898f7c41031b6aec0283b0a037f4154daf0ea810
Partial-Bug: #1462156
  • Loading branch information
Hampapur Ajay committed Jun 9, 2015
1 parent af9cfc2 commit 047539b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/api-lib/vnc_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ def get_auth_token(self):

def resource_list(self, obj_type, parent_id=None, parent_fq_name=None,
back_ref_id=None, obj_uuids=None, fields=None,
detail=False, count=False):
detail=False, count=False, filters=None):
if not obj_type:
raise ResourceTypeUnknownError(obj_type)

Expand Down Expand Up @@ -641,6 +641,13 @@ def resource_list(self, obj_type, parent_id=None, parent_fq_name=None,

query_params['count'] = count

if filters:
ffield_names = ','.join([f['field_name'] for f in filters])
ffield_values = ','.join(
[json.dumps(f['field_value']) for f in filters])
query_params['filter_field_names'] = ffield_names
query_params['filter_field_values'] = ffield_values

if do_post_for_list:
uri = self._action_uri.get('list-bulk-collection')
if not uri:
Expand Down

0 comments on commit 047539b

Please sign in to comment.