diff --git a/changelogs/fragments/2006-valmod-batch8.yml b/changelogs/fragments/2006-valmod-batch8.yml new file mode 100644 index 00000000000..30be5e16b2a --- /dev/null +++ b/changelogs/fragments/2006-valmod-batch8.yml @@ -0,0 +1,4 @@ +minor_changes: + - rax - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/2006). + - rax_cdb_user - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/2006). + - rax_scaling_group - elements of list parameters are now validated (https://github.com/ansible-collections/community.general/pull/2006). diff --git a/plugins/modules/cloud/rackspace/rax.py b/plugins/modules/cloud/rackspace/rax.py index 9f7df5c45b0..d2d9119b027 100644 --- a/plugins/modules/cloud/rackspace/rax.py +++ b/plugins/modules/cloud/rackspace/rax.py @@ -110,6 +110,7 @@ with this image instance_ids: type: list + elements: str description: - list of instance ids, currently only used when state='absent' to remove instances @@ -129,6 +130,7 @@ - Name to give the instance networks: type: list + elements: str description: - The network to attach to the instances. If specified, you must include ALL networks including the public and private interfaces. Can be C(id) @@ -810,11 +812,11 @@ def main(): flavor=dict(), group=dict(), image=dict(), - instance_ids=dict(type='list'), + instance_ids=dict(type='list', elements='str'), key_name=dict(aliases=['keypair']), meta=dict(type='dict', default={}), name=dict(), - networks=dict(type='list', default=['public', 'private']), + networks=dict(type='list', elements='str', default=['public', 'private']), service=dict(), state=dict(default='present', choices=['present', 'absent']), user_data=dict(no_log=True), diff --git a/plugins/modules/cloud/rackspace/rax_cdb_user.py b/plugins/modules/cloud/rackspace/rax_cdb_user.py index 34be49d8628..2034170f423 100644 --- a/plugins/modules/cloud/rackspace/rax_cdb_user.py +++ b/plugins/modules/cloud/rackspace/rax_cdb_user.py @@ -30,6 +30,7 @@ required: yes databases: type: list + elements: str description: - Name of the databases that the user can access default: [] @@ -189,7 +190,7 @@ def main(): cdb_id=dict(type='str', required=True), db_username=dict(type='str', required=True), db_password=dict(type='str', required=True, no_log=True), - databases=dict(type='list', default=[]), + databases=dict(type='list', elements='str', default=[]), host=dict(type='str', default='%'), state=dict(default='present', choices=['present', 'absent']) ) diff --git a/plugins/modules/cloud/rackspace/rax_scaling_group.py b/plugins/modules/cloud/rackspace/rax_scaling_group.py index 7b2b6ace79b..2f8fa0a2cc9 100644 --- a/plugins/modules/cloud/rackspace/rax_scaling_group.py +++ b/plugins/modules/cloud/rackspace/rax_scaling_group.py @@ -53,6 +53,7 @@ - key pair to use on the instance loadbalancers: type: list + elements: dict description: - List of load balancer C(id) and C(port) hashes max_entities: @@ -78,6 +79,7 @@ required: true networks: type: list + elements: str description: - The network to attach to the instances. If specified, you must include ALL networks including the public and private interfaces. Can be C(id) @@ -376,12 +378,12 @@ def main(): flavor=dict(required=True), image=dict(required=True), key_name=dict(), - loadbalancers=dict(type='list'), + loadbalancers=dict(type='list', elements='dict'), meta=dict(type='dict', default={}), min_entities=dict(type='int', required=True), max_entities=dict(type='int', required=True), name=dict(required=True), - networks=dict(type='list', default=['public', 'private']), + networks=dict(type='list', elements='str', default=['public', 'private']), server_name=dict(required=True), state=dict(default='present', choices=['present', 'absent']), user_data=dict(no_log=True), diff --git a/plugins/modules/cloud/smartos/smartos_image_info.py b/plugins/modules/cloud/smartos/smartos_image_info.py index 17761af8a5e..473d345ad89 100644 --- a/plugins/modules/cloud/smartos/smartos_image_info.py +++ b/plugins/modules/cloud/smartos/smartos_image_info.py @@ -24,6 +24,7 @@ manifest and 'published_date', 'published', 'source', 'clones', and 'size'. More information can be found at U(https://smartos.org/man/1m/imgadm) under 'imgadm list'. + type: str ''' EXAMPLES = ''' diff --git a/tests/sanity/ignore-2.10.txt b/tests/sanity/ignore-2.10.txt index fa9d970668b..112f7b9d09d 100644 --- a/tests/sanity/ignore-2.10.txt +++ b/tests/sanity/ignore-2.10.txt @@ -65,14 +65,11 @@ plugins/modules/cloud/ovirt/ovirt_vmpool_facts.py validate-modules:doc-missing-t plugins/modules/cloud/ovirt/ovirt_vmpool_facts.py validate-modules:parameter-list-no-elements plugins/modules/cloud/rackspace/rax.py use-argspec-type-path # fix needed plugins/modules/cloud/rackspace/rax.py validate-modules:doc-missing-type -plugins/modules/cloud/rackspace/rax.py validate-modules:parameter-list-no-elements plugins/modules/cloud/rackspace/rax.py validate-modules:undocumented-parameter -plugins/modules/cloud/rackspace/rax_cdb_user.py validate-modules:parameter-list-no-elements plugins/modules/cloud/rackspace/rax_files.py validate-modules:parameter-state-invalid-choice plugins/modules/cloud/rackspace/rax_files_objects.py use-argspec-type-path plugins/modules/cloud/rackspace/rax_mon_notification_plan.py validate-modules:parameter-list-no-elements -plugins/modules/cloud/rackspace/rax_scaling_group.py use-argspec-type-path # fix needed -plugins/modules/cloud/rackspace/rax_scaling_group.py validate-modules:parameter-list-no-elements +plugins/modules/cloud/rackspace/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values plugins/modules/cloud/scaleway/scaleway_image_facts.py validate-modules:return-syntax-error plugins/modules/cloud/scaleway/scaleway_image_info.py validate-modules:return-syntax-error plugins/modules/cloud/scaleway/scaleway_ip_facts.py validate-modules:return-syntax-error @@ -87,7 +84,6 @@ plugins/modules/cloud/scaleway/scaleway_snapshot_facts.py validate-modules:retur plugins/modules/cloud/scaleway/scaleway_snapshot_info.py validate-modules:return-syntax-error plugins/modules/cloud/scaleway/scaleway_volume_facts.py validate-modules:return-syntax-error plugins/modules/cloud/scaleway/scaleway_volume_info.py validate-modules:return-syntax-error -plugins/modules/cloud/smartos/smartos_image_info.py validate-modules:doc-missing-type plugins/modules/cloud/smartos/vmadm.py validate-modules:parameter-type-not-in-doc plugins/modules/cloud/smartos/vmadm.py validate-modules:undocumented-parameter plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.11.txt index 3caa6443c4c..9b9054268f0 100644 --- a/tests/sanity/ignore-2.11.txt +++ b/tests/sanity/ignore-2.11.txt @@ -64,14 +64,11 @@ plugins/modules/cloud/ovirt/ovirt_vmpool_facts.py validate-modules:doc-missing-t plugins/modules/cloud/ovirt/ovirt_vmpool_facts.py validate-modules:parameter-list-no-elements plugins/modules/cloud/rackspace/rax.py use-argspec-type-path # fix needed plugins/modules/cloud/rackspace/rax.py validate-modules:doc-missing-type -plugins/modules/cloud/rackspace/rax.py validate-modules:parameter-list-no-elements plugins/modules/cloud/rackspace/rax.py validate-modules:undocumented-parameter -plugins/modules/cloud/rackspace/rax_cdb_user.py validate-modules:parameter-list-no-elements plugins/modules/cloud/rackspace/rax_files.py validate-modules:parameter-state-invalid-choice plugins/modules/cloud/rackspace/rax_files_objects.py use-argspec-type-path plugins/modules/cloud/rackspace/rax_mon_notification_plan.py validate-modules:parameter-list-no-elements -plugins/modules/cloud/rackspace/rax_scaling_group.py use-argspec-type-path # fix needed -plugins/modules/cloud/rackspace/rax_scaling_group.py validate-modules:parameter-list-no-elements +plugins/modules/cloud/rackspace/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values plugins/modules/cloud/scaleway/scaleway_image_facts.py validate-modules:return-syntax-error plugins/modules/cloud/scaleway/scaleway_image_info.py validate-modules:return-syntax-error plugins/modules/cloud/scaleway/scaleway_ip_facts.py validate-modules:return-syntax-error @@ -86,7 +83,6 @@ plugins/modules/cloud/scaleway/scaleway_snapshot_facts.py validate-modules:retur plugins/modules/cloud/scaleway/scaleway_snapshot_info.py validate-modules:return-syntax-error plugins/modules/cloud/scaleway/scaleway_volume_facts.py validate-modules:return-syntax-error plugins/modules/cloud/scaleway/scaleway_volume_info.py validate-modules:return-syntax-error -plugins/modules/cloud/smartos/smartos_image_info.py validate-modules:doc-missing-type plugins/modules/cloud/smartos/vmadm.py validate-modules:parameter-type-not-in-doc plugins/modules/cloud/smartos/vmadm.py validate-modules:undocumented-parameter plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-list-no-elements diff --git a/tests/sanity/ignore-2.9.txt b/tests/sanity/ignore-2.9.txt index 628a1f42463..a3aefc33392 100644 --- a/tests/sanity/ignore-2.9.txt +++ b/tests/sanity/ignore-2.9.txt @@ -97,7 +97,7 @@ plugins/modules/cloud/rackspace/rax.py use-argspec-type-path plugins/modules/cloud/rackspace/rax.py validate-modules:doc-missing-type plugins/modules/cloud/rackspace/rax.py validate-modules:undocumented-parameter plugins/modules/cloud/rackspace/rax_files_objects.py use-argspec-type-path -plugins/modules/cloud/rackspace/rax_scaling_group.py use-argspec-type-path +plugins/modules/cloud/rackspace/rax_scaling_group.py use-argspec-type-path # fix needed, expanduser() applied to dict values plugins/modules/cloud/scaleway/scaleway_image_facts.py validate-modules:deprecation-mismatch plugins/modules/cloud/scaleway/scaleway_image_facts.py validate-modules:invalid-documentation plugins/modules/cloud/scaleway/scaleway_image_facts.py validate-modules:return-syntax-error @@ -126,7 +126,6 @@ plugins/modules/cloud/scaleway/scaleway_volume_facts.py validate-modules:depreca plugins/modules/cloud/scaleway/scaleway_volume_facts.py validate-modules:invalid-documentation plugins/modules/cloud/scaleway/scaleway_volume_facts.py validate-modules:return-syntax-error plugins/modules/cloud/scaleway/scaleway_volume_info.py validate-modules:return-syntax-error -plugins/modules/cloud/smartos/smartos_image_info.py validate-modules:doc-missing-type plugins/modules/cloud/smartos/vmadm.py validate-modules:parameter-type-not-in-doc plugins/modules/cloud/smartos/vmadm.py validate-modules:undocumented-parameter plugins/modules/cloud/spotinst/spotinst_aws_elastigroup.py validate-modules:parameter-type-not-in-doc