summaryrefslogtreecommitdiff
path: root/interface-definitions
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-02-07 13:49:47 +0100
committerChristian Poessinger <christian@poessinger.com>2021-02-07 13:49:47 +0100
commitba6be403072459e42a66e1a818580ae3518ebf44 (patch)
tree9e41fbea11c03ad366f23e9fd1810dfca69e60c7 /interface-definitions
parent801ae95327d3a3dd613ad10b6b64a297320f2437 (diff)
downloadvyos-1x-ba6be403072459e42a66e1a818580ae3518ebf44.tar.gz
vyos-1x-ba6be403072459e42a66e1a818580ae3518ebf44.zip
rip: T2547: xml cleanup so parts can be reused by RIPng
Diffstat (limited to 'interface-definitions')
-rw-r--r--interface-definitions/include/ospf-route-map.xml.i4
-rw-r--r--interface-definitions/include/rip-access-list6.xml.i39
-rw-r--r--interface-definitions/include/rip-default-information.xml.i15
-rw-r--r--interface-definitions/include/rip-default-metric.xml.i14
-rw-r--r--interface-definitions/include/rip-interface.xml.i18
-rw-r--r--interface-definitions/include/rip-prefix-list6.xml.i33
-rw-r--r--interface-definitions/include/rip-redistribute.xml.i13
-rw-r--r--interface-definitions/include/rip-timers.xml.i48
-rw-r--r--interface-definitions/protocols-ospf.xml.in7
-rw-r--r--interface-definitions/protocols-rip.xml.in91
-rw-r--r--interface-definitions/protocols-ripng.xml.in228
11 files changed, 198 insertions, 312 deletions
diff --git a/interface-definitions/include/ospf-route-map.xml.i b/interface-definitions/include/ospf-route-map.xml.i
index 8dc5b37da..943a477c0 100644
--- a/interface-definitions/include/ospf-route-map.xml.i
+++ b/interface-definitions/include/ospf-route-map.xml.i
@@ -2,6 +2,10 @@
<leafNode name="route-map">
<properties>
<help>Route map reference</help>
+ <valueHelp>
+ <format>txt</format>
+ <description>Route map reference</description>
+ </valueHelp>
<completionHelp>
<path>policy route-map</path>
</completionHelp>
diff --git a/interface-definitions/include/rip-access-list6.xml.i b/interface-definitions/include/rip-access-list6.xml.i
new file mode 100644
index 000000000..6a8a37607
--- /dev/null
+++ b/interface-definitions/include/rip-access-list6.xml.i
@@ -0,0 +1,39 @@
+<!-- included start from rip-access-list.xml.i -->
+<node name="access-list">
+ <properties>
+ <help>Access-list</help>
+ </properties>
+ <children>
+ <leafNode name="in">
+ <properties>
+ <help>Access list to apply to input packets</help>
+ <valueHelp>
+ <format>u32</format>
+ <description>Access list to apply to input packets</description>
+ </valueHelp>
+ <completionHelp>
+ <path>policy access-list6</path>
+ </completionHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 0-4294967295"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="out">
+ <properties>
+ <help>Access list to apply to output packets</help>
+ <valueHelp>
+ <format>u32</format>
+ <description>Access list to apply to output packets</description>
+ </valueHelp>
+ <completionHelp>
+ <path>policy access-list6</path>
+ </completionHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 0-4294967295"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ </children>
+</node>
+<!-- included end -->
diff --git a/interface-definitions/include/rip-default-information.xml.i b/interface-definitions/include/rip-default-information.xml.i
new file mode 100644
index 000000000..22a2f6ac7
--- /dev/null
+++ b/interface-definitions/include/rip-default-information.xml.i
@@ -0,0 +1,15 @@
+<!-- included start from rip-default-information.xml.i -->
+<node name="default-information">
+ <properties>
+ <help>Control distribution of default route</help>
+ </properties>
+ <children>
+ <leafNode name="originate">
+ <properties>
+ <help>Distribute a default route</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ </children>
+</node>
+<!-- included end -->
diff --git a/interface-definitions/include/rip-default-metric.xml.i b/interface-definitions/include/rip-default-metric.xml.i
new file mode 100644
index 000000000..a5e6016d6
--- /dev/null
+++ b/interface-definitions/include/rip-default-metric.xml.i
@@ -0,0 +1,14 @@
+<!-- included start from rip-default-metric.xml.i -->
+<leafNode name="default-metric">
+ <properties>
+ <help>Metric of redistributed routes</help>
+ <valueHelp>
+ <format>u32:1-16</format>
+ <description>Default metric</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-16"/>
+ </constraint>
+ </properties>
+</leafNode>
+<!-- included end -->
diff --git a/interface-definitions/include/rip-interface.xml.i b/interface-definitions/include/rip-interface.xml.i
new file mode 100644
index 000000000..f3f473a90
--- /dev/null
+++ b/interface-definitions/include/rip-interface.xml.i
@@ -0,0 +1,18 @@
+<!-- included start from rip-interface.xml.i -->
+<leafNode name="interface">
+ <properties>
+ <help>Interface name</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py</script>
+ </completionHelp>
+ <valueHelp>
+ <format>txt</format>
+ <description>Interface name</description>
+ </valueHelp>
+ <constraint>
+ <validator name="interface-name"/>
+ </constraint>
+ <multi/>
+ </properties>
+</leafNode>
+<!-- included end -->
diff --git a/interface-definitions/include/rip-prefix-list6.xml.i b/interface-definitions/include/rip-prefix-list6.xml.i
new file mode 100644
index 000000000..f73f77d05
--- /dev/null
+++ b/interface-definitions/include/rip-prefix-list6.xml.i
@@ -0,0 +1,33 @@
+<!-- included start from rip-prefix-list.xml.i -->
+<node name="prefix-list">
+ <properties>
+ <help>Prefix-list</help>
+ </properties>
+ <children>
+ <leafNode name="in">
+ <properties>
+ <help>Prefix-list to apply to input packets</help>
+ <valueHelp>
+ <format>txt</format>
+ <description>Prefix-list to apply to input packets</description>
+ </valueHelp>
+ <completionHelp>
+ <path>policy prefix-list6</path>
+ </completionHelp>
+ </properties>
+ </leafNode>
+ <leafNode name="out">
+ <properties>
+ <help>Prefix-list to apply to output packets</help>
+ <valueHelp>
+ <format>txt</format>
+ <description>Prefix-list to apply to output packets</description>
+ </valueHelp>
+ <completionHelp>
+ <path>policy prefix-list6</path>
+ </completionHelp>
+ </properties>
+ </leafNode>
+ </children>
+</node>
+<!-- included end -->
diff --git a/interface-definitions/include/rip-redistribute.xml.i b/interface-definitions/include/rip-redistribute.xml.i
index f9dba3ffe..c7b9d2c09 100644
--- a/interface-definitions/include/rip-redistribute.xml.i
+++ b/interface-definitions/include/rip-redistribute.xml.i
@@ -11,16 +11,5 @@
</constraint>
</properties>
</leafNode>
-<leafNode name="route-map">
- <properties>
- <help>Route map reference</help>
- <valueHelp>
- <format>txt</format>
- <description>Route map reference</description>
- </valueHelp>
- <completionHelp>
- <path>policy route-map</path>
- </completionHelp>
- </properties>
-</leafNode>
+#include <include/ospf-route-map.xml.i>
<!-- included end -->
diff --git a/interface-definitions/include/rip-timers.xml.i b/interface-definitions/include/rip-timers.xml.i
new file mode 100644
index 000000000..5ba19bb06
--- /dev/null
+++ b/interface-definitions/include/rip-timers.xml.i
@@ -0,0 +1,48 @@
+<!-- included start from rip-timers.xml.i -->
+<node name="timers">
+ <properties>
+ <help>RIPng timer values</help>
+ </properties>
+ <children>
+ <leafNode name="garbage-collection">
+ <properties>
+ <help>Garbage collection timer</help>
+ <valueHelp>
+ <format>u32:5-2147483647</format>
+ <description>Garbage colletion time (default 120)</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 5-2147483647"/>
+ </constraint>
+ </properties>
+ <defaultValue>120</defaultValue>
+ </leafNode>
+ <leafNode name="timeout">
+ <properties>
+ <help>Routing information timeout timer</help>
+ <valueHelp>
+ <format>u32:5-2147483647</format>
+ <description>Routing information timeout timer (default 180)</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 5-2147483647"/>
+ </constraint>
+ </properties>
+ <defaultValue>180</defaultValue>
+ </leafNode>
+ <leafNode name="update">
+ <properties>
+ <help>Routing table update timer</help>
+ <valueHelp>
+ <format>u32:5-2147483647</format>
+ <description>Routing table update timer in seconds (default 30)</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 5-2147483647"/>
+ </constraint>
+ </properties>
+ <defaultValue>30</defaultValue>
+ </leafNode>
+ </children>
+</node>
+<!-- included end -->
diff --git a/interface-definitions/protocols-ospf.xml.in b/interface-definitions/protocols-ospf.xml.in
index ee350fb17..a616c0e60 100644
--- a/interface-definitions/protocols-ospf.xml.in
+++ b/interface-definitions/protocols-ospf.xml.in
@@ -404,6 +404,13 @@
<completionHelp>
<script>${vyos_completion_dir}/list_interfaces.py</script>
</completionHelp>
+ <valueHelp>
+ <format>txt</format>
+ <description>Interface name</description>
+ </valueHelp>
+ <constraint>
+ <validator name="interface-name"/>
+ </constraint>
</properties>
<children>
#include <include/ospf-authentication.xml.i>
diff --git a/interface-definitions/protocols-rip.xml.in b/interface-definitions/protocols-rip.xml.in
index 2587e94c3..4ced26d8a 100644
--- a/interface-definitions/protocols-rip.xml.in
+++ b/interface-definitions/protocols-rip.xml.in
@@ -19,31 +19,8 @@
</constraint>
</properties>
</leafNode>
- <node name="default-information">
- <properties>
- <help>Control distribution of default route</help>
- </properties>
- <children>
- <leafNode name="originate">
- <properties>
- <help>Distribute a default route</help>
- <valueless/>
- </properties>
- </leafNode>
- </children>
- </node>
- <leafNode name="default-metric">
- <properties>
- <help>Metric of redistributed routes</help>
- <valueHelp>
- <format>u32:1-16</format>
- <description>Redistributed routes metric</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 1-16"/>
- </constraint>
- </properties>
- </leafNode>
+ #include <include/rip-default-information.xml.i>
+ #include <include/rip-default-metric.xml.i>
<node name="distribute-list">
<properties>
<help>Filter networks in routing updates</help>
@@ -60,6 +37,9 @@
<completionHelp>
<script>${vyos_completion_dir}/list_interfaces.py</script>
</completionHelp>
+ <constraint>
+ <validator name="interface-name"/>
+ </constraint>
</properties>
<children>
#include <include/rip-access-list.xml.i>
@@ -69,19 +49,7 @@
#include <include/rip-prefix-list.xml.i>
</children>
</node>
- <leafNode name="interface">
- <properties>
- <help>Interface name</help>
- <valueHelp>
- <format>txt</format>
- <description>Apply filtering to an interface</description>
- </valueHelp>
- <completionHelp>
- <script>${vyos_completion_dir}/list_interfaces.py</script>
- </completionHelp>
- <multi/>
- </properties>
- </leafNode>
+ #include <include/rip-interface.xml.i>
<leafNode name="neighbor">
<properties>
<help>Neighbor router</help>
@@ -196,52 +164,7 @@
<multi/>
</properties>
</leafNode>
- <node name="timers">
- <properties>
- <help>RIP timer values</help>
- </properties>
- <children>
- <leafNode name="garbage-collection">
- <properties>
- <help>Garbage collection timer (default: 120)</help>
- <valueHelp>
- <format>u32:5-2147483647</format>
- <description>Garbage colletion time</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 5-2147483647"/>
- </constraint>
- </properties>
- <defaultValue>120</defaultValue>
- </leafNode>
- <leafNode name="timeout">
- <properties>
- <help>Routing information timeout timer (default: 180)</help>
- <valueHelp>
- <format>u32:5-2147483647</format>
- <description>Routing information timeout timer</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 5-2147483647"/>
- </constraint>
- </properties>
- <defaultValue>180</defaultValue>
- </leafNode>
- <leafNode name="update">
- <properties>
- <help>Routing table update timer (default: 30)</help>
- <valueHelp>
- <format>u32:5-2147483647</format>
- <description>Routing table update timer in seconds</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 5-2147483647"/>
- </constraint>
- </properties>
- <defaultValue>30</defaultValue>
- </leafNode>
- </children>
- </node>
+ #include <include/rip-timers.xml.i>
</children>
</node>
</children>
diff --git a/interface-definitions/protocols-ripng.xml.in b/interface-definitions/protocols-ripng.xml.in
index 2fca0f5dd..74f720e89 100644
--- a/interface-definitions/protocols-ripng.xml.in
+++ b/interface-definitions/protocols-ripng.xml.in
@@ -20,67 +20,14 @@
<multi/>
</properties>
</leafNode>
- <node name="default-information">
- <properties>
- <help>Control distribution of default route</help>
- </properties>
- <children>
- <leafNode name="originate">
- <properties>
- <help>Distribute a default route</help>
- <valueless/>
- </properties>
- </leafNode>
- </children>
- </node>
- <leafNode name="default-metric">
- <properties>
- <help>Metric of redistributed routes</help>
- <valueHelp>
- <format>u32:1-16</format>
- <description>Default metric</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 1-16"/>
- </constraint>
- </properties>
- </leafNode>
+ #include <include/rip-default-information.xml.i>
+ #include <include/rip-default-metric.xml.i>
<node name="distribute-list">
<properties>
<help>Filter networks in routing updates</help>
</properties>
<children>
- <node name="access-list">
- <properties>
- <help>Access-list</help>
- </properties>
- <children>
- <leafNode name="in">
- <properties>
- <help>Access list to apply to input packets</help>
- <valueHelp>
- <format>u32:1-4294967295</format>
- <description>Access list to apply to input packets</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 1-4294967295"/>
- </constraint>
- </properties>
- </leafNode>
- <leafNode name="out">
- <properties>
- <help>Access list to apply to output packets</help>
- <valueHelp>
- <format>u32:1-4294967295</format>
- <description>Access list to apply to output packets</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 1-4294967295"/>
- </constraint>
- </properties>
- </leafNode>
- </children>
- </node>
+ #include <include/rip-access-list6.xml.i>
<tagNode name="interface">
<properties>
<help>Apply filtering to an interface</help>
@@ -91,118 +38,19 @@
<completionHelp>
<script>${vyos_completion_dir}/list_interfaces.py</script>
</completionHelp>
+ <constraint>
+ <validator name="interface-name"/>
+ </constraint>
</properties>
<children>
- <node name="access-list">
- <properties>
- <help>Access list</help>
- </properties>
- <children>
- <leafNode name="in">
- <properties>
- <help>Access list to apply to input packets</help>
- <valueHelp>
- <format>u32:1-4294967295</format>
- <description>Access list to apply to input packets</description>
- </valueHelp>
- <completionHelp>
- <path>policy access-list6</path>
- </completionHelp>
- </properties>
- </leafNode>
- <leafNode name="out">
- <properties>
- <help>Access list to apply to output packets</help>
- <valueHelp>
- <format>u32:1-4294967295</format>
- <description>Access list to apply to output packets</description>
- </valueHelp>
- <completionHelp>
- <path>policy access-list</path>
- </completionHelp>
- </properties>
- </leafNode>
- </children>
- </node>
- <node name="prefix-list">
- <properties>
- <help>Prefix-list</help>
- </properties>
- <children>
- <leafNode name="in">
- <properties>
- <help>Prefix-list to apply to input packets</help>
- <valueHelp>
- <format>txt</format>
- <description>Prefix-list to apply to input packets</description>
- </valueHelp>
- <completionHelp>
- <path>policy prefix-list6</path>
- </completionHelp>
- </properties>
- </leafNode>
- <leafNode name="out">
- <properties>
- <help>Prefix-list to apply to output packets</help>
- <valueHelp>
- <format>txt</format>
- <description>Prefix-list to apply to output packets</description>
- </valueHelp>
- <completionHelp>
- <path>policy prefix-list6</path>
- </completionHelp>
- </properties>
- </leafNode>
- </children>
- </node>
+ #include <include/rip-access-list6.xml.i>
+ #include <include/rip-prefix-list6.xml.i>
</children>
</tagNode>
- <node name="prefix-list">
- <properties>
- <help>Prefix-list</help>
- </properties>
- <children>
- <leafNode name="in">
- <properties>
- <help>Prefix-list to apply to input packets</help>
- <valueHelp>
- <format>txt</format>
- <description>Prefix-list to apply to input packets</description>
- </valueHelp>
- <completionHelp>
- <path>policy prefix-list</path>
- </completionHelp>
- </properties>
- </leafNode>
- <leafNode name="out">
- <properties>
- <help>Prefix-list to apply to output packets</help>
- <valueHelp>
- <format>txt</format>
- <description>Prefix-list to apply to output packets</description>
- </valueHelp>
- <completionHelp>
- <path>policy prefix-list</path>
- </completionHelp>
- </properties>
- </leafNode>
- </children>
- </node>
+ #include <include/rip-prefix-list6.xml.i>
</children>
</node>
- <leafNode name="interface">
- <properties>
- <help>Interface name</help>
- <valueHelp>
- <format>txt</format>
- <description>Apply filtering to an interface</description>
- </valueHelp>
- <completionHelp>
- <script>${vyos_completion_dir}/list_interfaces.py</script>
- </completionHelp>
- <multi/>
- </properties>
- </leafNode>
+ #include <include/rip-interface.xml.i>
<leafNode name="network">
<properties>
<help>RIPng network</help>
@@ -289,60 +137,8 @@
<multi/>
</properties>
</leafNode>
- <leafNode name="route-map">
- <properties>
- <help>Filter routes installed in local route map</help>
- <completionHelp>
- <path>policy route-map</path>
- </completionHelp>
- </properties>
- </leafNode>
- <node name="timers">
- <properties>
- <help>RIPng timer values</help>
- </properties>
- <children>
- <leafNode name="garbage-collection">
- <properties>
- <help>Garbage collection timer</help>
- <valueHelp>
- <format>u32:5-2147483647</format>
- <description>Garbage colletion time (default 120)</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 5-2147483647"/>
- </constraint>
- </properties>
- <defaultValue>120</defaultValue>
- </leafNode>
- <leafNode name="timeout">
- <properties>
- <help>Routing information timeout timer</help>
- <valueHelp>
- <format>u32:5-2147483647</format>
- <description>Routing information timeout timer (default 180)</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 5-2147483647"/>
- </constraint>
- </properties>
- <defaultValue>180</defaultValue>
- </leafNode>
- <leafNode name="update">
- <properties>
- <help>Routing table update timer</help>
- <valueHelp>
- <format>u32:5-2147483647</format>
- <description>Routing table update timer in seconds (default 30)</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 5-2147483647"/>
- </constraint>
- </properties>
- <defaultValue>30</defaultValue>
- </leafNode>
- </children>
- </node>
+ #include <include/ospf-route-map.xml.i>
+ #include <include/rip-timers.xml.i>
</children>
</node>
</children>