Module DOCUMENTATION should match argspec (#34895)

* Module DOCUMENTATION should match argspec

Large update of many modules so that DOCUMENTATION option name and
aliases match those defined in the argspec.

Issues identified by https://github.com/ansible/ansible/pull/34809

In addition to many typos and missing aliases, the following notable
changes were made:

* Create `module_docs_fragments/url.py` for `url_argument_spec`
* `dellos*_command` shouldn't have ever had `waitfor` (was incorrectly copied)
* `ce_aaa_server_host.py` `s/raduis_server_type/radius_server_type/g`
* `Junos_lldp` enable should be part of `state`.
This commit is contained in:
John R Barker 2018-01-16 12:18:51 +00:00 committed by GitHub
commit 195beebcb4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
123 changed files with 406 additions and 132 deletions

View file

@ -25,7 +25,9 @@ description:
author: "Eric Chou (@ericchou) 2016, Mischa Peters (@mischapeters) 2014"
notes:
- Requires A10 Networks aXAPI 2.1.
extends_documentation_fragment: a10
extends_documentation_fragment:
- a10
- url
options:
partition:
version_added: "2.3"
@ -59,6 +61,7 @@ options:
required when C(state) is C(present).
required: false
default: null
aliases: ['port']
state:
description:
- This is to specify the operation to create, update or remove SLB server.

View file

@ -23,7 +23,9 @@ short_description: Manage A10 Networks AX/SoftAX/Thunder/vThunder devices
description:
- Manage SLB (Server Load Balancer) server objects on A10 Networks devices via aXAPIv3.
author: "Eric Chou (@ericchou) based on previous work by Mischa Peters (@mischapeters)"
extends_documentation_fragment: a10
extends_documentation_fragment:
- a10
- url
options:
server_name:
description:
@ -48,6 +50,7 @@ options:
and C(protocol:).
required: false
default: null
aliases: ['port']
operation:
description:
- Create, Update or Remove SLB server. For create and update operation, we use the IP address and server

View file

@ -26,8 +26,15 @@ author: "Eric Chou (@ericchou) 2016, Mischa Peters (@mischapeters) 2014"
notes:
- Requires A10 Networks aXAPI 2.1.
- When a server doesn't exist and is added to the service-group the server will be created.
extends_documentation_fragment: a10
extends_documentation_fragment:
- a10
- url
options:
state:
description:
- If the specified service group should exists.
default: present
choices: ['present', 'absent']
partition:
version_added: "2.3"
description:
@ -72,6 +79,7 @@ options:
specify the C(status:). See the examples below for details.
required: false
default: null
aliases: ['server', 'member']
validate_certs:
description:
- If C(no), SSL certificates will not be validated. This should only be used

View file

@ -25,8 +25,15 @@ description:
author: "Eric Chou (@ericchou) 2016, Mischa Peters (@mischapeters) 2014"
notes:
- Requires A10 Networks aXAPI 2.1.
extends_documentation_fragment: a10
extends_documentation_fragment:
- a10
- url
options:
state:
description:
- If the specified virtual server should exist.
choices: ['present', 'absent']
default: present
partition:
version_added: "2.3"
description:

View file

@ -30,6 +30,7 @@ options:
command syntax as some commands are automatically modified by the
device config parser.
required: true
aliases: [commands]
before:
description:
- The ordered set of commands to push on to the command stack if

View file

@ -201,7 +201,7 @@ EXAMPLES = '''
ce_aaa_server_host:
state: present
radius_group_name: group1
raduis_server_type: Authentication
radius_server_type: Authentication
radius_server_ip: 10.1.10.1
radius_server_port: 2000
radius_server_mode: Primary-server
@ -212,7 +212,7 @@ EXAMPLES = '''
ce_aaa_server_host:
state: absent
radius_group_name: group1
raduis_server_type: Authentication
radius_server_type: Authentication
radius_server_ip: 10.1.10.1
radius_server_port: 2000
radius_server_mode: Primary-server
@ -1059,7 +1059,7 @@ class AaaServerHost(object):
module = kwargs["module"]
radius_group_name = module.params['radius_group_name']
raduis_server_type = module.params['raduis_server_type']
radius_server_type = module.params['radius_server_type']
radius_server_ip = module.params['radius_server_ip']
radius_server_port = module.params['radius_server_port']
radius_server_mode = module.params['radius_server_mode']
@ -1099,10 +1099,10 @@ class AaaServerHost(object):
for tmp in result["radius_server_ip_v4"]:
if "serverType" in tmp.keys():
if state == "present":
if tmp["serverType"] != raduis_server_type:
if tmp["serverType"] != radius_server_type:
need_cfg = True
else:
if tmp["serverType"] == raduis_server_type:
if tmp["serverType"] == radius_server_type:
need_cfg = True
if "serverIPAddress" in tmp.keys():
if state == "present":
@ -1141,14 +1141,14 @@ class AaaServerHost(object):
module = kwargs["module"]
radius_group_name = module.params['radius_group_name']
raduis_server_type = module.params['raduis_server_type']
radius_server_type = module.params['radius_server_type']
radius_server_ip = module.params['radius_server_ip']
radius_server_port = module.params['radius_server_port']
radius_server_mode = module.params['radius_server_mode']
radius_vpn_name = module.params['radius_vpn_name']
conf_str = CE_MERGE_RADIUS_SERVER_CFG_IPV4 % (
radius_group_name, raduis_server_type,
radius_group_name, radius_server_type,
radius_server_ip, radius_server_port,
radius_server_mode, radius_vpn_name)
@ -1163,7 +1163,7 @@ class AaaServerHost(object):
cmd = "radius server group %s" % radius_group_name
cmds.append(cmd)
if raduis_server_type == "Authentication":
if radius_server_type == "Authentication":
cmd = "radius server authentication %s %s" % (
radius_server_ip, radius_server_port)
@ -1190,14 +1190,14 @@ class AaaServerHost(object):
module = kwargs["module"]
radius_group_name = module.params['radius_group_name']
raduis_server_type = module.params['raduis_server_type']
radius_server_type = module.params['radius_server_type']
radius_server_ip = module.params['radius_server_ip']
radius_server_port = module.params['radius_server_port']
radius_server_mode = module.params['radius_server_mode']
radius_vpn_name = module.params['radius_vpn_name']
conf_str = CE_DELETE_RADIUS_SERVER_CFG_IPV4 % (
radius_group_name, raduis_server_type,
radius_group_name, radius_server_type,
radius_server_ip, radius_server_port,
radius_server_mode, radius_vpn_name)
@ -1212,7 +1212,7 @@ class AaaServerHost(object):
cmd = "radius server group %s" % radius_group_name
cmds.append(cmd)
if raduis_server_type == "Authentication":
if radius_server_type == "Authentication":
cmd = "undo radius server authentication %s %s" % (
radius_server_ip, radius_server_port)
@ -1239,7 +1239,7 @@ class AaaServerHost(object):
module = kwargs["module"]
radius_group_name = module.params['radius_group_name']
raduis_server_type = module.params['raduis_server_type']
radius_server_type = module.params['radius_server_type']
radius_server_ipv6 = module.params['radius_server_ipv6']
radius_server_port = module.params['radius_server_port']
radius_server_mode = module.params['radius_server_mode']
@ -1278,10 +1278,10 @@ class AaaServerHost(object):
for tmp in result["radius_server_ip_v6"]:
if "serverType" in tmp.keys():
if state == "present":
if tmp["serverType"] != raduis_server_type:
if tmp["serverType"] != radius_server_type:
need_cfg = True
else:
if tmp["serverType"] == raduis_server_type:
if tmp["serverType"] == radius_server_type:
need_cfg = True
if "serverIPAddress" in tmp.keys():
if state == "present":
@ -1313,13 +1313,13 @@ class AaaServerHost(object):
module = kwargs["module"]
radius_group_name = module.params['radius_group_name']
raduis_server_type = module.params['raduis_server_type']
radius_server_type = module.params['radius_server_type']
radius_server_ipv6 = module.params['radius_server_ipv6']
radius_server_port = module.params['radius_server_port']
radius_server_mode = module.params['radius_server_mode']
conf_str = CE_MERGE_RADIUS_SERVER_CFG_IPV6 % (
radius_group_name, raduis_server_type,
radius_group_name, radius_server_type,
radius_server_ipv6, radius_server_port,
radius_server_mode)
@ -1334,7 +1334,7 @@ class AaaServerHost(object):
cmd = "radius server group %s" % radius_group_name
cmds.append(cmd)
if raduis_server_type == "Authentication":
if radius_server_type == "Authentication":
cmd = "radius server authentication %s %s" % (
radius_server_ipv6, radius_server_port)
@ -1355,13 +1355,13 @@ class AaaServerHost(object):
module = kwargs["module"]
radius_group_name = module.params['radius_group_name']
raduis_server_type = module.params['raduis_server_type']
radius_server_type = module.params['radius_server_type']
radius_server_ipv6 = module.params['radius_server_ipv6']
radius_server_port = module.params['radius_server_port']
radius_server_mode = module.params['radius_server_mode']
conf_str = CE_DELETE_RADIUS_SERVER_CFG_IPV6 % (
radius_group_name, raduis_server_type,
radius_group_name, radius_server_type,
radius_server_ipv6, radius_server_port,
radius_server_mode)
@ -1376,7 +1376,7 @@ class AaaServerHost(object):
cmd = "radius server group %s" % radius_group_name
cmds.append(cmd)
if raduis_server_type == "Authentication":
if radius_server_type == "Authentication":
cmd = "undo radius server authentication %s %s" % (
radius_server_ipv6, radius_server_port)
@ -1397,7 +1397,7 @@ class AaaServerHost(object):
module = kwargs["module"]
radius_group_name = module.params['radius_group_name']
raduis_server_type = module.params['raduis_server_type']
radius_server_type = module.params['radius_server_type']
radius_server_name = module.params['radius_server_name']
radius_server_port = module.params['radius_server_port']
radius_server_mode = module.params['radius_server_mode']
@ -1437,10 +1437,10 @@ class AaaServerHost(object):
for tmp in result["radius_server_name_cfg"]:
if "serverType" in tmp.keys():
if state == "present":
if tmp["serverType"] != raduis_server_type:
if tmp["serverType"] != radius_server_type:
need_cfg = True
else:
if tmp["serverType"] == raduis_server_type:
if tmp["serverType"] == radius_server_type:
need_cfg = True
if "serverName" in tmp.keys():
if state == "present":
@ -1479,14 +1479,14 @@ class AaaServerHost(object):
module = kwargs["module"]
radius_group_name = module.params['radius_group_name']
raduis_server_type = module.params['raduis_server_type']
radius_server_type = module.params['radius_server_type']
radius_server_name = module.params['radius_server_name']
radius_server_port = module.params['radius_server_port']
radius_server_mode = module.params['radius_server_mode']
radius_vpn_name = module.params['radius_vpn_name']
conf_str = CE_MERGE_RADIUS_SERVER_NAME % (
radius_group_name, raduis_server_type,
radius_group_name, radius_server_type,
radius_server_name, radius_server_port,
radius_server_mode, radius_vpn_name)
@ -1500,7 +1500,7 @@ class AaaServerHost(object):
cmd = "radius server group %s" % radius_group_name
cmds.append(cmd)
if raduis_server_type == "Authentication":
if radius_server_type == "Authentication":
cmd = "radius server authentication hostname %s %s" % (
radius_server_name, radius_server_port)
@ -1527,14 +1527,14 @@ class AaaServerHost(object):
module = kwargs["module"]
radius_group_name = module.params['radius_group_name']
raduis_server_type = module.params['raduis_server_type']
radius_server_type = module.params['radius_server_type']
radius_server_name = module.params['radius_server_name']
radius_server_port = module.params['radius_server_port']
radius_server_mode = module.params['radius_server_mode']
radius_vpn_name = module.params['radius_vpn_name']
conf_str = CE_DELETE_RADIUS_SERVER_NAME % (
radius_group_name, raduis_server_type,
radius_group_name, radius_server_type,
radius_server_name, radius_server_port,
radius_server_mode, radius_vpn_name)
@ -1548,7 +1548,7 @@ class AaaServerHost(object):
cmd = "radius server group %s" % radius_group_name
cmds.append(cmd)
if raduis_server_type == "Authentication":
if radius_server_type == "Authentication":
cmd = "undo radius server authentication hostname %s %s" % (
radius_server_name, radius_server_port)
@ -2319,7 +2319,7 @@ def main():
local_user_level=dict(type='str'),
local_user_group=dict(type='str'),
radius_group_name=dict(type='str'),
raduis_server_type=dict(choices=['Authentication', 'Accounting']),
radius_server_type=dict(choices=['Authentication', 'Accounting']),
radius_server_ip=dict(type='str'),
radius_server_ipv6=dict(type='str'),
radius_server_port=dict(type='str'),
@ -2366,7 +2366,7 @@ def main():
# radius para
radius_group_name = module.params['radius_group_name']
raduis_server_type = module.params['raduis_server_type']
radius_server_type = module.params['radius_server_type']
radius_server_ip = module.params['radius_server_ip']
radius_server_ipv6 = module.params['radius_server_ipv6']
radius_server_port = module.params['radius_server_port']
@ -2406,8 +2406,8 @@ def main():
proposed["local_user_group"] = local_user_group
if radius_group_name:
proposed["radius_group_name"] = radius_group_name
if raduis_server_type:
proposed["raduis_server_type"] = raduis_server_type
if radius_server_type:
proposed["radius_server_type"] = radius_server_type
if radius_server_ip:
proposed["radius_server_ip"] = radius_server_ip
if radius_server_ipv6:
@ -2480,9 +2480,9 @@ def main():
module.fail_json(
msg='Error: Please do not input radius_server_ip and radius_server_ipv6 at the same time.')
if not raduis_server_type or not radius_server_port or not radius_server_mode or not radius_vpn_name:
if not radius_server_type or not radius_server_port or not radius_server_mode or not radius_vpn_name:
module.fail_json(
msg='Error: Please input raduis_server_type radius_server_port radius_server_mode radius_vpn_name.')
msg='Error: Please input radius_server_type radius_server_port radius_server_mode radius_vpn_name.')
if radius_server_ip:
rds_server_ipv4_result = ce_aaa_server_host.get_radius_server_cfg_ipv4(

View file

@ -173,7 +173,7 @@ def main():
# { command: <str>, prompt: <str>, response: <str> }
commands=dict(type='list', required=True),
wait_for=dict(type='list', aliases=['waitfor']),
wait_for=dict(type='list'),
match=dict(default='all', choices=['all', 'any']),
retries=dict(default=10, type='int'),

View file

@ -174,7 +174,7 @@ def main():
# { command: <str>, prompt: <str>, response: <str> }
commands=dict(type='list', required=True),
wait_for=dict(type='list', aliases=['waitfor']),
wait_for=dict(type='list'),
match=dict(default='all', choices=['all', 'any']),
retries=dict(default=10, type='int'),

View file

@ -178,7 +178,7 @@ def main():
# { command: <str>, prompt: <str>, response: <str> }
commands=dict(type='list', required=True),
wait_for=dict(type='list', aliases=['waitfor']),
wait_for=dict(type='list'),
match=dict(default='all', choices=['all', 'any']),
retries=dict(default=10, type='int'),

View file

@ -45,6 +45,7 @@ options:
command syntax as some commands are automatically modified by the
device config parser.
required: false
aliases: ['commands']
default: null
parents:
description:

View file

@ -52,6 +52,7 @@ options:
append to the hostname for the purpose of doing name resolution.
This argument accepts a list of names and will be reconciled
with the current active configuration on the running node.
aliases: ['domain_list']
lookup_source:
description:
- Provides one or more source

View file

@ -42,7 +42,8 @@ options:
- The set of username objects to be configured on the remote
Arista EOS device. The list entries can either be the username
or a hash of username and properties. This argument is mutually
exclusive with the C(username) argument. alias C(users).
exclusive with the C(username) argument.
aliases: ['users', 'collection']
version_added: "2.4"
name:
description:

View file

@ -26,7 +26,6 @@ options:
description:
- IP tunnel interface name.
required: true
aliases: [ "tunnel", "link" ]
temporary:
description:
- Specifies that the IP tunnel interface is temporary. Temporary IP tunnel
@ -39,6 +38,7 @@ options:
required: false
default: "ipv4"
choices: [ "ipv4", "ipv6", "6to4" ]
aliases: ['tunnel_type']
local_address:
description:
- Literat IP address or hostname corresponding to the tunnel source.

View file

@ -36,7 +36,7 @@ options:
description:
- Identifies a network flow by the local IP address.
required: false
remove_ip:
remote_ip:
description:
- Identifies a network flow by the remote IP address.
required: false

View file

@ -191,7 +191,7 @@ class AddrProp(object):
def main():
module = AnsibleModule(
argument_spec=dict(
addrobj=dict(required=True, default=None, aliases=['nic, interface']),
addrobj=dict(required=True, default=None, aliases=['nic', 'interface']),
property=dict(required=True, aliases=['name']),
value=dict(required=False),
temporary=dict(default=False, type='bool'),

View file

@ -43,7 +43,8 @@ options:
- The set of username objects to be configured on the remote
Cisco IOS device. The list entries can either be the username
or a hash of username and properties. This argument is mutually
exclusive with the C(name) argument. alias C(users).
exclusive with the C(name) argument.
aliases: ['users']
name:
description:
- The username to be configured on the Cisco IOS device.
@ -76,6 +77,7 @@ options:
device running configuration. The argument accepts a string value
defining the view name. This argument does not check if the view
has been configured on the device.
aliases: ['role']
nopassword:
description:
- Defines the username without assigning

View file

@ -35,7 +35,8 @@ options:
- The set of username objects to be configured on the remote
Cisco IOS XR device. The list entries can either be the username
or a hash of username and properties. This argument is mutually
exclusive with the C(name) argument, alias C(users).
exclusive with the C(name) argument.
aliases: ['users', 'collection']
name:
description:
- The username to be configured on the Cisco IOS XR device.
@ -62,7 +63,8 @@ options:
- Configures the group for the username in the
device running configuration. The argument accepts a string value
defining the group name. This argument does not check if the group
has been configured on the device, alias C(role).
has been configured on the device.
aliases: ['role']
groups:
version_added: "2.5"
description:

View file

@ -35,12 +35,6 @@ options:
- Specify the number of seconds that LLDP information is held before it is
discarded. The multiplier value is used in combination with the
C(interval) value.
enable:
description:
- If value is C(True) it enable LLDP protocol on remote device, if value
is C(False) it disables LLDP protocol.
default: present
choices: [True, False]
state:
description:
- Value of C(present) ensures given LLDP configuration

View file

@ -32,10 +32,11 @@ options:
on the remote device. The list of users will be compared against
the current users and only changes will be added or removed from
the device configuration. This argument is mutually exclusive with
the name argument. alias C(users).
the name argument.
version_added: "2.4"
required: False
default: null
aliases: ['users', 'collection']
name:
description:
- The C(name) argument defines the username of the user to be created

View file

@ -73,6 +73,11 @@ options:
required: false
default: false
version_added: "2.4"
include_defaults:
description:
- Specify if the complete running configuration for module operations should be used.
default: true
type: bool
state:
description:
- Specify desired state of the resource.

View file

@ -68,6 +68,11 @@ options:
required: false
choices: ['true', 'false']
default: false
include_defaults:
description:
- Specify if the complete running configuration for module operations should be used.
default: false
type: bool
state:
description:
- Manage the state of the resource.

View file

@ -172,7 +172,7 @@ options:
required: false
default: null
choices: ['enable']
time-range:
time_range:
description:
- Name of time-range to apply.
required: false
@ -192,6 +192,11 @@ options:
choices: ['af11', 'af12', 'af13', 'af21', 'af22', 'af23','af31','af32',
'af33', 'af41', 'af42', 'af43', 'cs1', 'cs2', 'cs3', 'cs4',
'cs5', 'cs6', 'cs7', 'default', 'ef']
include_defaults:
description:
- Specify if the complete running configuration for module operations should be used.
default: false
type: bool
state:
description:
- Specify desired state of the resource.

View file

@ -74,6 +74,11 @@ options:
- Sets the route-target 'import' extended communities.
required: false
default: null
include_defaults:
description:
- Specify if the complete running configuration for module operations should be used.
default: true
type: bool
state:
description:
- Determines whether the config should be present or not

View file

@ -59,6 +59,11 @@ options:
required: false
default: null
choices: ['true', 'false']
include_defaults:
description:
- Specify if the complete running configuration for module operations should be used.
default: false
type: bool
state:
description:
- Manages desired state of the resource.

View file

@ -159,6 +159,11 @@ options:
required: false
choices: ['true', 'false']
default: null
include_defaults:
description:
- Specify if the complete running configuration for module operations should be used.
default: true
type: bool
state:
description:
- Manages desired state of the resource.

View file

@ -111,6 +111,11 @@ options:
- Specifies the message_digest password. Valid value is a string.
required: false
default: null
include_defaults:
description:
- Specify if the complete running configuration for module operations should be used.
default: true
type: bool
state:
description:
- Determines whether the config should be present or not

View file

@ -41,6 +41,11 @@ options:
required: false
default: present
choices: ['present','absent']
include_defaults:
description:
- Specify if the complete running configuration for module operations should be used.
default: true
type: bool
'''
EXAMPLES = '''

View file

@ -120,6 +120,11 @@ options:
required: false
choices: ['true','false']
default: null
include_defaults:
description:
- Specify if the complete running configuration for module operations should be used.
default: true
type: bool
'''
EXAMPLES = '''

View file

@ -50,6 +50,11 @@ options:
with checkpoint_file.
required: false
default: null
include_defaults:
description:
- Specify if the complete running configuration for module operations should be used.
default: false
type: bool
'''
EXAMPLES = '''

View file

@ -40,14 +40,15 @@ options:
- The set of username objects to be configured on the remote
Cisco Nexus device. The list entries can either be the username
or a hash of username and properties. This argument is mutually
exclusive with the C(name) argument. alias C(users).
exclusive with the C(name) argument.
aliases: ['users', 'collection']
version_added: "2.4"
required: false
default: null
name:
description:
- The username to be configured on the remote Cisco Nexus
device. This argument accepts a stringv value and is mutually
device. This argument accepts a string value and is mutually
exclusive with the C(aggregate) argument.
required: false
default: null
@ -76,6 +77,7 @@ options:
has been configured on the device.
required: false
default: null
aliases: ['roles']
sshkey:
description:
- The C(sshkey) argument defines the SSH public key to configure

View file

@ -71,6 +71,11 @@ options:
choices: ['shutdown', 'no shutdown']
default: no shutdown
version_added: "2.2"
include_defaults:
description:
- Specify if the complete running configuration for module operations should be used.
default: false
type: bool
state:
description:
- Specify desired state of the resource.

View file

@ -24,7 +24,7 @@ description:
an implementation for working with these configuration sections in
a deterministic way.
options:
commands:
lines:
description:
- The ordered set of commands that should be configured in the
section. The commands must be the exact same commands as found

View file

@ -43,7 +43,7 @@ options:
required: true
description:
- Identifies the recoard in the table.
column:
col:
required: true
description:
- Identifies the column in the record.

View file

@ -36,7 +36,7 @@ extends_documentation_fragment: vyos
notes:
- Tested against VYOS 1.1.7
options:
hostname:
host_name:
description:
- Configure the device hostname parameter. This option takes an ASCII string value.
domain_name:

View file

@ -43,7 +43,8 @@ options:
- The set of username objects to be configured on the remote
VyOS device. The list entries can either be the username or
a hash of username and properties. This argument is mutually
exclusive with the C(name) argument. alias C(users).
exclusive with the C(name) argument.
aliases: ['users', 'collection']
name:
description:
- The username to be configured on the VyOS device.
@ -74,6 +75,7 @@ options:
description:
- The C(level) argument configures the level of the user when logged
into the system. This argument accepts string values admin or operator.
aliases: ['role']
purge:
description:
- Instructs the module to consider the