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

Fixes #17464: Improve Augeas generic methods documentation #1200

Conversation

ikramBej
Copy link
Contributor

Copy link
Member

@amousset amousset left a comment

Choose a reason for hiding this comment

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

Only small formatting fixes

# This method gives the possibilty to enter a list of augtool commands and options as a parameter. The method has in total 4 parameters: variable_prefix, variable_name, commands and autoload.
# Augtool provides bunch of other commands and options that you can use in this generic method such as 'match' to print the matches for a specific
# path expression, 'span' to print position in input file corresponding to tree, 'retrieve' to transform tree into text and 'save' to save all pending changes.
# If the Augeas isn't installed on the agent, it will produces an error.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# If the Augeas isn't installed on the agent, it will produces an error.
# If Augeas isn't installed on the agent, it will produces an error.

# accordingly charge all files and lenses before executing the commands you have specified. Below is an example that will shows as a result the configuration
# files that are parsed by default in '/files/etc' directory and then also print the content of the 'sshd_config' file, you can either leave the 'autoload'
# parameter empty or fill it by putting 'true' as a value.
# file_augeas_commands("label","value","ls /files/etc \n print /files/etc/ssh/sshd_config","")
Copy link
Member

Choose a reason for hiding this comment

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

This is formatted as markdown so it should be something like:

# 
# ```
# file_augeas_commands("label","value","ls /files/etc \n print /files/etc/ssh/sshd_config","")
# file_augeas_commands("label","value","ls /files/etc \n print /files/etc/ssh/sshd_config","true")
# ```

To have proper code formatting

# # Use case 2:
# The second case is when you deactivate that option which means that you are specifying ‘false’ as parameter and in this case you have to
# charge manually your files and lenses in the commands parameter by using the set commands. Below is the second example where you can for example set
# the lens and the file then verifying by checking the '/augeas/load' path.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# the lens and the file then verifying by checking the '/augeas/load' path.
# the lens and the file then verifying by checking the `/augeas/load` path.

for markdown formatting

# The particular thing you may want to do with this method is using it depending on you needs and in actually two cases.
#
# # Use case 1:
# The first case includes activating the ‘autoload’ option, it is ‘true’ by default, means you can leave the ‘autoload’ parameter's field empty and Augeas will
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# The first case includes activating the autoload option, it is true by default, means you can leave the autoload parameter's field empty and Augeas will
# The first case includes activating the `autoload` option, it is `true` by default, means you can leave the `autoload` parameter's field empty and Augeas will

for markdown formatting, these are backticks and not normal quotes

@Normation-Quality-Assistant
Copy link
Contributor

OK, merging this PR

@Normation-Quality-Assistant Normation-Quality-Assistant merged commit 31727bf into Normation:branches/rudder/6.1 May 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants