From 3c7e639dde114ecf193043e24129a2bf988889a1 Mon Sep 17 00:00:00 2001 From: Jacob McGill Date: Sat, 13 Jan 2018 22:20:31 -0500 Subject: [PATCH] ACI_AEP: Allow toggling of infrastructure vlan (#34840) * ACI_AEP: Allow toggling of infrastructure vlan * ACI_DOMAIN: fix accidental 'r' removal --- lib/ansible/modules/network/aci/aci_aep.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/network/aci/aci_aep.py b/lib/ansible/modules/network/aci/aci_aep.py index 422e22ac2bb..dc20fd266d2 100644 --- a/lib/ansible/modules/network/aci/aci_aep.py +++ b/lib/ansible/modules/network/aci/aci_aep.py @@ -37,6 +37,7 @@ options: description: - Enable infrastructure VLAN. - The hypervisor functions of the AEP. + - C(no) will disable the infrastructure vlan if it is enabled. type: bool default: 'no' aliases: [ infrastructure_vlan ] @@ -97,7 +98,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']), + infra_vlan=dict(type='bool', aliases=['infrastructure_vlan']), state=dict(type='str', default='present', choices=['absent', 'present', 'query']), ) @@ -117,6 +118,8 @@ def main(): if infra_vlan: child_configs = [dict(infraProvAcc=dict(attributes=dict(name='provacc')))] + elif infra_vlan is False: + child_configs = [dict(infraProvAcc=dict(attributes=dict(name='provacc', status='deleted')))] else: child_configs = []