-
Notifications
You must be signed in to change notification settings - Fork 184
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
feat: new spec and parser for /etc/sudoers #3425
Conversation
from insights.parsers.sudoers import EtcSudoers | ||
|
||
|
||
@combiner(EtcSudoers) |
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.
@xiangce Generally we develop combiner out of two or more components. Is there are special requirement because of which you decide to create a combiner out of EtcSudoers
parser alone?
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.
Besides the code of get()
& last()
in the combiner as well as the parser is redundant.
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 EtcSudoers
is against a multi_output=Ture
spec, which results in the parser result being a list. This combiner is going to combine the result.
For the 2 functions, I created a base class and removed the duplicates. Please have a look again.
* New spec and parser for /etc/sudoers Signed-off-by: Xiangce Liu <[email protected]> * feat: New spec and parser for /etc/sudoers Signed-off-by: Xiangce Liu <[email protected]> * fix combiner to check the '#includedir' directive Signed-off-by: Xiangce Liu <[email protected]> * single test func Signed-off-by: Xiangce Liu <[email protected]> * add note for #inlcudedir Signed-off-by: Xiangce Liu <[email protected]> * add the missed multi_output=True Signed-off-by: Xiangce Liu <[email protected]> * add a base class Signed-off-by: Xiangce Liu <[email protected]> * add note to the combiner for the base class Signed-off-by: Xiangce Liu <[email protected]> * refine the doc Signed-off-by: Xiangce Liu <[email protected]> (cherry picked from commit b90b141)
* New spec and parser for /etc/sudoers Signed-off-by: Xiangce Liu <[email protected]> * feat: New spec and parser for /etc/sudoers Signed-off-by: Xiangce Liu <[email protected]> * fix combiner to check the '#includedir' directive Signed-off-by: Xiangce Liu <[email protected]> * single test func Signed-off-by: Xiangce Liu <[email protected]> * add note for #inlcudedir Signed-off-by: Xiangce Liu <[email protected]> * add the missed multi_output=True Signed-off-by: Xiangce Liu <[email protected]> * add a base class Signed-off-by: Xiangce Liu <[email protected]> * add note to the combiner for the base class Signed-off-by: Xiangce Liu <[email protected]> * refine the doc Signed-off-by: Xiangce Liu <[email protected]>
All Pull Requests:
Check all that apply:
Complete Description of Additions/Changes:
Add your description here