Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mtarking committed Oct 12, 2024
1 parent 849847d commit ec8036c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
9 changes: 8 additions & 1 deletion plugins/action/helper_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

NDFC_DEFAULT_MGMT_POLICY_DESC = "management vrf configuration"


def data_model_key_check(tested_object, keys):
dm_key_dict = {'keys_found': [], 'keys_not_found': [], 'keys_data': [], 'keys_no_data': []}
for key in keys:
Expand All @@ -41,6 +42,7 @@ def data_model_key_check(tested_object, keys):
dm_key_dict['keys_not_found'].append(key)
return dm_key_dict


def ndfc_get_switch_policy(self, task_vars, tmp, switch_serial_number):
policy_data = self._execute_module(
module_name="cisco.dcnm.dcnm_rest",
Expand All @@ -54,6 +56,7 @@ def ndfc_get_switch_policy(self, task_vars, tmp, switch_serial_number):

return policy_data


def ndfc_get_switch_policy_by_template(self, task_vars, tmp, switch_serial_number, template_name):
policy_data = ndfc_get_switch_policy(self, task_vars, tmp, switch_serial_number)

Expand All @@ -63,9 +66,13 @@ def ndfc_get_switch_policy_by_template(self, task_vars, tmp, switch_serial_numbe

return policy_match


def ndfc_get_switch_policy_with_desc(self, task_vars, tmp, switch_serial_number):
policy_data = ndfc_get_switch_policy(self, task_vars, tmp, switch_serial_number)

policy_match = [item for item in policy_data["response"]["DATA"] if item.get("description", None) and item.get("description", None) != NDFC_DEFAULT_MGMT_POLICY_DESC and item["source"] == ""]
policy_match = [
item for item in policy_data["response"]["DATA"]
if item.get("description", None) and item.get("description", None) != NDFC_DEFAULT_MGMT_POLICY_DESC and item["source"] == ""
]

return policy_match
1 change: 1 addition & 0 deletions tests/sanity/ignore-2.14.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ plugins/action/dtc/vpc_pair_check.py action-plugin-docs # action plugin has no m
plugins/action/dtc/verify_tags.py action-plugin-docs # action plugin has no matching module to provide documentation
plugins/action/dtc/diff_model_changes.py action-plugin-docs # action plugin has no matching module to provide documentation
plugins/action/dtc/update_switch_hostname_policy.py action-plugin-docs # action plugin has no matching module to provide documentation
plugins/action/dtc/unmanaged_policy.py action-plugin-docs # action plugin has no matching module to provide documentation
plugins/action/dtd/prepare_service_model.py action-plugin-docs # action plugin has no matching module to provide documentation
plugins/action/test/inventory.py action-plugin-docs # action plugin has no matching module to provide documentation
plugins/action/helper_functions.py action-plugin-docs # action plugin has no matching module to provide documentation
Expand Down
1 change: 1 addition & 0 deletions tests/sanity/ignore-2.15.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ plugins/action/dtc/vpc_pair_check.py action-plugin-docs # action plugin has no m
plugins/action/dtc/verify_tags.py action-plugin-docs # action plugin has no matching module to provide documentation
plugins/action/dtc/diff_model_changes.py action-plugin-docs # action plugin has no matching module to provide documentation
plugins/action/dtc/update_switch_hostname_policy.py action-plugin-docs # action plugin has no matching module to provide documentation
plugins/action/dtc/unmanaged_policy.py action-plugin-docs # action plugin has no matching module to provide documentation
plugins/action/dtd/prepare_service_model.py action-plugin-docs # action plugin has no matching module to provide documentation
plugins/action/test/inventory.py action-plugin-docs # action plugin has no matching module to provide documentation
plugins/action/helper_functions.py action-plugin-docs # action plugin has no matching module to provide documentation
Expand Down
1 change: 1 addition & 0 deletions tests/sanity/ignore-2.16.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ plugins/action/dtc/vpc_pair_check.py action-plugin-docs # action plugin has no m
plugins/action/dtc/verify_tags.py action-plugin-docs # action plugin has no matching module to provide documentation
plugins/action/dtc/diff_model_changes.py action-plugin-docs # action plugin has no matching module to provide documentation
plugins/action/dtc/update_switch_hostname_policy.py action-plugin-docs # action plugin has no matching module to provide documentation
plugins/action/dtc/unmanaged_policy.py action-plugin-docs # action plugin has no matching module to provide documentation
plugins/action/dtd/prepare_service_model.py action-plugin-docs # action plugin has no matching module to provide documentation
plugins/action/test/inventory.py action-plugin-docs # action plugin has no matching module to provide documentation
plugins/action/helper_functions.py action-plugin-docs # action plugin has no matching module to provide documentation
Expand Down

0 comments on commit ec8036c

Please sign in to comment.