dell / ansible-vxrail

Apache License 2.0
23 stars 9 forks source link

dellemc_vxrail_getclusterinfo documents wrong module in examples #25

Closed lglussen closed 5 months ago

lglussen commented 5 months ago

The Examples section for the dellemc_vxrail_getclusterinfo module uses an old module name: It looks like the name was updated from *_clusterinfo to *_getclusterinfo back in 1.4.0 image

The old name seems to only persist in the one example section.

I did a light test of all the module names against the documentation and there may be a few other modules that might need some cleanup. There were a few that did not appear in any markdown (only in docs/samples yaml) and a few that did appear in markdown but didn't seem to make a valid appearance in the Examples section (as is the case with the dellemc_vxrail_getclusterinfo module because the old module name was still being used).

function module_names {  ls -1  plugins/modules/ | grep -oE '^dellemc[a-z0-9_]*';  }
function not_in_docs    {  ! `grep -qRl "${1}"  ${3:-docs} --include="*${2}"`; }
function not_in_markdown { not_in_docs $1 ".md"; }
function not_in_markdown_examples { not_in_docs "${1}:" ".md"; }
function not_in_samples { not_in_docs $1 ".ya?ml" "docs/samples"; }

for module in `module_names`; do
   if `not_in_docs $module`; then
       echo "[MISSING FROM DOCS]  $module"
   else
       if `not_in_markdown $module`; then
           echo "[MISSING FROM MARKDOWN]  $module"
       elif `not_in_markdown_examples $module`; then
           echo "[MISSING MARKDOWN EXAMPLES] $module"
       fi
       ## lots of output if we are checking the samples yaml
       #if  `not_in_samples $module`; then
       #    echo "[MISSING FROM DOCS/SAMPLES] $module"
       #fi
   fi
done     

Results in the output:

[MISSING FROM MARKDOWN]  dellemc_vxrail_certificates_importcertsintotruststore
[MISSING FROM MARKDOWN]  dellemc_vxrail_cluster_expansion_cancel
[MISSING MARKDOWN EXAMPLES] dellemc_vxrail_cvs_compliance_report
[MISSING MARKDOWN EXAMPLES] dellemc_vxrail_getclusterinfo
[MISSING MARKDOWN EXAMPLES] dellemc_vxrail_idrac_adduser
[MISSING FROM MARKDOWN]  dellemc_vxrail_sequential_reboot_cancel
[MISSING FROM MARKDOWN]  dellemc_vxrail_sequential_reboot_retry
[MISSING MARKDOWN EXAMPLES] dellemc_vxrail_support_getaccount
lglussen commented 5 months ago

https://github.com/dell/ansible-vxrail/pull/26