-
Notifications
You must be signed in to change notification settings - Fork 706
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 alternatives to mandatory keys #11268
Add alternatives to mandatory keys #11268
Conversation
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 tried this and it works for me as expected 👍
ssg/entities/profile_base.py
Outdated
msg = "Profile {0} unselects all groups.".format(self.id_) | ||
msg = ("Profile {0} unselects all groups. " | ||
"Check whether it selects any rule or extends any profile." | ||
.format(self.id_)) |
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.
please fix indentation
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.
Thanks for the review, should be fixed now.
cd8b25b
to
58eea27
Compare
@@ -55,6 +55,10 @@ class Profile(XCCDFEntity, SelectionHandler): | |||
"selections", |
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.
@jan-cerny Another approach would be to remove selections
from MANDATORY_KEYS
, I don't think this would open gaps that could lead to problems. But the ALTERNATIVE_KEYS
seem to guard and lead better to what is expected.
Don't require profiles to have 'selections' if they have an 'extends'. This allows a profile to just extend a profile without having to add any selection. Making it possible to have non-versioned profiles to extend versioned profiles.
58eea27
to
521a4dc
Compare
Code Climate has analyzed commit 521a4dc and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 37.5% (50% is the threshold). This pull request will bring the total coverage in the repository to 58.8%. View more on Code Climate. |
Description:
selections
if they have anextends
.Rationale:
Add profile aliases for OpenShift versioned profiles #11241
Review Hints:
extends
to any profile and remove the wholeselections
key.