Skip to content

Commit

Permalink
Configure NTP according to extended configuration
Browse files Browse the repository at this point in the history
Signed-off-by: Yevhen Fastiuk <[email protected]>
  • Loading branch information
fastiuk committed Jul 4, 2023
1 parent 6b8ee47 commit 94946ac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion config/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6515,7 +6515,9 @@ def add_ntp_server(ctx, ntp_ip_address):
return
else:
try:
db.set_entry('NTP_SERVER', ntp_ip_address, {'NULL': 'NULL'})
db.set_entry('NTP_SERVER', ntp_ip_address,
{'resolve_as': ntp_ip_address,
'association_type': 'server'})
except ValueError as e:
ctx.fail("Invalid ConfigDB. Error: {}".format(e))
click.echo("NTP server {} added to configuration".format(ntp_ip_address))
Expand Down

0 comments on commit 94946ac

Please sign in to comment.