summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-04-01 10:51:09 +0200
committerChristian Breunig <christian@breunig.cc>2023-04-01 10:51:09 +0200
commit0993d9ed9fbbd2110a4911d10fc0b42c7ee8856e (patch)
tree7dfac3240766972b436e4d2324ccb977d02bfd14
parent960b635f98b3fcad3d8890e6b7651519a85dabeb (diff)
downloadvyos-1x-0993d9ed9fbbd2110a4911d10fc0b42c7ee8856e.tar.gz
vyos-1x-0993d9ed9fbbd2110a4911d10fc0b42c7ee8856e.zip
xml: allow-client: T5126: re-use new building block also for NTP service
-rw-r--r--interface-definitions/include/allow-client.xml.i68
-rw-r--r--interface-definitions/ntp.xml.in34
2 files changed, 36 insertions, 66 deletions
diff --git a/interface-definitions/include/allow-client.xml.i b/interface-definitions/include/allow-client.xml.i
index 03a0b3ff8..1b06e2c17 100644
--- a/interface-definitions/include/allow-client.xml.i
+++ b/interface-definitions/include/allow-client.xml.i
@@ -1,33 +1,35 @@
- <node name="allow-client">
- <properties>
- <help>Restrict to allowed IP client addresses</help>
- </properties>
- <children>
- <leafNode name="address">
- <properties>
- <help>Allowed IP client addresses</help>
- <valueHelp>
- <format>ipv4</format>
- <description>IPv4 address</description>
- </valueHelp>
- <valueHelp>
- <format>ipv6</format>
- <description>IPv6 address</description>
- </valueHelp>
- <valueHelp>
- <format>ipv4net</format>
- <description>IPv4 address and prefix length</description>
- </valueHelp>
- <valueHelp>
- <format>ipv6net</format>
- <description>IPv6 address and prefix length</description>
- </valueHelp>
- <constraint>
- <validator name="ip-address"/>
- <validator name="ip-cidr"/>
- </constraint>
- <multi/>
- </properties>
- </leafNode>
- </children>
- </node>
+<!-- include start from allow-client.xml.i -->
+<node name="allow-client">
+ <properties>
+ <help>Restrict to allowed IP client addresses</help>
+ </properties>
+ <children>
+ <leafNode name="address">
+ <properties>
+ <help>Allowed IP client addresses</help>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>IPv4 address</description>
+ </valueHelp>
+ <valueHelp>
+ <format>ipv6</format>
+ <description>IPv6 address</description>
+ </valueHelp>
+ <valueHelp>
+ <format>ipv4net</format>
+ <description>IPv4 address and prefix length</description>
+ </valueHelp>
+ <valueHelp>
+ <format>ipv6net</format>
+ <description>IPv6 address and prefix length</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ip-address"/>
+ <validator name="ip-cidr"/>
+ </constraint>
+ <multi/>
+ </properties>
+ </leafNode>
+ </children>
+</node>
+<!-- include end -->
diff --git a/interface-definitions/ntp.xml.in b/interface-definitions/ntp.xml.in
index 287401ed6..558204a06 100644
--- a/interface-definitions/ntp.xml.in
+++ b/interface-definitions/ntp.xml.in
@@ -57,39 +57,7 @@
</leafNode>
</children>
</tagNode>
- <node name="allow-client">
- <properties>
- <help>Specify NTP clients allowed to access the server</help>
- </properties>
- <children>
- <leafNode name="address">
- <properties>
- <help>IP address</help>
- <valueHelp>
- <format>ipv4</format>
- <description>Allowed IPv4 address</description>
- </valueHelp>
- <valueHelp>
- <format>ipv4net</format>
- <description>Allowed IPv4 prefix</description>
- </valueHelp>
- <valueHelp>
- <format>ipv6</format>
- <description>Allowed IPv6 address</description>
- </valueHelp>
- <valueHelp>
- <format>ipv6net</format>
- <description>Allowed IPv6 prefix</description>
- </valueHelp>
- <multi/>
- <constraint>
- <validator name="ip-address"/>
- <validator name="ip-prefix"/>
- </constraint>
- </properties>
- </leafNode>
- </children>
- </node>
+ #include <include/allow-client.xml.i>
#include <include/generic-interface-multi.xml.i>
#include <include/listen-address.xml.i>
#include <include/interface/vrf.xml.i>