summaryrefslogtreecommitdiff
path: root/op-mode-definitions/ntp.xml.in
diff options
context:
space:
mode:
authorGinko <152240782+Giggum@users.noreply.github.com>2024-04-14 03:15:52 -0400
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2024-05-02 05:46:18 +0000
commite2f0643d7b2a5b7f2f4774965c897b50b2427715 (patch)
treedb3a76b73c875de5b49014b9384d9435dc66b377 /op-mode-definitions/ntp.xml.in
parente019155e3d7a1383f480f2bdf4c7e17d807fc7db (diff)
downloadvyos-1x-e2f0643d7b2a5b7f2f4774965c897b50b2427715.tar.gz
vyos-1x-e2f0643d7b2a5b7f2f4774965c897b50b2427715.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 (cherry picked from commit d2a82c30695c2f4265dc5ca2165d27d5aa3e2cef)
Diffstat (limited to 'op-mode-definitions/ntp.xml.in')
-rw-r--r--op-mode-definitions/ntp.xml.in16
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>