Skip to content

Commit

Permalink
Merge pull request #12 from irene-pan1202/ntp_mgmtvrf
Browse files Browse the repository at this point in the history
When mgmtvrf is enabled, the NTP vrf should be changed to "mgmt"
  • Loading branch information
chenkelly authored Jul 30, 2024
2 parents 91b8f19 + 55045b1 commit 0029fe5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3135,6 +3135,7 @@ def vrf_add_management_vrf(config_db):
return None
try:
config_db.mod_entry('MGMT_VRF_CONFIG', "vrf_global", {"mgmtVrfEnabled": "true"})
config_db.mod_entry('NTP', "global", {"vrf": "mgmt"})
except ValueError as e:
ctx = click.get_current_context()
ctx.fail("Invalid ConfigDB. Error: {}".format(e))
Expand All @@ -3149,6 +3150,7 @@ def vrf_delete_management_vrf(config_db):
return None
try:
config_db.mod_entry('MGMT_VRF_CONFIG', "vrf_global", {"mgmtVrfEnabled": "false"})
config_db.mod_entry('NTP', "global", {"vrf": "default"})
except ValueError as e:
ctx = click.get_current_context()
ctx.fail("Invalid ConfigDB. Error: {}".format(e))
Expand Down

0 comments on commit 0029fe5

Please sign in to comment.