summaryrefslogtreecommitdiff
path: root/src/conf_mode/service_ntp.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/conf_mode/service_ntp.py')
-rwxr-xr-xsrc/conf_mode/service_ntp.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/conf_mode/service_ntp.py b/src/conf_mode/service_ntp.py
index 83880fd72..f7dbc3776 100755
--- a/src/conf_mode/service_ntp.py
+++ b/src/conf_mode/service_ntp.py
@@ -87,6 +87,15 @@ def verify(ntp):
if ipv6_addresses > 1:
raise ConfigError(f'NTP Only admits one ipv6 value for listen-address parameter ')
+ if 'server' in ntp:
+ for host, server in ntp['server'].items():
+ if 'ptp_transport' in server:
+ if 'ptp_transport' not in ntp:
+ raise ConfigError('ptp-transport must be enabled on the service '\
+ f'before it can be used with server {host}')
+ else:
+ break
+
return None
def generate(ntp):