From f16eda89ddbeca8ba36e10db28aa56ac1a3e79a2 Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Mon, 16 Mar 2020 13:49:17 +0100 Subject: [PATCH] Ensure defaults match spec Change-Id: Ie5c499d7e035a0e9c3ac32e5dc5d57151c1745ed --- plugins/modules/os_image.py | 2 +- plugins/modules/os_server.py | 16 ++++++++++------ plugins/modules/os_stack.py | 2 +- tests/sanity/ignore-2.10.txt | 4 ---- tests/sanity/ignore-2.9.txt | 6 ------ 5 files changed, 12 insertions(+), 18 deletions(-) diff --git a/plugins/modules/os_image.py b/plugins/modules/os_image.py index cd6ea116..a363fc9e 100644 --- a/plugins/modules/os_image.py +++ b/plugins/modules/os_image.py @@ -59,7 +59,7 @@ options: description: - Whether the image can be accessed publicly. Note that publicizing an image requires admin role by default. type: bool - default: 'yes' + default: false protected: description: - Prevent image from being deleted diff --git a/plugins/modules/os_server.py b/plugins/modules/os_server.py index 77d6c4c6..65df6ce3 100644 --- a/plugins/modules/os_server.py +++ b/plugins/modules/os_server.py @@ -38,19 +38,22 @@ options: - Text to use to filter image names, for the case, such as HP, where there are multiple image names matching the common identifying portions. image_exclude is a negative match filter - it is text that - may not exist in the image name. Defaults to "(deprecated)" + may not exist in the image name. type: str + default: "(deprecated)" flavor: description: - The name or id of the flavor in which the new instance has to be - created. Mutually exclusive with flavor_ram - default: 1 + created. + - Exactly one of I(flavor) and I(flavor_ram) must be defined when + I(state=present). type: str flavor_ram: description: - The minimum amount of ram in MB that the flavor in which the new - instance has to be created must have. Mutually exclusive with flavor. - default: 1 + instance has to be created must have. + - Exactly one of I(flavor) and I(flavor_ram) must be defined when + I(state=present). type: int flavor_include: description: @@ -68,6 +71,7 @@ options: - Names of the security groups to which the instance should be added. This may be a YAML list or a comma separated string. type: list + default: ['default'] network: description: - Name or ID of a network to attach this instance to. A simpler @@ -633,7 +637,7 @@ class ServerModule(OpenStackModule): auto_ip=dict(default=True, type='bool', aliases=['auto_floating_ip', 'public_ip']), floating_ips=dict(default=None, type='list'), floating_ip_pools=dict(default=None, type='list'), - volume_size=dict(default=False, type='int'), + volume_size=dict(default=None, type='int'), boot_from_volume=dict(default=False, type='bool'), boot_volume=dict(default=None, aliases=['root_volume']), terminate_volume=dict(default=False, type='bool'), diff --git a/plugins/modules/os_stack.py b/plugins/modules/os_stack.py index 1dc027f6..122c9128 100644 --- a/plugins/modules/os_stack.py +++ b/plugins/modules/os_stack.py @@ -52,7 +52,7 @@ options: description: - Rollback stack creation type: bool - default: 'yes' + default: false timeout: description: - Maximum number of seconds to wait for the stack creation diff --git a/tests/sanity/ignore-2.10.txt b/tests/sanity/ignore-2.10.txt index a779d82a..d73b61fe 100644 --- a/tests/sanity/ignore-2.10.txt +++ b/tests/sanity/ignore-2.10.txt @@ -1,13 +1,9 @@ plugins/module_utils/openstack.py future-import-boilerplate plugins/module_utils/openstack.py metaclass-boilerplate plugins/modules/os_image.py validate-modules:doc-choices-do-not-match-spec -plugins/modules/os_image.py validate-modules:doc-default-does-not-match-spec plugins/modules/os_ironic.py validate-modules:doc-choices-do-not-match-spec plugins/modules/os_quota.py validate-modules:doc-choices-do-not-match-spec plugins/modules/os_quota.py validate-modules:return-syntax-error -plugins/modules/os_server.py validate-modules:doc-default-does-not-match-spec -plugins/modules/os_server_action.py validate-modules:doc-default-does-not-match-spec -plugins/modules/os_stack.py validate-modules:doc-default-does-not-match-spec plugins/modules/os_subnet.py validate-modules:doc-choices-do-not-match-spec plugins/doc_fragments/openstack.py future-import-boilerplate plugins/doc_fragments/openstack.py metaclass-boilerplate diff --git a/tests/sanity/ignore-2.9.txt b/tests/sanity/ignore-2.9.txt index 98086807..2173dd45 100644 --- a/tests/sanity/ignore-2.9.txt +++ b/tests/sanity/ignore-2.9.txt @@ -1,16 +1,10 @@ plugins/module_utils/openstack.py future-import-boilerplate plugins/module_utils/openstack.py metaclass-boilerplate -plugins/modules/os_flavor_info.py validate-modules:doc-default-does-not-match-spec plugins/modules/os_image.py validate-modules:doc-choices-do-not-match-spec -plugins/modules/os_image.py validate-modules:doc-default-does-not-match-spec plugins/modules/os_ironic.py validate-modules:doc-choices-do-not-match-spec plugins/modules/os_ironic_node.py validate-modules:doc-choices-do-not-match-spec -plugins/modules/os_ironic_node.py validate-modules:doc-default-does-not-match-spec plugins/modules/os_quota.py validate-modules:doc-choices-do-not-match-spec plugins/modules/os_quota.py validate-modules:return-syntax-error -plugins/modules/os_server.py validate-modules:doc-default-does-not-match-spec -plugins/modules/os_server_action.py validate-modules:doc-default-does-not-match-spec -plugins/modules/os_stack.py validate-modules:doc-default-does-not-match-spec plugins/modules/os_subnet.py validate-modules:doc-choices-do-not-match-spec plugins/doc_fragments/openstack.py future-import-boilerplate plugins/doc_fragments/openstack.py metaclass-boilerplate