Skip to content

Commit

Permalink
vrf: Add rd parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
alagoutte committed Apr 5, 2023
1 parent 31fa1c7 commit 9108101
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/modules/aoscx_vrf.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
def main():
module_args = dict(
name=dict(type="str", required=True),
rd=dict(type="str", required=False),
state=dict(default="create", choices=["create", "delete"]),
)
if USE_PYAOSCX_SDK:
Expand All @@ -87,6 +88,7 @@ def main():

# Set Variables
vrf_name = ansible_module.params["name"]
rd = ansible_module.params["rd"]
state = ansible_module.params["state"]

result = dict(changed=False)
Expand All @@ -109,6 +111,8 @@ def main():
if state == "create":
# Create VRF with incoming attributes
vrf = device.vrf(vrf_name)
vrf.rd = rd
vrf.apply()
# Changed
result["changed"] = vrf.was_modified()

Expand Down

0 comments on commit 9108101

Please sign in to comment.