-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Prisma Cloud v2 #24171
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 v2 #24171
Conversation
…ud-v2 # Conflicts: # Packs/PrismaCloud/Integrations/PrismaCloudV2/PrismaCloudV2.py # Packs/PrismaCloud/Integrations/PrismaCloudV2/PrismaCloudV2.yml # Packs/PrismaCloud/Integrations/PrismaCloudV2/PrismaCloudV2_description.md # Packs/PrismaCloud/Integrations/PrismaCloudV2/PrismaCloudV2_test.py
Packs/PrismaCloud/Playbooks/playbook-PCR_-_Azure_AKS_Misconfig_v2_README.md
Outdated
Show resolved
Hide resolved
Packs/PrismaCloud/Playbooks/playbook-PCR_-_Azure_SQL_Misconfig_v2.yml
Outdated
Show resolved
Hide resolved
Packs/PrismaCloud/Playbooks/playbook-PCR_-_Azure_Storage_Misconfig_v2.yml
Outdated
Show resolved
Hide resolved
Packs/PrismaCloud/Playbooks/playbook-PCR_-_Azure_Storage_Misconfig_v2_README.md
Outdated
Show resolved
Hide resolved
Packs/PrismaCloud/Playbooks/playbook-Prisma_Cloud_Correlate_Alerts_v2.yml
Outdated
Show resolved
Hide resolved
Done.
@BEAdi @dorschw |
reduced_dict[key] = reduced_nested_dict | ||
elif isinstance(value, list): | ||
reduced_list = [] | ||
for item in value: |
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.
can we just call it recursively instead?
if isinstance(item, dict): | ||
if reduced_nested_dict := remove_empty_values_from_dict(item): | ||
reduced_list.append(reduced_nested_dict) | ||
elif item: | ||
reduced_list.append(item) | ||
if reduced_list: | ||
reduced_dict[key] = reduced_list |
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.
can we just do reduced_dict[key] = [remove_empty_values_from_dict(subvalue) for subvalue in value]
instead of lines 448-454?
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.
No, it doesn't have the same behaviour- can cause an empty list being inserted in case all nested values are empty.
I did change the function to make it more generic and recursive, and less nested.
# Conflicts: # Packs/PrismaCloud/pack_metadata.json
# Conflicts: # Packs/CommonTypes/IncidentFields/incidentfield-Last_Update_Time.json # Packs/CommonTypes/ReleaseNotes/3_3_52.md
Link to the unit tests coverage report: |
Status
Related Issues
fixes: https://jira-hq.paloaltonetworks.local/browse/CIAC-1066, https://jira-hq.paloaltonetworks.local/browse/CIAC-5337
Description
A few sentences describing the overall goals of the pull request's commits.
Screenshots
Paste here any images that will help the reviewer
Minimum version of Cortex XSOAR
Does it break backward compatibility?
Must have