mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 14:20:22 -07:00
changed collection arg to argregate on 2.4 network modules (#26649)
* changed collection arg to argregate on 2.4 network modules * replace users with aggregate in eos_user, junos_user, nxos_user * added version_added to places where we replaced users with aggregate in the docs * fix ios_static_route test * update tests to reference aggregate instead of collection/users
This commit is contained in:
parent
9d771f6eea
commit
8643e9cb34
42 changed files with 170 additions and 167 deletions
|
@ -47,11 +47,11 @@ options:
|
|||
description:
|
||||
- Admin distance of the static route.
|
||||
default: 1
|
||||
collection:
|
||||
aggregate:
|
||||
description: List of static route definitions
|
||||
purge:
|
||||
description:
|
||||
- Purge static routes not defined in the collections parameter.
|
||||
- Purge static routes not defined in the aggregates parameter.
|
||||
default: no
|
||||
state:
|
||||
description:
|
||||
|
@ -74,9 +74,9 @@ EXAMPLES = """
|
|||
next_hop: 10.0.0.1
|
||||
state: absent
|
||||
|
||||
- name: configure collections of static routes
|
||||
- name: configure aggregates of static routes
|
||||
ios_static_route:
|
||||
collection:
|
||||
aggregate:
|
||||
- { prefix: 192.168.2.0, mask 255.255.255.0, next_hop: 10.0.0.1 }
|
||||
- { prefix: 192.168.3.0, mask 255.255.255.0, next_hop: 10.0.2.1 }
|
||||
"""
|
||||
|
@ -146,8 +146,8 @@ def map_config_to_obj(module):
|
|||
def map_params_to_obj(module):
|
||||
obj = []
|
||||
|
||||
if 'collection' in module.params and module.params['collection']:
|
||||
for c in module.params['collection']:
|
||||
if 'aggregate' in module.params and module.params['aggregate']:
|
||||
for c in module.params['aggregate']:
|
||||
d = c.copy()
|
||||
|
||||
if 'state' not in d:
|
||||
|
@ -182,15 +182,15 @@ def main():
|
|||
mask=dict(type='str'),
|
||||
next_hop=dict(type='str'),
|
||||
admin_distance=dict(default=1, type='int'),
|
||||
collection=dict(type='list'),
|
||||
aggregate=dict(type='list'),
|
||||
purge=dict(type='bool'),
|
||||
state=dict(default='present', choices=['present', 'absent'])
|
||||
)
|
||||
|
||||
argument_spec.update(ios_argument_spec)
|
||||
required_one_of = [['collection', 'prefix']]
|
||||
required_one_of = [['aggregate', 'prefix']]
|
||||
required_together = [['prefix', 'mask', 'next_hop']]
|
||||
mutually_exclusive = [['collection', 'prefix']]
|
||||
mutually_exclusive = [['aggregate', 'prefix']]
|
||||
|
||||
module = AnsibleModule(argument_spec=argument_spec,
|
||||
required_one_of=required_one_of,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue