diff --git a/plugins/modules/aci_l3out_interface.py b/plugins/modules/aci_l3out_interface.py index b58ca1315..c0ffa675f 100644 --- a/plugins/modules/aci_l3out_interface.py +++ b/plugins/modules/aci_l3out_interface.py @@ -90,6 +90,11 @@ type: str choices: [ absent, present, query ] default: present + auto_state: + description: + - SVI auto state. + type: str + choices: [ enabled, disabled ] extends_documentation_fragment: - cisco.aci.aci - cisco.aci.annotation @@ -302,6 +307,7 @@ def main(): interface_type=dict(type="str", choices=["l3-port", "sub-interface", "ext-svi"]), mode=dict(type="str", choices=["regular", "native", "untagged"]), encap=dict(type="str"), + auto_state=dict(type="str", choices=["enabled", "disabled"]), ) module = AnsibleModule( @@ -327,6 +333,7 @@ def main(): interface_type = module.params.get("interface_type") mode = module.params.get("mode") encap = module.params.get("encap") + auto_state = module.params.get("auto_state") aci = ACIModule(module) if node_id and "-" in node_id: @@ -383,7 +390,8 @@ def main(): mtu=mtu, ifInstT=interface_type, mode=mode, - encap=encap + encap=encap, + autostate=auto_state ), ) diff --git a/tests/integration/targets/aci_l3out_interface/tasks/main.yml b/tests/integration/targets/aci_l3out_interface/tasks/main.yml index d82fa61e0..c4d6f8495 100644 --- a/tests/integration/targets/aci_l3out_interface/tasks/main.yml +++ b/tests/integration/targets/aci_l3out_interface/tasks/main.yml @@ -133,6 +133,7 @@ addr: 192.168.50.1/27 ipv6_dad: disabled mtu: 1500 + auto_state: disabled state: present register: add_l3out_interface @@ -143,6 +144,7 @@ - add_l3out_interface.current.0.l3extRsPathL3OutAtt.attributes.addr == "192.168.50.1/27" - add_l3out_interface.current.0.l3extRsPathL3OutAtt.attributes.ipv6Dad == "disabled" - add_l3out_interface.current.0.l3extRsPathL3OutAtt.attributes.mtu == "1500" + - add_l3out_interface.current.0.l3extRsPathL3OutAtt.attributes.autostate == "disabled" - add_l3out_interface.current.0.l3extRsPathL3OutAtt.attributes.ifInstT == "l3-port" - add_l3out_interface.current.0.l3extRsPathL3OutAtt.attributes.mode == "regular" - add_l3out_interface.current.0.l3extRsPathL3OutAtt.attributes.annotation == 'orchestrator:ansible' @@ -163,6 +165,7 @@ addr: 192.168.50.1/27 ipv6_dad: disabled mtu: 1500 + auto_state: disabled state: present register: add_l3out_interface_again