Skip to content
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

Add section and sectionOrder validations. #4739

Merged
merged 19 commits into from
Jan 5, 2025
Merged

Add section and sectionOrder validations. #4739

merged 19 commits into from
Jan 5, 2025

Conversation

talzich
Copy link
Contributor

@talzich talzich commented Dec 26, 2024

Related Issues

fixes: https://jira-dc.paloaltonetworks.com/browse/CIAC-5406

Description

This PR adds to the ST-110 validation by fixing some pydantic models.

The addition will make sure ST-110 will support:

  • Validating sectionorder field of integrations
  • Validating individual section fields of each object in the configuration field

Copy link

Changelog(s) in markdown:

  • This PR adds to the ST-110 validation which will now validate the sectionOrder and individual sections. #4739

@talzich talzich mentioned this pull request Jan 2, 2025
2 tasks
Copy link
Contributor

@YuvHayun YuvHayun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved from my side with minor comments.

Copy link
Contributor

@rshunim rshunim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good Job!!
Don't forget to check ST110 and ST111 on Content.
Play and check all possible cases and make sure ST110 behaves at the same way
Thanks!

Copy link
Contributor

@AradCarmi AradCarmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great Work Tal!
Please fix my few comments.

.changelog/4739.yml Outdated Show resolved Hide resolved
"""
if "sectionOrder" in data and "sectionorder" not in data:
data["sectionorder"] = data.pop("sectionOrder")
elif "sectionOrder" in data and "sectionorder" in data:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would we have sectionOrder and sectionorder in the same yml? Wouldn't we want to fail this case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thought we agreed on combining the two (Union) in our initial discussion with Shunim

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have an example of such a case?

@talzich talzich merged commit 4b0baf8 into master Jan 5, 2025
25 checks passed
@talzich talzich deleted the CIAC-5406 branch January 5, 2025 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants