-
Notifications
You must be signed in to change notification settings - Fork 22
(CAT-1731) improve handling of pinned nodes #80
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
(CAT-1731) improve handling of pinned nodes #80
Conversation
@timidri I believe this is correct and complete. I put it up against your branch as I think we would like to merge the whole thing as one package? |
Within the Puppet Enterprise UI console the concept of pinned nodes allows more complex rules to be expressed while including pinned nodes. Pinned nodes are formed by having a top level "or" clause, with expressions in the form `['=', 'name', 'hostname']` Prior to this change, the code would not properly maintain pinned nodes, nor correctly handle merging expressions like: ``` ['and', ['~', ['fact', 'pe_server_version'], '.+']] ``` with ``` ['or', ['~', ['trusted', 'extensions', '1.3.6.1.4.1.34380.1.1.9812'], '^puppet/']] ``` Incorrectly combining them into an `and` clause when logically they should be an "or" clause. With this change, pinned nodes are separated our from the other rules and then recombined later (if they are present) with a top-level "or" clause. Test are added to demonstrate the behaviors.
0a6af59
to
7456c65
Compare
|
@jonathannewman Yes, thank you, that seems the easiest way forward to me. |
Going to merge into Dimitri's branch and open a PR from that branch. |
e1eb4de
into
puppetlabs:CAT-1731-add-rules-tests
Within the Puppet Enterprise UI console the concept of pinned nodes allows more complex rules to be expressed while including pinned nodes.
Pinned nodes are formed by having a top level "or" clause, with expressions in the form
['=', 'name', 'hostname']
Prior to this change, the code would not properly maintain pinned nodes, nor correctly handle merging expressions like:
with
Incorrectly combining them into an
and
clause when logically they should be an "or" clause.With this change, pinned nodes are separated our from the other rules and then recombined later (if they are present) with a top-level "or" clause.
Test are added to demonstrate the behaviors.
Summary
Provide a detailed description of all the changes present in this pull request.
Additional Context
Add any additional context about the problem here.
Related Issues (if any)
Mention any related issues or pull requests.
Checklist
puppet apply
)