New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prisma Cloud Minimal Response #32606
Conversation
Coverage Report
|
Co-authored-by: ShirleyDenkberg <62508050+ShirleyDenkberg@users.noreply.github.com>
Co-authored-by: ShirleyDenkberg <62508050+ShirleyDenkberg@users.noreply.github.com>
Co-authored-by: ShirleyDenkberg <62508050+ShirleyDenkberg@users.noreply.github.com>
@@ -200,17 +200,33 @@ def remediation_command_list_request(self, time_range: Dict[str, Any], alert_ids | |||
def alert_remediate_request(self, alert_id: str): | |||
self._http_request('PATCH', f'alert/remediation/{alert_id}', resp_type='response') | |||
|
|||
def remove_additional_resource_fields(self, input_dict, keys): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would avoid recursion. instead lets just delete the fields one by one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These fields could appear several times, and I need to modify the object as I go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see my comment
@@ -1520,3 +1522,22 @@ def test_update_remote_system_command(mocker, prisma_cloud_v2_mirroring_client, | |||
|
|||
assert mock_update_remote_alert.call_count == expected_call_count | |||
assert result == 'P-1111111' | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add more broad test where passing, include_resource_json=false will return response without the two additional fields.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current test tests both remove and non-removed fields.
Testing the calling method means using mocking, which will not test my new code.
Packs/PrismaCloud/Integrations/PrismaCloudV2/PrismaCloudV2_test.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Adi Bamberger Edri <72088126+BEAdi@users.noreply.github.com>
…t.py Co-authored-by: Adi Bamberger Edri <72088126+BEAdi@users.noreply.github.com>
Support minimizing Prisma Cloud output size in prisma-cloud-config-search
Status
Related Issues
fixes: https://jira-dc.paloaltonetworks.com/browse/CIAC-9646