aci_aep: Add infrastructure_vlan support (infra:ProvAcc) (#33996)
This is a needed enhancement.
This commit is contained in:
parent
393c5bea67
commit
d23d290be8
1 changed files with 19 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue