Skip to content

Commit

Permalink
Review comments - update const variable names, make code pattern cons…
Browse files Browse the repository at this point in the history
…istency
  • Loading branch information
ishans-crest committed Apr 29, 2024
1 parent 7cc021f commit aade450
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions ciscoise_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ def _paginator(self, endpoint, action_result, limit=None):
self.debug_print("Maximum limit reached")
return items_list[:limit]
else:
if next_page_dict is None:
if not next_page_dict:
self.debug_print("No more records left to retrieve")
return items_list
else:
Expand Down Expand Up @@ -724,9 +724,9 @@ def _test_connectivity(self, param):
result, message = self._test_connectivity_to_device(self._base_url, verify)

if not result:
self.save_progress("Error occurred while connecting to first device")
self.save_progress("Error occurred while connecting to primary device")
self.save_progress(str(message))
self.save_progress(CISCOISE_ERROR_TEST_CONNECTIVITY_FAILED_1)
self.save_progress(CISCOISE_ERROR_TEST_CONNECTIVITY_FAILED_PRIMARY_DEVICE)
action_result.set_status(phantom.APP_ERROR)
else:
self.save_progress(CISCOISE_SUCC_TEST_CONNECTIVITY_PASSED_1)
Expand All @@ -738,7 +738,7 @@ def _test_connectivity(self, param):
if not result:
self.save_progress("Error occurred while connecting to high availability device")
self.save_progress(str(message))
self.save_progress(CISCOISE_ERROR_TEST_CONNECTIVITY_FAILED_2)
self.save_progress(CISCOISE_ERROR_TEST_CONNECTIVITY_FAILED_HA_DEVICE)
else:
self.save_progress(CISCOISE_SUCC_TEST_CONNECTIVITY_PASSED_2)

Expand Down
4 changes: 2 additions & 2 deletions ciscoise_consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
ERS_POLICIES = ":9060/ers/config/ancpolicy"

# Error/Success
CISCOISE_ERROR_TEST_CONNECTIVITY_FAILED_1 = "Test connectivity failed for primary device"
CISCOISE_ERROR_TEST_CONNECTIVITY_FAILED_2 = "Test connectivity failed for second device"
CISCOISE_ERROR_TEST_CONNECTIVITY_FAILED_PRIMARY_DEVICE = "Test connectivity failed for primary device"
CISCOISE_ERROR_TEST_CONNECTIVITY_FAILED_HA_DEVICE = "Test connectivity failed for high availability device"
CISCOISE_TEST_CONNECTIVITY_FAILED_ERROR_CODE = "Test connectivity failed with status code: '{code}'"
CISCOISE_SUCC_TEST_CONNECTIVITY_PASSED_1 = "Test connectivity passed for primary device"
CISCOISE_SUCC_TEST_CONNECTIVITY_PASSED_2 = "Test connectivity passed for second device"
Expand Down

0 comments on commit aade450

Please sign in to comment.