Skip to content

Commit

Permalink
Ensure netscaler_nitro_request get_filtered uses all filters, fixes #48
Browse files Browse the repository at this point in the history
… (#52)
  • Loading branch information
JonasVerhofste committed Jun 7, 2020
1 parent 5b85600 commit ffd2bec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
bugfixes:
- netscaler_nitro_request - use all filters for get_filtered instead of only the first one (https://github.com/ansible-collections/community.network/issues/48).
5 changes: 1 addition & 4 deletions plugins/modules/network/netscaler/netscaler_nitro_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,10 +642,7 @@ def get_filtered(self):
if self._module.params['filter'] is None:
self.fail_module(msg='NITRO filter is undefined.')

keys = list(self._module.params['filter'].keys())
filter_key = keys[0]
filter_value = self._module.params['filter'][filter_key]
filter_str = '%s:%s' % (filter_key, filter_value)
filter_str = ','.join('%s:%s' % (k, v) for k, v in self._module.params['filter'].items())

url = '%s://%s/nitro/v1/config/%s?filter=%s' % (
self._module.params['nitro_protocol'],
Expand Down

0 comments on commit ffd2bec

Please sign in to comment.