-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NTP] Add NTP extended configuration (#15058)
hld [#1296](sonic-net/SONiC#1296) closes [#1254](sonic-net/SONiC#1254) depends-on [#60](sonic-net/sonic-host-services#60), [#781](sonic-net/sonic-swss-common#781), [#2835](sonic-net/sonic-utilities#2835), [#10749](sonic-net/sonic-mgmt#10749) #### Why I did it To cover the next AIs: * Configure NTP global parameters * Add/remove new NTP servers * Change the configuration for NTP servers * Show NTP status * Show NTP configuration ### How I did it * Add YANG model for a new configuration * Extend configuration templates to support new knobs ### Description for the changelog * Add ability to configure NTP global parameters such as authentication, dhcp, admin state * Change the configuration for NTP servers * Add an ability to show NTP configuration #### Link to config_db schema for YANG module changes [NTP configuration](https://github.com/sonic-net/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md#ntp-and-syslog-servers)
- Loading branch information
Showing
21 changed files
with
888 additions
and
244 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
############################################################################### | ||
# This file was AUTOMATICALLY GENERATED. DO NOT MODIFY. | ||
# Controlled by ntp-config.service | ||
############################################################################### | ||
|
||
{# We can connect only to the servers we trust. Determine those servers -#} | ||
{% set trusted_arr = [] -%} | ||
{% for server in NTP_SERVER if NTP_SERVER[server].trusted == 'yes' and | ||
NTP_SERVER[server].resolve_as -%} | ||
{% set _ = trusted_arr.append(NTP_SERVER[server].resolve_as) -%} | ||
{% endfor -%} | ||
|
||
{# Define authentication keys inventory -#} | ||
{% set trusted_str = ' ' ~ trusted_arr|join(',') -%} | ||
{% for keyid in NTP_KEY if NTP_KEY[keyid].type and NTP_KEY[keyid].value %} | ||
{% set keyval = NTP_KEY[keyid].value | b64decode %} | ||
{{ keyid }} {{ NTP_KEY[keyid].type }} {{ keyval }}{{trusted_str}} | ||
{% endfor -%} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.