Skip to content

Commit 62fcd77

Browse files
authored
Configure NTP according to extended configuration (#2835)
- What I did Fix NTP CLI according to new extended configuration abilities - How I did it Additionally configure association_type and resolve_as when adding new NTP servers. - How to verify it 1. Add a new server 2. Show NTP sync show ntp. It should show you are sync with new server 3. Delete NTP server 4. Show NTP sync show ntp. It should show you are unsync Signed-off-by: Yevhen Fastiuk <[email protected]>
1 parent ced0940 commit 62fcd77

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

config/main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6581,7 +6581,9 @@ def add_ntp_server(ctx, ntp_ip_address):
65816581
return
65826582
else:
65836583
try:
6584-
db.set_entry('NTP_SERVER', ntp_ip_address, {'NULL': 'NULL'})
6584+
db.set_entry('NTP_SERVER', ntp_ip_address,
6585+
{'resolve_as': ntp_ip_address,
6586+
'association_type': 'server'})
65856587
except ValueError as e:
65866588
ctx.fail("Invalid ConfigDB. Error: {}".format(e))
65876589
click.echo("NTP server {} added to configuration".format(ntp_ip_address))

0 commit comments

Comments
 (0)