Tidy up validate-modules ignores for modules: net_tools/nios (#1598)

* Added ``normalize_ib_spec()``

* Added suboptions

- ``http_pool_connections``
- ``http_pool_maxsize``
- ``silent_ssl_warnings``

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* Added function to normalize the ``ib_spec`` for ansible usage.

* Tidy up validate-modules ignores for net_tools/nios modules

* Update plugins/modules/net_tools/nios/nios_nsgroup.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/net_tools/nios/nios_nsgroup.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/net_tools/nios/nios_nsgroup.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/net_tools/nios/nios_nsgroup.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/net_tools/nios/nios_nsgroup.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/net_tools/nios/nios_nsgroup.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* fixed missing defaults, per PR tests

* added changelog fragment

* Update changelogs/fragments/nios-fix-ib_spec.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Alexei Znamensky 2021-01-12 10:14:46 +13:00 committed by GitHub
parent 637571993a
commit 6c7f8f97ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 326 additions and 276 deletions

View file

@ -29,12 +29,13 @@ options:
aliases:
- name
- cidr
type: str
network_view:
description:
- Configures the name of the network view to associate with this
configured instance.
required: true
default: default
type: str
options:
description:
- Configures the set of DHCP options to be included as part of
@ -50,13 +51,16 @@ options:
C(router), C(router-templates), C(domain-name-servers), C(domain-name),
C(broadcast-address), C(broadcast-address-offset), C(dhcp-lease-time),
and C(dhcp6.name-servers).
type: str
num:
description:
- The number of the DHCP option to configure
type: int
value:
description:
- The value of the DHCP option specified by C(name)
required: true
type: str
use_option:
description:
- Only applies to a subset of options (see NIOS API documentation)
@ -66,16 +70,19 @@ options:
description:
- The name of the space this DHCP option is associated to
default: DHCP
type: str
extattrs:
description:
- Allows for the configuration of Extensible Attributes on the
instance of the object. This argument accepts a set of key / value
pairs for configuration.
type: dict
comment:
description:
- Configures a text string comment to be associated with the instance
of this object. The provided text string will be configured on the
object instance.
type: str
container:
description:
- If set to true it'll create the network container to be added or removed
@ -91,6 +98,7 @@ options:
choices:
- present
- absent
type: str
'''
EXAMPLES = '''
@ -180,6 +188,7 @@ from ansible.module_utils.six import iteritems
from ansible_collections.community.general.plugins.module_utils.net_tools.nios.api import WapiModule
from ansible_collections.community.general.plugins.module_utils.net_tools.nios.api import NIOS_IPV4_NETWORK, NIOS_IPV6_NETWORK
from ansible_collections.community.general.plugins.module_utils.net_tools.nios.api import NIOS_IPV4_NETWORK_CONTAINER, NIOS_IPV6_NETWORK_CONTAINER
from ansible_collections.community.general.plugins.module_utils.net_tools.nios.api import normalize_ib_spec
# The following function validate_ip_address has been taken from
@ -297,7 +306,7 @@ def main():
state=dict(default='present', choices=['present', 'absent'])
)
argument_spec.update(ib_spec)
argument_spec.update(normalize_ib_spec(ib_spec))
argument_spec.update(WapiModule.provider_spec)
module = AnsibleModule(argument_spec=argument_spec,