Skip to content

Commit

Permalink
When mgmtvrf is enabled, the NTP vrf should be changed to "mgmt"
Browse files Browse the repository at this point in the history
Signed-off-by: irene_pan [email protected]
  • Loading branch information
irene-pan1202 committed Jul 30, 2024
1 parent 91b8f19 commit 55045b1
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 55045b1

Please sign in to comment.