1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Add eigrp as a possible l3protocol in aci_l3out

Also fixes an error related to the required parameters. The l3out parameter is required but only 'name' was being accepted, and that should only be the alias.
This commit is contained in:
João Soares 2018-09-18 16:44:34 +02:00 committed by Dag Wieers
parent a978d7f283
commit dd67e89f47

View file

@ -61,7 +61,7 @@ options:
description: description:
- Routing protocol for the L3Out - Routing protocol for the L3Out
type: list type: list
choices: [ static, bgp, ospf, pim ] choices: [ static, bgp, ospf, eigrp, pim ]
description: description:
description: description:
- Description for the L3Out. - Description for the L3Out.
@ -234,7 +234,8 @@ def main():
choices=['AF11', 'AF12', 'AF13', 'AF21', 'AF22', 'AF23', 'AF31', 'AF32', 'AF33', 'AF41', 'AF42', choices=['AF11', 'AF12', 'AF13', 'AF21', 'AF22', 'AF23', 'AF31', 'AF32', 'AF33', 'AF41', 'AF42',
'AF43', 'CS0', 'CS1', 'CS2', 'CS3', 'CS4', 'CS5', 'CS6', 'CS7', 'EF', 'VA', 'unspecified'], 'AF43', 'CS0', 'CS1', 'CS2', 'CS3', 'CS4', 'CS5', 'CS6', 'CS7', 'EF', 'VA', 'unspecified'],
aliases=['target']), aliases=['target']),
l3protocol=dict(type='list', choices=['static', 'bgp', 'ospf', 'pim']), l3protocol=dict(type='list', choices=['static', 'bgp', 'ospf', 'eigrp', 'pim']),
asn=dict(type='str', aliases=['as_number']),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']) state=dict(type='str', default='present', choices=['absent', 'present', 'query'])
) )
@ -242,8 +243,8 @@ def main():
argument_spec=argument_spec, argument_spec=argument_spec,
supports_check_mode=True, supports_check_mode=True,
required_if=[ required_if=[
['state', 'absent', ['name', 'tenant']], ['state', 'absent', ['l3out', 'tenant']],
['state', 'present', ['name', 'tenant', 'domain', 'vrf']], ['state', 'present', ['l3out', 'tenant', 'domain', 'vrf']],
], ],
) )
@ -256,6 +257,7 @@ def main():
enforceRtctrl = module.params['route_control'] enforceRtctrl = module.params['route_control']
vrf = module.params['vrf'] vrf = module.params['vrf']
l3protocol = module.params['l3protocol'] l3protocol = module.params['l3protocol']
asn = module.params['asn']
state = module.params['state'] state = module.params['state']
tenant = module.params['tenant'] tenant = module.params['tenant']
@ -301,6 +303,9 @@ def main():
elif protocol == 'ospf': elif protocol == 'ospf':
child_configs.append( child_configs.append(
dict(ospfExtP=dict(attributes=dict(descr='', nameAlias='')))) dict(ospfExtP=dict(attributes=dict(descr='', nameAlias=''))))
elif protocol == 'eigrp':
child_configs.append(
dict(eigrpExtP=dict(attributes=dict(descr='', nameAlias='', asn=asn))))
elif protocol == 'pim': elif protocol == 'pim':
child_configs.append( child_configs.append(
dict(pimExtP=dict(attributes=dict(descr='', nameAlias='')))) dict(pimExtP=dict(attributes=dict(descr='', nameAlias=''))))