diff --git a/lib/ansible/module_utils/cloudscale.py b/lib/ansible/module_utils/cloudscale.py index ef4eb1c5dc5..01f72bd21f2 100644 --- a/lib/ansible/module_utils/cloudscale.py +++ b/lib/ansible/module_utils/cloudscale.py @@ -18,7 +18,8 @@ def cloudscale_argument_spec(): return dict( api_token=dict(fallback=(env_fallback, ['CLOUDSCALE_API_TOKEN']), no_log=True, - required=True), + required=True, + type='str'), api_timeout=dict(default=30, type='int'), ) diff --git a/lib/ansible/modules/cloud/cloudscale/cloudscale_server.py b/lib/ansible/modules/cloud/cloudscale/cloudscale_server.py index bf3429b3a4d..22f8f0bef08 100644 --- a/lib/ansible/modules/cloud/cloudscale/cloudscale_server.py +++ b/lib/ansible/modules/cloud/cloudscale/cloudscale_server.py @@ -54,6 +54,7 @@ options: image: description: - Image used to create the server. + type: str volume_size_gb: description: - Size of the root volume in GB. diff --git a/lib/ansible/plugins/doc_fragments/cloudscale.py b/lib/ansible/plugins/doc_fragments/cloudscale.py index 2e953549d8a..c7c58819bd7 100644 --- a/lib/ansible/plugins/doc_fragments/cloudscale.py +++ b/lib/ansible/plugins/doc_fragments/cloudscale.py @@ -2,6 +2,9 @@ # Copyright (c) 2019, René Moser # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +from __future__ import absolute_import, division, print_function +__metaclass__ = type + class ModuleDocFragment(object): @@ -12,10 +15,12 @@ options: description: - cloudscale.ch API token. - This can also be passed in the C(CLOUDSCALE_API_TOKEN) environment variable. + type: str api_timeout: description: - Timeout in seconds for calls to the cloudscale.ch API. default: 30 + type: int notes: - Instead of the api_token parameter the C(CLOUDSCALE_API_TOKEN) environment variable can be used. - All operations are performed using the cloudscale.ch public API v1. diff --git a/test/integration/targets/inventory_cloudscale/filter_plugins/group_name.py b/test/integration/targets/inventory_cloudscale/filter_plugins/group_name.py index 42e39b21df8..faddb23882e 100644 --- a/test/integration/targets/inventory_cloudscale/filter_plugins/group_name.py +++ b/test/integration/targets/inventory_cloudscale/filter_plugins/group_name.py @@ -1,3 +1,6 @@ +from __future__ import absolute_import, division, print_function +__metaclass__ = type + from ansible.inventory.group import to_safe_group_name diff --git a/test/sanity/ignore.txt b/test/sanity/ignore.txt index 51f0b8ad43a..799a92b8121 100644 --- a/test/sanity/ignore.txt +++ b/test/sanity/ignore.txt @@ -1266,14 +1266,6 @@ lib/ansible/modules/cloud/centurylink/clc_server.py validate-modules:doc-missing lib/ansible/modules/cloud/centurylink/clc_server_snapshot.py validate-modules:implied-parameter-type-mismatch lib/ansible/modules/cloud/centurylink/clc_server_snapshot.py validate-modules:parameter-type-not-in-doc lib/ansible/modules/cloud/centurylink/clc_server_snapshot.py validate-modules:doc-missing-type -lib/ansible/modules/cloud/cloudscale/cloudscale_floating_ip.py validate-modules:parameter-type-not-in-doc -lib/ansible/modules/cloud/cloudscale/cloudscale_floating_ip.py validate-modules:doc-missing-type -lib/ansible/modules/cloud/cloudscale/cloudscale_server.py validate-modules:parameter-type-not-in-doc -lib/ansible/modules/cloud/cloudscale/cloudscale_server.py validate-modules:doc-missing-type -lib/ansible/modules/cloud/cloudscale/cloudscale_server_group.py validate-modules:parameter-type-not-in-doc -lib/ansible/modules/cloud/cloudscale/cloudscale_server_group.py validate-modules:doc-missing-type -lib/ansible/modules/cloud/cloudscale/cloudscale_volume.py validate-modules:parameter-type-not-in-doc -lib/ansible/modules/cloud/cloudscale/cloudscale_volume.py validate-modules:doc-missing-type lib/ansible/modules/cloud/cloudstack/cs_account.py future-import-boilerplate lib/ansible/modules/cloud/cloudstack/cs_account.py metaclass-boilerplate lib/ansible/modules/cloud/cloudstack/cs_affinitygroup.py future-import-boilerplate @@ -5752,8 +5744,6 @@ lib/ansible/plugins/doc_fragments/checkpoint_commands.py future-import-boilerpla lib/ansible/plugins/doc_fragments/checkpoint_commands.py metaclass-boilerplate lib/ansible/plugins/doc_fragments/checkpoint_objects.py future-import-boilerplate lib/ansible/plugins/doc_fragments/checkpoint_objects.py metaclass-boilerplate -lib/ansible/plugins/doc_fragments/cloudscale.py future-import-boilerplate -lib/ansible/plugins/doc_fragments/cloudscale.py metaclass-boilerplate lib/ansible/plugins/doc_fragments/cloudstack.py future-import-boilerplate lib/ansible/plugins/doc_fragments/cloudstack.py metaclass-boilerplate lib/ansible/plugins/doc_fragments/cnos.py future-import-boilerplate @@ -5986,8 +5976,6 @@ test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py f test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py metaclass-boilerplate test/integration/targets/inventory_aws_conformance/lib/boto/session.py future-import-boilerplate test/integration/targets/inventory_aws_conformance/lib/boto/session.py metaclass-boilerplate -test/integration/targets/inventory_cloudscale/filter_plugins/group_name.py future-import-boilerplate -test/integration/targets/inventory_cloudscale/filter_plugins/group_name.py metaclass-boilerplate test/integration/targets/inventory_kubevirt_conformance/inventory_diff.py future-import-boilerplate test/integration/targets/inventory_kubevirt_conformance/inventory_diff.py metaclass-boilerplate test/integration/targets/inventory_kubevirt_conformance/server.py future-import-boilerplate