-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
x*: adjust docs #9308
x*: adjust docs #9308
Conversation
Hi. Is there a discussion regarding these changes? I'd just like to understand the background. |
Co-authored-by: Felix Fontein <[email protected]>
Hi @bvitnik , there has been no prior discussion, but the main motivation behind this initiative is the fact that the documentation blocks (including EXAMPLES and RETURN) have inconsistencies across the modules, and no mechanism to fix them. The main issues (but not limited to) in the YAML docs are:
As a maintainer of the collection I have been building this tool The library ruamel.yaml is being used to manipulate the YAML content. The result is far from perfect, I have to verify and oft times adjust them, but it beats doing that manually for every single module. If you (or any maintainer of modules) are not happy with the reformatting, I will gladly roll it back, though perhaps keeping some of the corrections in markup, capitalisation and punctuation. Hope that clarifies what's going on. |
- 'Example:' | ||
- ' folder: /folder1/folder2' |
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.
@bvitnik I think this would be better suited for the EXAMPLES block below, but I am not too familiar with xenserver
to be sure of where/how to place it.
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 think it's better to leave it here. It would be hard to spot in the EXAMPLES block. The idea here is to emphasize the format of the value. Not many people know that folders can have arbitrarily deep hierarchy.
Co-authored-by: Felix Fontein <[email protected]>
- Minimal supported version of XenServer is 5.6. | ||
- Module was tested with XenServer 6.5, 7.1, 7.2, 7.6, Citrix Hypervisor 8.0, XCP-ng 7.6 and 8.0. | ||
- 'To acquire XenAPI Python library, just run C(pip install XenAPI) on your Ansible Control Node. The library can also be found inside Citrix | ||
Hypervisor/XenServer SDK (downloadable from Citrix website). Copy the C(XenAPI.py) file from the SDK to your Python site-packages on your Ansible | ||
Control Node to use it. Latest version of the library can also be acquired from GitHub: | ||
U(https://raw.githubusercontent.com/xapi-project/xen-api/master/scripts/examples/python/XenAPI/XenAPI.py)' | ||
- 'If no scheme is specified in C(hostname), module defaults to C(http://) because C(https://) is problematic in most setups. Make sure you | ||
are accessing XenServer host in trusted environment or use C(https://) scheme explicitly.' | ||
- 'To use C(https://) scheme for C(hostname) you have to either import host certificate to your OS certificate store or use O(validate_certs=no) which | ||
requires XenAPI library from XenServer 7.2 SDK or newer and Python 2.7.9 or newer.' | ||
requirements: | ||
- XenAPI | ||
- XenAPI |
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.
@bvitnik also, this block is repeated in all but one of the modules. I would suggest transofrming it into a doc fragment, to make it DRY.
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.
This is a good idea now that I look at it. My initial idea was probably to keep notes specific to the module because there was a plan to implement a slew of other modules that never came into being. Each module was expected to have slightly different notes. Also, the three modules mentioned here were originally a single module and were split into three at later time (copy-paste job). Since there are some updates to be made on the notes anyway, I will consider moving them to doc fragment.
Looks good from my side. @bvitnik do you want to take a closer look as well? |
@russoz Hi. Sorry for the late response. Thanks for sharing the background, much appreciated. While I don't like the proposed indentation style, if it is for a greater good (global consistency), I will not complain :). You are good to go. @felixfontein, we are good to go. |
Backport to stable-9: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply f9bfe4e on top of patchback/backports/stable-9/f9bfe4e4a6838c7a9a7aedde72be32611fcff7f6/pr-9308 Backporting merged PR #9308 into main
🤖 @patchback |
Backport to stable-10: 💚 backport PR created✅ Backport PR branch: Backported as #9342 🤖 @patchback |
* adjust docs * Update plugins/modules/xml.py Co-authored-by: Felix Fontein <[email protected]> * fix capitalisation * add markup to references of the xe command (xenserver) * add missing markup * Update plugins/modules/xml.py Co-authored-by: Felix Fontein <[email protected]> --------- Co-authored-by: Felix Fontein <[email protected]> (cherry picked from commit f9bfe4e)
x*: adjust docs (#9308) * adjust docs * Update plugins/modules/xml.py Co-authored-by: Felix Fontein <[email protected]> * fix capitalisation * add markup to references of the xe command (xenserver) * add missing markup * Update plugins/modules/xml.py Co-authored-by: Felix Fontein <[email protected]> --------- Co-authored-by: Felix Fontein <[email protected]> (cherry picked from commit f9bfe4e) Co-authored-by: Alexei Znamensky <[email protected]>
SUMMARY
Adjust documentation blocks.
ISSUE TYPE
COMPONENT NAME
plugins/modules/xattr.py
plugins/modules/xbps.py
plugins/modules/xcc_redfish_command.py
plugins/modules/xenserver_facts.py
plugins/modules/xenserver_guest.py
plugins/modules/xenserver_guest_info.py
plugins/modules/xenserver_guest_powerstate.py
plugins/modules/xfconf.py
plugins/modules/xfconf_info.py
plugins/modules/xfs_quota.py
plugins/modules/xml.py