Properly documented openstacksdk version requirements

With "extends_documentation_fragment: ['openstack.cloud.openstack']"
it is not necessary to list required Python libraries in section
'requirements' of DOCUMENTATION docstring in modules. Ansible will
merge requirements from doc fragments and DOCUMENTATION docstring
which previously resulted in duplicates such as in server module [0]:

* openstacksdk
* openstacksdk >= 0.36, < 0.99.0
* python >= 3.6

When removing the 'requirements' section from server module, then
Ansible will list openstacksdk once only:

* openstacksdk >= 0.36, < 0.99.0
* python >= 3.6

To see what documentation Ansible will produce for server module run:

  ansible-doc --type module openstack.cloud.server

[0] https://docs.ansible.com/ansible/latest/collections/openstack/\
    cloud/server_module.html

Change-Id: I727ed95ee480bb644b5a533f6a9526973677064c
This commit is contained in:
Jakob Meng 2023-01-16 13:50:32 +01:00
parent a46bbd0d48
commit 1b38b7c500
86 changed files with 6 additions and 310 deletions

View File

@ -96,8 +96,8 @@ options:
default: INFO
choices: [INFO, DEBUG]
requirements:
- python >= 3.6
- openstacksdk >= 0.103.0
- "python >= 3.6"
- "openstacksdk >= 0.103.0"
notes:
- The standard OpenStack environment variables, such as C(OS_USERNAME)
may be used instead of providing explicit values.

View File

@ -112,8 +112,8 @@ options:
type: bool
default: true
requirements:
- "python >= 3.6"
- "openstacksdk"
- "python >= 3.6"
- "openstacksdk >= 0.103.0"
extends_documentation_fragment:
- inventory_cache
- constructed

View File

@ -47,10 +47,6 @@ options:
- Dictionary with extra key/value pairs passed to the API
default: {}
type: dict
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -11,9 +11,6 @@ short_description: Retrieve auth token from OpenStack cloud
author: OpenStack Ansible SIG
description:
- Retrieve auth token from OpenStack cloud
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -25,11 +25,6 @@ options:
- Mutually exclusive with I(mac)
type: str
aliases: [id, uuid]
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -164,10 +164,6 @@ options:
- Interface for all vendor-specific actions on this node, e.g.
C(no-vendor).
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -81,10 +81,6 @@ options:
to complete.
type: int
default: 1800
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -21,10 +21,6 @@ options:
- Name or ID of the baremetal node.
type: str
aliases: ['node']
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -69,9 +69,6 @@ options:
choices: ['present', 'absent']
default: present
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -25,9 +25,6 @@ options:
description:
- Name or ID of a Bare Metal node.
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -38,10 +38,6 @@ options:
choices: ['present', 'absent']
default: present
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -16,10 +16,6 @@ options:
description:
- Name or ID of the service.
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -78,9 +78,6 @@ notes:
- Return values of this module are preliminary and will most likely change
when openstacksdk has finished its transition of cloud layer functions to
resource proxies.
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -144,9 +144,6 @@ notes:
- Return values of this module are preliminary and will most likely change
when openstacksdk has finished its transition of cloud layer functions to
resource proxies.
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -76,10 +76,6 @@ options:
- Number of virtual CPUs.
- Required when I(state) is C(present).
type: int
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -35,9 +35,6 @@ options:
choices: ['present', 'absent']
notes:
- A compute flavor must not be private to manage project access.
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -44,9 +44,6 @@ options:
- Filter flavors based on the number of virtual CPUs.
- I(vcpus) supports same format as I(ram) option.
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -20,9 +20,6 @@ options:
description:
- Filter the service list result by the host name.
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -22,8 +22,8 @@ options:
type: list
elements: str
requirements:
- "python >= 3.6"
- "openstacksdk"
- "python >= 3.6"
- "openstacksdk >= 0.103.0"
'''
RETURN = r'''

View File

@ -49,9 +49,6 @@ options:
choices: ['primary', 'secondary']
type: str
aliases: ['zone_type']
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -35,9 +35,6 @@ options:
- Zone type.
choices: ['primary', 'secondary']
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -47,10 +47,6 @@ options:
choices: [present, absent]
default: present
type: str
requirements:
- "python >= 3.6"
- "openstacksdk >= 0.13.0"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -47,9 +47,6 @@ options:
- Will default to an empty list when creating a new Identity Provider.
type: list
elements: str
requirements:
- "python >= 3.6"
- "openstacksdk >= 0.44"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -18,9 +18,6 @@ options:
- The name of the identity provider to fetch.
type: str
aliases: ['id']
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -48,9 +48,6 @@ options:
type: str
notes:
- Name equals the ID of a mapping.
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -19,9 +19,6 @@ options:
aliases: ['id']
notes:
- Name equals the ID of a federation mapping.
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -65,10 +65,6 @@ options:
choices: [present, absent]
default: present
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -46,10 +46,6 @@ options:
- The status of a floating IP.
choices: ['active', 'down']
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -28,10 +28,6 @@ options:
choices: [present, absent]
default: present
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -37,10 +37,6 @@ options:
choices: [present, absent]
default: present
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -34,10 +34,6 @@ options:
choices: [present, absent]
default: present
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -21,10 +21,6 @@ options:
- A dictionary of meta data to use for filtering. Elements of
this dictionary may be additional dictionaries.
type: dict
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -32,10 +32,6 @@ options:
choices: [present, absent]
default: present
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -25,10 +25,6 @@ options:
- A dictionary of meta data to use for further filtering. Elements of
this dictionary may be additional dictionaries.
type: dict
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -23,10 +23,6 @@ options:
choices: [present, absent]
default: present
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -22,11 +22,6 @@ options:
- Name or ID of the role
type: str
required: false
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -60,10 +60,6 @@ options:
choices: [present, absent]
default: present
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -26,10 +26,6 @@ options:
this dictionary may be additional dictionaries.
type: dict
default: {}
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -122,9 +122,6 @@ options:
- I(volume) has been deprecated. Use module M(openstack.cloud.volume)
instead.
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -22,9 +22,6 @@ options:
- Dict of properties of the images used for query
type: dict
aliases: ['properties']
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -37,10 +37,6 @@ options:
choices: [present, absent, replace]
default: present
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -29,10 +29,6 @@ options:
description:
- The last-seen item.
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -42,9 +42,6 @@ notes:
- Name equals the ID of a federation protocol.
- Name equals the ID of an identity provider.
- Name equals the ID of a mapping.
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -26,9 +26,6 @@ options:
notes:
- Name equals the ID of a federation protocol.
- Name equals the ID of an identity provider.
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -89,9 +89,6 @@ options:
- Must be a string that begins with a forward slash (C(/)).
- "Octavia's default URL path is C(/)."
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -70,9 +70,6 @@ options:
description:
- Member inactivity timeout in milliseconds.
type: int
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -64,9 +64,6 @@ options:
connections. A valid value is from 0 to 256.
- "Octavia's default for I(weight) is C(1)."
type: int
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -57,9 +57,6 @@ options:
choices: [present, absent]
default: present
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -90,9 +90,6 @@ options:
for creation.
- This attribute cannot be updated.
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -74,10 +74,6 @@ options:
Network will use Openstack defaults if this option is
not provided.
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -23,10 +23,6 @@ options:
this dictionary may be additional dictionaries.
required: false
type: dict
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -57,7 +57,6 @@ options:
- Filters the RBAC rules based on the target project id.
- Logically AND'ed with other filters.
type: str
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -13,8 +13,6 @@ author: OpenStack Ansible SIG
description:
- Create, update or delete a policy to apply a RBAC rule against a network,
security group or QoS Policy.
options:
action:
description:
@ -73,7 +71,6 @@ options:
choices: ['present', 'absent']
default: present
type: str
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -41,9 +41,6 @@ options:
choices: ['present', 'absent']
default: present
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -61,9 +61,6 @@ options:
default: 'present'
choices: ['present', 'absent']
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -153,10 +153,6 @@ options:
choices: [present, absent]
default: present
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -22,10 +22,6 @@ options:
of this dictionary will be matched passed to the API as query
parameter filters.
type: dict
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -44,9 +44,6 @@ options:
choices: [present, absent]
default: present
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -26,9 +26,6 @@ options:
- Elements of I(filters) are passed as query parameters to
OpenStack Identity API.
type: dict
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -133,11 +133,6 @@ options:
volumes:
description: Number of volumes to allow.
type: int
requirements:
- "python >= 3.6"
- openstacksdk
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -50,10 +50,6 @@ options:
- Name or ID of the zone which manages the recordset
required: true
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -51,10 +51,6 @@ options:
choices: [present, absent]
default: present
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -112,10 +112,6 @@ options:
choices: ['present', 'absent']
default: present
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -56,9 +56,6 @@ options:
all tags in this list will be returned.
type: list
elements: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -113,9 +113,6 @@ options:
choices: [present, absent]
default: present
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -52,9 +52,6 @@ options:
- Resources that match all tags in this list will be returned.
type: list
elements: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -98,9 +98,6 @@ options:
choices: [present, absent]
default: present
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -69,9 +69,6 @@ options:
description:
- Name or ID of the security group
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -241,10 +241,6 @@ options:
- If the module should wait for the instance to be created.
type: bool
default: 'yes'
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -53,11 +53,6 @@ options:
auth scoped project.
type: bool
default: 'no'
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -35,10 +35,6 @@ options:
C(max_server_per_host) rule is supported for the C(anti-affinity)
policy.
type: dict
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -38,10 +38,6 @@ options:
scoped project.
type: bool
default: 'no'
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -34,10 +34,6 @@ options:
choices: [present, absent]
default: present
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -32,10 +32,6 @@ options:
- Name or id of volume you want to attach to a server
required: true
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -62,10 +62,6 @@ options:
- Maximum number of seconds to wait for the stack creation
default: 3600
type: int
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -30,9 +30,6 @@ options:
description:
- Status of the stack such as C(available)
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -127,10 +127,6 @@ options:
- The subnet pool name or ID from which to obtain a CIDR
type: str
required: false
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -72,10 +72,6 @@ options:
choices: ['present', 'absent']
default: present
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -25,10 +25,6 @@ options:
this dictionary may be additional dictionaries.
required: false
type: dict
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -81,10 +81,6 @@ options:
description:
- Volume type for volume
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -50,14 +50,8 @@ options:
- Name or ID of the volume.
- Required when I(state) is C(present).
type: str
notes:
- This module does not support updates to existing backups.
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -20,11 +20,6 @@ options:
description:
- Name or ID of the volume.
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -30,11 +30,6 @@ options:
- Status of the volume so that you can filter on C(available) for example
type: str
required: false
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -40,13 +40,8 @@ options:
- Volume name or ID to create the snapshot from.
- Required when I(state) is C(present).
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
notes:
- Updating existing volume snapshots has not been implemented yet.
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -30,11 +30,6 @@ options:
description:
- Name or ID of the volume.
type: str
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''

View File

@ -35,9 +35,6 @@ options:
choices: ['present', 'absent']
notes:
- A volume type must not be private to manage project access.
requirements:
- "python >= 3.6"
- "openstacksdk"
extends_documentation_fragment:
- openstack.cloud.openstack
'''