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

aci_aep: Add infrastructure_vlan support (infra:ProvAcc) (#33996)

This is a needed enhancement.
This commit is contained in:
Dag Wieers 2018-01-12 12:20:20 +01:00 committed by GitHub
parent 393c5bea67
commit d23d290be8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,12 +13,12 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
DOCUMENTATION = r'''
---
module: aci_aep
short_description: Manage attachable Access Entity Profile (AEP) on Cisco ACI fabrics (infra:AttEntityP)
short_description: Manage attachable Access Entity Profile (AEP) on Cisco ACI fabrics (infra:AttEntityP|infra:ProvAcc)
description:
- Connect to external virtual and physical domains by using
attachable Access Entity Profiles (AEP) on Cisco ACI fabrics.
- More information from the internal APIC class
I(infra:AttEntityP) at U(https://developer.cisco.com/media/mim-ref/MO-infraAttEntityP.html).
- More information from the internal APIC classes I(infra:AttEntityP) and I(infra:ProvAcc)
at U(https://developer.cisco.com/site/aci/docs/apis/apic-mim-ref/).
author:
- Swetha Chunduri (@schunduri)
version_added: '2.4'
@ -33,6 +33,14 @@ options:
description:
description:
- Description for the AEP.
infra_vlan:
description:
- Enable infrastructure VLAN.
- The hypervisor functions of the AEP.
type: bool
default: 'no'
aliases: [ infrastructure_vlan ]
version_added: '2.5'
state:
description:
- Use C(present) or C(absent) for adding or removing.
@ -89,6 +97,7 @@ def main():
argument_spec.update(
aep=dict(type='str', aliases=['name', 'aep_name']), # not required for querying all AEPs
description=dict(type='str', aliases=['descr']),
infra_vlan=dict(type='bool', default=False, aliases=['infrastructure_vlan']),
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
)
@ -103,8 +112,14 @@ def main():
aep = module.params['aep']
description = module.params['description']
infra_vlan = module.params['infra_vlan']
state = module.params['state']
if infra_vlan:
child_configs = [dict(infraProvAcc=dict(attributes=dict(name='provacc')))]
else:
child_configs = []
aci = ACIModule(module)
aci.construct_url(
root_class=dict(
@ -124,6 +139,7 @@ def main():
name=aep,
descr=description,
),
child_configs=child_configs,
)
# Generate config diff which will be used as POST request body