Skip to content

Commit

Permalink
SOARHELP-2878: Remove params argument, use params in query parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
ishans-crest committed Feb 12, 2024
1 parent b59ae18 commit f87605a
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 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, params=None):
def _call_ers_api(self, endpoint, action_result, data=None, allow_unknown=True, method="get", try_ha_device=False):
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,7 +142,6 @@ 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 @@ -430,11 +429,9 @@ def _terminate_session(self, param):
def _paginator(self, endpoint, action_result, limit=None):

items_list = list()
params = {}
params["size"] = DEFAULT_MAX_RESULTS

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

0 comments on commit f87605a

Please sign in to comment.