Skip to content

Commit

Permalink
Revert "SOARHELP-2878: Remove params argument, use params in query pa…
Browse files Browse the repository at this point in the history
…rameter"

This reverts commit f87605a.
  • Loading branch information
ishans-crest committed Feb 12, 2024
1 parent f87605a commit e5a255e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions ciscoise_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def make_another_call(*args, **kwargs):

return make_another_call

def _call_ers_api(self, endpoint, action_result, data=None, allow_unknown=True, method="get", try_ha_device=False):
def _call_ers_api(self, endpoint, action_result, data=None, allow_unknown=True, method="get", try_ha_device=False, params=None):
auth_method = self._ers_auth or self._auth
if not auth_method:
return action_result.set_status(phantom.APP_ERROR, CISCOISE_ERS_CRED_MISSING), None
Expand All @@ -142,6 +142,7 @@ def _call_ers_api(self, endpoint, action_result, data=None, allow_unknown=True,
verify=verify,
headers=headers,
auth=auth_method,
params=params
)

except Exception as e:
Expand Down Expand Up @@ -429,9 +430,11 @@ def _terminate_session(self, param):
def _paginator(self, endpoint, action_result, limit=None):

items_list = list()
endpoint = endpoint + "?size=" + str(DEFAULT_MAX_RESULTS)
params = {}
params["size"] = DEFAULT_MAX_RESULTS

while True:
ret_val, items = self._call_ers_api(endpoint, action_result)
ret_val, items = self._call_ers_api(endpoint, action_result, params=params)
if phantom.is_fail(ret_val):
self.debug_print("Call to ERS API Failed")
return None
Expand Down

0 comments on commit e5a255e

Please sign in to comment.