From 67f51b67416c84c23086f997954be1d51502637d Mon Sep 17 00:00:00 2001 From: Lucas Christian Date: Mon, 25 Nov 2024 22:01:34 -0800 Subject: T6630: ntp: fix timestamp nested under ptp --- data/templates/chrony/chrony.conf.j2 | 4 +- interface-definitions/service_ntp.xml.in | 96 +++++++++++++++---------------- smoketest/scripts/cli/test_service_ntp.py | 2 +- 3 files changed, 51 insertions(+), 51 deletions(-) diff --git a/data/templates/chrony/chrony.conf.j2 b/data/templates/chrony/chrony.conf.j2 index 2838f5524..cc80e4d64 100644 --- a/data/templates/chrony/chrony.conf.j2 +++ b/data/templates/chrony/chrony.conf.j2 @@ -67,9 +67,9 @@ binddevice {{ interface }} {% endif %} {% endif %} -{% if ptp.timestamp.interface is vyos_defined %} +{% if timestamp.interface is vyos_defined %} # Enable hardware timestamping on the specified interfaces -{% for iface, iface_config in ptp.timestamp.interface.items() %} +{% for iface, iface_config in timestamp.interface.items() %} {% if iface == "all" %} {% set iface = "*" %} {% endif %} diff --git a/interface-definitions/service_ntp.xml.in b/interface-definitions/service_ntp.xml.in index 5dc0cd295..c31b572bd 100644 --- a/interface-definitions/service_ntp.xml.in +++ b/interface-definitions/service_ntp.xml.in @@ -13,72 +13,72 @@ #include #include #include - + - Enable Precision Time Protocol (PTP) transport + Enable timestamping of packets in the NIC hardware - #include - - 319 - - + - Enable timestamping of packets in the NIC hardware + Interface to enable timestamping on + + + all + + + all + Select all interfaces + + + txt + Interface name + + + #include + all + - + - Interface to enable timestamping on + Selects which inbound packets are timestamped by the NIC - - all + all ntp ptp none all - Select all interfaces + All packets are timestamped - txt - Interface name + ntp + Only NTP packets are timestamped + + + ptp + Only PTP or NTP packets using the PTP transport are timestamped + + + none + No packet is timestamped - #include - all + (all|ntp|ptp|none) - - - - Selects which inbound packets are timestamped by the NIC - - all ntp ptp none - - - all - All packets are timestamped - - - ntp - Only NTP packets are timestamped - - - ptp - Only PTP or NTP packets using the PTP transport are timestamped - - - none - No packet is timestamped - - - (all|ntp|ptp|none) - - - - - + - + + + + + + Enable Precision Time Protocol (PTP) transport + + + #include + + 319 + diff --git a/smoketest/scripts/cli/test_service_ntp.py b/smoketest/scripts/cli/test_service_ntp.py index 07af4f5eb..469d44eaa 100755 --- a/smoketest/scripts/cli/test_service_ntp.py +++ b/smoketest/scripts/cli/test_service_ntp.py @@ -203,7 +203,7 @@ class TestSystemNTP(VyOSUnitTestSHIM.TestCase): self.cli_set(base_path + ['server', server, 'ptp']) self.cli_set(base_path + ['ptp', 'port', ptp_port]) - self.cli_set(base_path + ['ptp', 'timestamp', 'interface', 'all']) + self.cli_set(base_path + ['timestamp', 'interface', 'all']) # commit changes self.cli_commit() -- cgit v1.2.3