ACI_AEP: Allow toggling of infrastructure vlan (#34840)

* ACI_AEP: Allow toggling of infrastructure vlan

* ACI_DOMAIN: fix accidental 'r' removal
This commit is contained in:
Jacob McGill 2018-01-13 22:20:31 -05:00 committed by ansibot
parent 1c3bba0bdb
commit 3c7e639dde

View file

@ -37,6 +37,7 @@ options:
description: description:
- Enable infrastructure VLAN. - Enable infrastructure VLAN.
- The hypervisor functions of the AEP. - The hypervisor functions of the AEP.
- C(no) will disable the infrastructure vlan if it is enabled.
type: bool type: bool
default: 'no' default: 'no'
aliases: [ infrastructure_vlan ] aliases: [ infrastructure_vlan ]
@ -97,7 +98,7 @@ def main():
argument_spec.update( argument_spec.update(
aep=dict(type='str', aliases=['name', 'aep_name']), # not required for querying all AEPs aep=dict(type='str', aliases=['name', 'aep_name']), # not required for querying all AEPs
description=dict(type='str', aliases=['descr']), 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']), state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
) )
@ -117,6 +118,8 @@ def main():
if infra_vlan: if infra_vlan:
child_configs = [dict(infraProvAcc=dict(attributes=dict(name='provacc')))] 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: else:
child_configs = [] child_configs = []