From 7f890c46456512a1715d1b967ba58f4c71b2fd8f Mon Sep 17 00:00:00 2001
From: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Date: Fri, 27 Nov 2020 00:27:37 +1300
Subject: [PATCH] Tidy up validate-modules nonexistent-parameter-documented
 (#1389)

* fixed validation-modules for plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py

* fixed validation-modules for plugins/modules/cloud/univention/udm_share.py

* fixed validation-modules for plugins/modules/net_tools/nios/nios_host_record.py

* fixed validation-modules for plugins/modules/storage/zfs/zfs_facts.py

* fixed validation-modules for plugins/modules/storage/zfs/zpool_facts.py

* Tidy up validate-modules ignores nonexistent-parameter-documented

* Adjustments per the PR

* Removed no longer needed ignore line for udm_share.py
---
 .../modules/cloud/spotinst/spotinst_aws_elastigroup.py |  7 -------
 plugins/modules/cloud/univention/udm_share.py          | 10 +++++-----
 plugins/modules/net_tools/nios/nios_host_record.py     |  2 --
 plugins/modules/storage/zfs/zfs_facts.py               |  1 -
 plugins/modules/storage/zfs/zpool_facts.py             |  1 -
 tests/sanity/ignore-2.10.txt                           |  6 ------
 tests/sanity/ignore-2.11.txt                           |  6 ------
 tests/sanity/ignore-2.9.txt                            |  6 ------
 8 files changed, 5 insertions(+), 34 deletions(-)

diff --git a/plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py b/plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py
index bffecd8903..d7cc7c1e2e 100644
--- a/plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py
+++ b/plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py
@@ -144,13 +144,6 @@ options:
         This will not work unless the uniqueness_by field is set to id.
         When this is set, and the uniqueness_by field is set, the group will either be updated or deleted, but not created.
 
-  ignore_changes:
-    choices:
-      - image_id
-      - target
-    description:
-      - (List of Strings) list of fields on which changes should be ignored when updating
-
   image_id:
     description:
       - (String) The image Id used to launch the instance.;
diff --git a/plugins/modules/cloud/univention/udm_share.py b/plugins/modules/cloud/univention/udm_share.py
index bcd6918634..25a6520cc3 100644
--- a/plugins/modules/cloud/univention/udm_share.py
+++ b/plugins/modules/cloud/univention/udm_share.py
@@ -90,12 +90,12 @@ options:
         description:
             - Blocking locks.
         aliases: [ sambaBlockingLocks ]
-    samba_browseable:
-        default: '1'
-        choices: [ '0', '1' ]
+    sambaBrowseable:
         description:
-            - Show in Windows network environment.
-        aliases: [ sambaBrowseable ]
+        - Show in Windows network environment.
+        type: bool
+        default: True
+        aliases: [ samba_browsable ]
     samba_create_mode:
         default: '0744'
         description:
diff --git a/plugins/modules/net_tools/nios/nios_host_record.py b/plugins/modules/net_tools/nios/nios_host_record.py
index dc22ec4f59..d523ed1354 100644
--- a/plugins/modules/net_tools/nios/nios_host_record.py
+++ b/plugins/modules/net_tools/nios/nios_host_record.py
@@ -107,8 +107,6 @@ options:
           - Configure the host_record over DHCP instead of DNS, if user
             changes it to true, user need to mention MAC address to configure
         required: false
-        aliases:
-          - dhcp
   aliases:
     description:
       - Configures an optional list of additional aliases to add to the host
diff --git a/plugins/modules/storage/zfs/zfs_facts.py b/plugins/modules/storage/zfs/zfs_facts.py
index 090c18368a..e7719f688f 100644
--- a/plugins/modules/storage/zfs/zfs_facts.py
+++ b/plugins/modules/storage/zfs/zfs_facts.py
@@ -38,7 +38,6 @@ options:
             - Specifies which dataset properties should be queried in comma-separated format.
               For more information about dataset properties, check zfs(1M) man page.
         default: all
-        aliases: [ "props" ]
     type:
         description:
             - Specifies which datasets types to display. Multiple values have to be
diff --git a/plugins/modules/storage/zfs/zpool_facts.py b/plugins/modules/storage/zfs/zpool_facts.py
index f5eae30c62..728c077902 100644
--- a/plugins/modules/storage/zfs/zpool_facts.py
+++ b/plugins/modules/storage/zfs/zpool_facts.py
@@ -32,7 +32,6 @@ options:
         description:
             - Specifies which dataset properties should be queried in comma-separated format.
               For more information about dataset properties, check zpool(1M) man page.
-        aliases: [ "props" ]
         default: all
         required: false
 '''
diff --git a/tests/sanity/ignore-2.10.txt b/tests/sanity/ignore-2.10.txt
index df094b8ce3..f5a2741b6a 100644
--- a/tests/sanity/ignore-2.10.txt
+++ b/tests/sanity/ignore-2.10.txt
@@ -209,7 +209,6 @@ plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:doc-
 plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:doc-default-does-not-match-spec
 plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:doc-missing-type
 plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:doc-required-mismatch
-plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:nonexistent-parameter-documented
 plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements
 plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc
 plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter
@@ -223,10 +222,8 @@ plugins/modules/cloud/univention/udm_group.py validate-modules:doc-default-does-
 plugins/modules/cloud/univention/udm_group.py validate-modules:parameter-type-not-in-doc
 plugins/modules/cloud/univention/udm_share.py validate-modules:doc-choices-do-not-match-spec
 plugins/modules/cloud/univention/udm_share.py validate-modules:doc-default-does-not-match-spec
-plugins/modules/cloud/univention/udm_share.py validate-modules:nonexistent-parameter-documented
 plugins/modules/cloud/univention/udm_share.py validate-modules:parameter-list-no-elements
 plugins/modules/cloud/univention/udm_share.py validate-modules:parameter-type-not-in-doc
-plugins/modules/cloud/univention/udm_share.py validate-modules:undocumented-parameter
 plugins/modules/cloud/univention/udm_user.py validate-modules:doc-choices-do-not-match-spec
 plugins/modules/cloud/univention/udm_user.py validate-modules:doc-default-does-not-match-spec
 plugins/modules/cloud/univention/udm_user.py validate-modules:parameter-list-no-elements
@@ -369,7 +366,6 @@ plugins/modules/net_tools/nios/nios_host_record.py validate-modules:doc-elements
 plugins/modules/net_tools/nios/nios_host_record.py validate-modules:doc-missing-type
 plugins/modules/net_tools/nios/nios_host_record.py validate-modules:doc-required-mismatch
 plugins/modules/net_tools/nios/nios_host_record.py validate-modules:invalid-ansiblemodule-schema
-plugins/modules/net_tools/nios/nios_host_record.py validate-modules:nonexistent-parameter-documented
 plugins/modules/net_tools/nios/nios_host_record.py validate-modules:parameter-list-no-elements
 plugins/modules/net_tools/nios/nios_host_record.py validate-modules:parameter-type-not-in-doc
 plugins/modules/net_tools/nios/nios_host_record.py validate-modules:undocumented-parameter
@@ -607,9 +603,7 @@ plugins/modules/storage/zfs/zfs.py validate-modules:parameter-type-not-in-doc
 plugins/modules/storage/zfs/zfs_delegate_admin.py validate-modules:doc-required-mismatch
 plugins/modules/storage/zfs/zfs_delegate_admin.py validate-modules:parameter-list-no-elements
 plugins/modules/storage/zfs/zfs_delegate_admin.py validate-modules:parameter-type-not-in-doc
-plugins/modules/storage/zfs/zfs_facts.py validate-modules:nonexistent-parameter-documented
 plugins/modules/storage/zfs/zfs_facts.py validate-modules:parameter-type-not-in-doc
-plugins/modules/storage/zfs/zpool_facts.py validate-modules:nonexistent-parameter-documented
 plugins/modules/storage/zfs/zpool_facts.py validate-modules:parameter-type-not-in-doc
 plugins/modules/system/aix_devices.py validate-modules:doc-required-mismatch
 plugins/modules/system/alternatives.py pylint:blacklisted-name
diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.11.txt
index df094b8ce3..f5a2741b6a 100644
--- a/tests/sanity/ignore-2.11.txt
+++ b/tests/sanity/ignore-2.11.txt
@@ -209,7 +209,6 @@ plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:doc-
 plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:doc-default-does-not-match-spec
 plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:doc-missing-type
 plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:doc-required-mismatch
-plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:nonexistent-parameter-documented
 plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements
 plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc
 plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter
@@ -223,10 +222,8 @@ plugins/modules/cloud/univention/udm_group.py validate-modules:doc-default-does-
 plugins/modules/cloud/univention/udm_group.py validate-modules:parameter-type-not-in-doc
 plugins/modules/cloud/univention/udm_share.py validate-modules:doc-choices-do-not-match-spec
 plugins/modules/cloud/univention/udm_share.py validate-modules:doc-default-does-not-match-spec
-plugins/modules/cloud/univention/udm_share.py validate-modules:nonexistent-parameter-documented
 plugins/modules/cloud/univention/udm_share.py validate-modules:parameter-list-no-elements
 plugins/modules/cloud/univention/udm_share.py validate-modules:parameter-type-not-in-doc
-plugins/modules/cloud/univention/udm_share.py validate-modules:undocumented-parameter
 plugins/modules/cloud/univention/udm_user.py validate-modules:doc-choices-do-not-match-spec
 plugins/modules/cloud/univention/udm_user.py validate-modules:doc-default-does-not-match-spec
 plugins/modules/cloud/univention/udm_user.py validate-modules:parameter-list-no-elements
@@ -369,7 +366,6 @@ plugins/modules/net_tools/nios/nios_host_record.py validate-modules:doc-elements
 plugins/modules/net_tools/nios/nios_host_record.py validate-modules:doc-missing-type
 plugins/modules/net_tools/nios/nios_host_record.py validate-modules:doc-required-mismatch
 plugins/modules/net_tools/nios/nios_host_record.py validate-modules:invalid-ansiblemodule-schema
-plugins/modules/net_tools/nios/nios_host_record.py validate-modules:nonexistent-parameter-documented
 plugins/modules/net_tools/nios/nios_host_record.py validate-modules:parameter-list-no-elements
 plugins/modules/net_tools/nios/nios_host_record.py validate-modules:parameter-type-not-in-doc
 plugins/modules/net_tools/nios/nios_host_record.py validate-modules:undocumented-parameter
@@ -607,9 +603,7 @@ plugins/modules/storage/zfs/zfs.py validate-modules:parameter-type-not-in-doc
 plugins/modules/storage/zfs/zfs_delegate_admin.py validate-modules:doc-required-mismatch
 plugins/modules/storage/zfs/zfs_delegate_admin.py validate-modules:parameter-list-no-elements
 plugins/modules/storage/zfs/zfs_delegate_admin.py validate-modules:parameter-type-not-in-doc
-plugins/modules/storage/zfs/zfs_facts.py validate-modules:nonexistent-parameter-documented
 plugins/modules/storage/zfs/zfs_facts.py validate-modules:parameter-type-not-in-doc
-plugins/modules/storage/zfs/zpool_facts.py validate-modules:nonexistent-parameter-documented
 plugins/modules/storage/zfs/zpool_facts.py validate-modules:parameter-type-not-in-doc
 plugins/modules/system/aix_devices.py validate-modules:doc-required-mismatch
 plugins/modules/system/alternatives.py pylint:blacklisted-name
diff --git a/tests/sanity/ignore-2.9.txt b/tests/sanity/ignore-2.9.txt
index 48a7662645..9b8ecf3f6b 100644
--- a/tests/sanity/ignore-2.9.txt
+++ b/tests/sanity/ignore-2.9.txt
@@ -182,7 +182,6 @@ plugins/modules/cloud/smartos/vmadm.py validate-modules:undocumented-parameter
 plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:doc-choices-do-not-match-spec
 plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:doc-default-does-not-match-spec
 plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:doc-missing-type
-plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:nonexistent-parameter-documented
 plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc
 plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:undocumented-parameter
 plugins/modules/cloud/univention/udm_dns_record.py validate-modules:doc-choices-do-not-match-spec
@@ -194,9 +193,7 @@ plugins/modules/cloud/univention/udm_group.py validate-modules:doc-default-does-
 plugins/modules/cloud/univention/udm_group.py validate-modules:parameter-type-not-in-doc
 plugins/modules/cloud/univention/udm_share.py validate-modules:doc-choices-do-not-match-spec
 plugins/modules/cloud/univention/udm_share.py validate-modules:doc-default-does-not-match-spec
-plugins/modules/cloud/univention/udm_share.py validate-modules:nonexistent-parameter-documented
 plugins/modules/cloud/univention/udm_share.py validate-modules:parameter-type-not-in-doc
-plugins/modules/cloud/univention/udm_share.py validate-modules:undocumented-parameter
 plugins/modules/cloud/univention/udm_user.py validate-modules:doc-choices-do-not-match-spec
 plugins/modules/cloud/univention/udm_user.py validate-modules:doc-default-does-not-match-spec
 plugins/modules/cloud/univention/udm_user.py validate-modules:parameter-type-not-in-doc
@@ -288,7 +285,6 @@ plugins/modules/net_tools/nios/nios_fixed_address.py validate-modules:parameter-
 plugins/modules/net_tools/nios/nios_fixed_address.py validate-modules:undocumented-parameter
 plugins/modules/net_tools/nios/nios_host_record.py validate-modules:doc-default-does-not-match-spec
 plugins/modules/net_tools/nios/nios_host_record.py validate-modules:doc-missing-type
-plugins/modules/net_tools/nios/nios_host_record.py validate-modules:nonexistent-parameter-documented
 plugins/modules/net_tools/nios/nios_host_record.py validate-modules:parameter-type-not-in-doc
 plugins/modules/net_tools/nios/nios_host_record.py validate-modules:undocumented-parameter
 plugins/modules/net_tools/nios/nios_member.py validate-modules:doc-default-does-not-match-spec
@@ -445,9 +441,7 @@ plugins/modules/storage/purestorage/purefb_facts.py validate-modules:invalid-doc
 plugins/modules/storage/purestorage/purefb_facts.py validate-modules:return-syntax-error
 plugins/modules/storage/zfs/zfs.py validate-modules:parameter-type-not-in-doc
 plugins/modules/storage/zfs/zfs_delegate_admin.py validate-modules:parameter-type-not-in-doc
-plugins/modules/storage/zfs/zfs_facts.py validate-modules:nonexistent-parameter-documented
 plugins/modules/storage/zfs/zfs_facts.py validate-modules:parameter-type-not-in-doc
-plugins/modules/storage/zfs/zpool_facts.py validate-modules:nonexistent-parameter-documented
 plugins/modules/storage/zfs/zpool_facts.py validate-modules:parameter-type-not-in-doc
 plugins/modules/system/alternatives.py pylint:blacklisted-name
 plugins/modules/system/beadm.py pylint:blacklisted-name