diff options
author | Ginko <152240782+Giggum@users.noreply.github.com> | 2024-04-14 03:15:52 -0400 |
---|---|---|
committer | Ginko <152240782+Giggum@users.noreply.github.com> | 2024-04-22 21:13:45 -0400 |
commit | d2a82c30695c2f4265dc5ca2165d27d5aa3e2cef (patch) | |
tree | 5d93d550b435c62a732326207e062eee3811bf28 /op-mode-definitions/ntp.xml.in | |
parent | a6ccf358c7148781be438c4a2f89468ebfe5d48f (diff) | |
download | vyos-1x-d2a82c30695c2f4265dc5ca2165d27d5aa3e2cef.tar.gz vyos-1x-d2a82c30695c2f4265dc5ca2165d27d5aa3e2cef.zip |
ntp: T4909: Rewrite NTP op mode in new format
ntp: T4909: Rewrite NTP op mode in new format
Adapts ntp.xml.in to reference new ntp.py file
Add ntp.py
Adds a check to ntp.py to verify if the ntp service is configured
Adds raw mode to ntp.py
For raw output, replaces the original method of parsing the command line output FROM re.split+regex TO csv.reader.
Separates chrony commands into equivalent functions show_tracking, show_sources, source_sourcestats and show_activity
Revises the names of raw dictionary keys variables to be lowercase
Corrects a comment typo and renames function name used for raw mode
Diffstat (limited to 'op-mode-definitions/ntp.xml.in')
-rw-r--r-- | op-mode-definitions/ntp.xml.in | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/op-mode-definitions/ntp.xml.in b/op-mode-definitions/ntp.xml.in index b8d0c43ec..17250a45e 100644 --- a/op-mode-definitions/ntp.xml.in +++ b/op-mode-definitions/ntp.xml.in @@ -6,13 +6,25 @@ <properties> <help>Show peer status of NTP daemon</help> </properties> - <command>${vyos_op_scripts_dir}/show_ntp.sh --sourcestats</command> + <command>${vyos_op_scripts_dir}/ntp.py show_sourcestats</command> <children> + <node name="activity"> + <properties> + <help>Report the number of servers and peers that are online and offline</help> + </properties> + <command>${vyos_op_scripts_dir}/ntp.py show_activity</command> + </node> + <node name="sources"> + <properties> + <help>Show information about the current time sources being accessed</help> + </properties> + <command>${vyos_op_scripts_dir}/ntp.py show_sources</command> + </node> <node name="system"> <properties> <help>Show parameters about the system clock performance</help> </properties> - <command>${vyos_op_scripts_dir}/show_ntp.sh --tracking</command> + <command>${vyos_op_scripts_dir}/ntp.py show_tracking</command> </node> </children> </node> |