Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions config/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3460,6 +3460,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"})
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you modifying NTP global config table while updating MGMT_VRF_CONFIG table? IMO, Better to have new CLI to set the VRF in NTP Global table so that user will have the flexibility to use the NTP in non-default VRF in presence of MGMT-VRF.

except ValueError as e:
ctx = click.get_current_context()
ctx.fail("Invalid ConfigDB. Error: {}".format(e))
Expand All @@ -3474,6 +3475,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