Skip to content

Commit

Permalink
PAPP-35185: linting and static test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tapishj-splunk committed Jan 29, 2025
1 parent 27aec9a commit 6522a43
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
20 changes: 6 additions & 14 deletions ciscosecurefirewall.json
Original file line number Diff line number Diff line change
Expand Up @@ -2710,6 +2710,10 @@
"data_path": "summary.total_objects_successful",
"data_type": "numeric"
},
{
"data_path": "action_result.parameter.policy_id",
"data_type": "string"
},
{
"data_path": "action_result.parameter.name",
"data_type": "string"
Expand Down Expand Up @@ -2808,7 +2812,7 @@
"versions": "EQ(*)"
},
{
"action": "delete intrusion policies",
"action": "delete intrusion policy",
"description": "Deleted the specified access intrusion policy",
"type": "generic",
"identifier": "delete_intrusion_policy",
Expand Down Expand Up @@ -2848,19 +2852,7 @@
"data_type": "numeric"
},
{
"data_path": "action_result.parameter.name",
"data_type": "string"
},
{
"data_path": "action_result.parameter.description",
"data_type": "string"
},
{
"data_path": "action_result.parameter.base_policy",
"data_type": "string"
},
{
"data_path": "action_result.parameter.inspection_mode",
"data_path": "action_result.parameter.policy_id",
"data_type": "string"
},
{
Expand Down
4 changes: 2 additions & 2 deletions ciscosecurefirewall_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ def get_domain_id(self, domain_name: str) -> str:
return "default"

for domain in self.domains:
leaf_domain = domain["name"].lower().split('/')[-1]
leaf_domain = domain["name"].lower().split("/")[-1]
if domain_name.lower() == leaf_domain:
return domain["uuid"]

Expand Down Expand Up @@ -1082,7 +1082,7 @@ def _handle_update_intrusion_policy(self, param: Dict[str, Any]) -> bool:
"description": param.get("description", "") or policy_data.get("description", ""),
"inspectionMode": param.get("inspection_mode") or policy_data["inspectionMode"],
"basePolicy": {"id": param.get("base_policy") or policy_data["basePolicy"]["id"]},
"replicate_inspection_mode": param.get("replicate_inspection_mode", False)
"replicate_inspection_mode": param.get("replicate_inspection_mode", False),
}
url = INTRUSION_POLICY_ID_ENDPOINT.format(domain_id=domain_uuid, policy_id=policy_id)
ret_val, response = self._make_rest_call("put", url, action_result, json_body=payload)
Expand Down

0 comments on commit 6522a43

Please sign in to comment.