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
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

@ -25,6 +25,7 @@ options:
required: true
aliases:
- name
type: str
vip_setting:
description:
- Configures the network settings for the grid member.
@ -34,12 +35,15 @@ options:
address:
description:
- The IPv4 Address of the Grid Member
type: str
subnet_mask:
description:
- The subnet mask for the Grid Member
type: str
gateway:
description:
- The default gateway for the Grid Member
type: str
ipv6_setting:
description:
- Configures the IPv6 settings for the grid member.
@ -49,33 +53,42 @@ options:
virtual_ip:
description:
- The IPv6 Address of the Grid Member
type: str
cidr_prefix:
description:
- The IPv6 CIDR prefix for the Grid Member
type: int
gateway:
description:
- The gateway address for the Grid Member
type: str
config_addr_type:
description:
- Address configuration type (IPV4/IPV6/BOTH)
default: IPV4
type: str
comment:
description:
- A descriptive comment of the Grid member.
type: str
extattrs:
description:
- Extensible attributes associated with the object.
type: dict
enable_ha:
description:
- If set to True, the member has two physical nodes (HA pair).
type: bool
default: false
router_id:
description:
- Virtual router identifier. Provide this ID if "ha_enabled" is set to "true". This is a unique VRID number (from 1 to 255) for the local subnet.
type: int
lan2_enabled:
description:
- When set to "true", the LAN2 port is enabled as an independent port or as a port for failover purposes.
type: bool
default: false
lan2_port_setting:
description:
- Settings for the Grid member LAN2 port if 'lan2_enabled' is set to "true".
@ -95,12 +108,15 @@ options:
address:
description:
- The IPv4 Address of LAN2
type: str
subnet_mask:
description:
- The subnet mask of LAN2
type: str
gateway:
description:
- The default gateway of LAN2
type: str
v6_network_setting:
description:
- If the 'enable' field is set to True, this defines IPv6 network settings for LAN2.
@ -110,16 +126,20 @@ options:
virtual_ip:
description:
- The IPv6 Address of LAN2
type: str
cidr_prefix:
description:
- The IPv6 CIDR prefix of LAN2
type: int
gateway:
description:
- The gateway address of LAN2
type: str
platform:
description:
- Configures the Hardware Platform.
default: INFOBLOX
type: str
node_info:
description:
- Configures the node information list with detailed status report on the operations of the Grid Member.
@ -139,9 +159,11 @@ options:
duplex:
description:
- The port duplex; if speed is 1000, duplex must be FULL.
type: str
speed:
description:
- The port speed; if speed is 1000, duplex is FULL.
type: str
lan_ha_port_setting:
description:
- LAN/HA port settings for the node.
@ -151,6 +173,7 @@ options:
ha_ip_address:
description:
- HA IP address.
type: str
ha_port_setting:
description:
- Physical port settings for the HA interface.
@ -164,9 +187,11 @@ options:
duplex:
description:
- The port duplex; if speed is 1000, duplex must be FULL.
type: str
speed:
description:
- The port speed; if speed is 1000, duplex is FULL.
type: str
lan_port_setting:
description:
- Physical port settings for the LAN interface.
@ -180,15 +205,19 @@ options:
duplex:
description:
- The port duplex; if speed is 1000, duplex must be FULL.
type: str
speed:
description:
- The port speed; if speed is 1000, duplex is FULL.
type: str
mgmt_ipv6addr:
description:
- Public IPv6 address for the LAN1 interface.
type: str
mgmt_lan:
description:
- Public IPv4 address for the LAN1 interface.
type: str
mgmt_network_setting:
description:
- Network settings for the MGMT port of the node.
@ -198,12 +227,15 @@ options:
address:
description:
- The IPv4 Address of MGMT
type: str
subnet_mask:
description:
- The subnet mask of MGMT
type: str
gateway:
description:
- The default gateway of MGMT
type: str
v6_mgmt_network_setting:
description:
- The network settings for the IPv6 MGMT port of the node.
@ -213,12 +245,15 @@ options:
virtual_ip:
description:
- The IPv6 Address of MGMT
type: str
cidr_prefix:
description:
- The IPv6 CIDR prefix of MGMT
type: int
gateway:
description:
- The gateway address of MGMT
type: str
mgmt_port_setting:
description:
- Settings for the member MGMT port.
@ -241,6 +276,7 @@ options:
description:
- The name of the upgrade group to which this Grid member belongs.
default: Default
type: str
use_syslog_proxy_setting:
description:
- Use flag for external_syslog_server_enable , syslog_servers, syslog_proxy_setting, syslog_size
@ -258,25 +294,32 @@ options:
address:
description:
- The server address.
type: str
category_list:
description:
- The list of all syslog logging categories.
type: list
elements: str
connection_type:
description:
- The connection type for communicating with this server.(STCP/TCP?UDP)
default: UDP
type: str
local_interface:
description:
- The local interface through which the appliance sends syslog messages to the syslog server.(ANY/LAN/MGMT)
default: ANY
type: str
message_node_id:
description:
- Identify the node in the syslog message. (HOSTNAME/IP_HOSTNAME/LAN/MGMT)
default: LAN
type: str
message_source:
description:
- The source of syslog messages to be sent to the external syslog server.
default: ANY
type: str
only_category_list:
description:
- The list of selected syslog logging categories. The appliance forwards syslog messages that belong to the selected categories.
@ -285,10 +328,12 @@ options:
description:
- The port this server listens on.
default: 514
type: int
severity:
description:
- The severity filter. The appliance sends log messages of the specified severity and above to the external syslog server.
default: DEBUG
type: str
pre_provisioning:
description:
- Pre-provisioning information.
@ -304,12 +349,16 @@ options:
hwmodel:
description:
- Hardware model
type: str
hwtype:
description:
- Hardware type.
type: str
licenses:
description:
- An array of license types.
type: list
elements: str
create_token:
description:
- Flag for initiating a create token request for pre-provisioned members.
@ -325,6 +374,7 @@ options:
choices:
- present
- absent
type: str
'''
EXAMPLES = '''
@ -402,9 +452,9 @@ EXAMPLES = '''
RETURN = ''' # '''
from ansible.module_utils.basic import AnsibleModule
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_MEMBER
from ansible_collections.community.general.plugins.module_utils.net_tools.nios.api import normalize_ib_spec
def main():
@ -457,7 +507,7 @@ def main():
syslog_spec = dict(
address=dict(),
category_list=dict(type='list'),
category_list=dict(type='list', elements='str'),
connection_type=dict(default='UDP'),
local_interface=dict(default='ANY'),
message_node_id=dict(default='LAN'),
@ -474,7 +524,7 @@ def main():
pre_prov_spec = dict(
hardware_info=dict(type='list', elements='dict', options=hw_spec),
licenses=dict(type='list'),
licenses=dict(type='list', elements='str'),
)
ib_spec = dict(
@ -504,7 +554,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,