summaryrefslogtreecommitdiff
path: root/interface-definitions
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2021-01-23 17:18:14 +0700
committerGitHub <noreply@github.com>2021-01-23 17:18:14 +0700
commit7a7fdc561f0c1dee994db4b3d616da2631cab9f4 (patch)
treeff838b1c170d656048d6b4ab5932dbe59024b0b2 /interface-definitions
parented482498b0baffe0d0c6aecefebb806f09c1f0a7 (diff)
parent4ed4d822cfd1d1aad19982783066a5e2431889b4 (diff)
downloadvyos-1x-7a7fdc561f0c1dee994db4b3d616da2631cab9f4.tar.gz
vyos-1x-7a7fdc561f0c1dee994db4b3d616da2631cab9f4.zip
Merge pull request #694 from c-po/t3236-ospf
T3236: Rewrite of OSPF in XML and Python notation
Diffstat (limited to 'interface-definitions')
-rw-r--r--interface-definitions/include/ospf-metric-type.xml.i15
-rw-r--r--interface-definitions/include/ospf-metric.xml.i21
-rw-r--r--interface-definitions/include/ospf-route-map.xml.i10
-rw-r--r--interface-definitions/protocols-ospf.xml.in158
4 files changed, 112 insertions, 92 deletions
diff --git a/interface-definitions/include/ospf-metric-type.xml.i b/interface-definitions/include/ospf-metric-type.xml.i
new file mode 100644
index 000000000..50f11960c
--- /dev/null
+++ b/interface-definitions/include/ospf-metric-type.xml.i
@@ -0,0 +1,15 @@
+<!-- included start from ospf-metric-type.xml.i -->
+<leafNode name="metric-type">
+ <properties>
+ <help>OSPF metric type for default routes (default: 2)</help>
+ <valueHelp>
+ <format>u32:1-2</format>
+ <description>Metric type for default routes</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-2"/>
+ </constraint>
+ </properties>
+ <defaultValue>2</defaultValue>
+</leafNode>
+<!-- included end -->
diff --git a/interface-definitions/include/ospf-metric.xml.i b/interface-definitions/include/ospf-metric.xml.i
index 771fda02d..3ce12e877 100644
--- a/interface-definitions/include/ospf-metric.xml.i
+++ b/interface-definitions/include/ospf-metric.xml.i
@@ -11,23 +11,4 @@
</constraint>
</properties>
</leafNode>
-<leafNode name="metric-type">
- <properties>
- <help>OSPF metric type for default routes</help>
- <valueHelp>
- <format>u32:1-2</format>
- <description>Metric type for default routes (default 2)</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 1-2"/>
- </constraint>
- </properties>
-</leafNode>
-<leafNode name="route-map">
- <properties>
- <help>Route map reference</help>
- <completionHelp>
- <path>policy route-map</path>
- </completionHelp>
- </properties>
-</leafNode>
+<!-- included end -->
diff --git a/interface-definitions/include/ospf-route-map.xml.i b/interface-definitions/include/ospf-route-map.xml.i
new file mode 100644
index 000000000..8dc5b37da
--- /dev/null
+++ b/interface-definitions/include/ospf-route-map.xml.i
@@ -0,0 +1,10 @@
+<!-- included start from ospf-route-map.xml.i -->
+<leafNode name="route-map">
+ <properties>
+ <help>Route map reference</help>
+ <completionHelp>
+ <path>policy route-map</path>
+ </completionHelp>
+ </properties>
+</leafNode>
+<!-- included end -->
diff --git a/interface-definitions/protocols-ospf.xml.in b/interface-definitions/protocols-ospf.xml.in
index 4d5b84be0..074d0db63 100644
--- a/interface-definitions/protocols-ospf.xml.in
+++ b/interface-definitions/protocols-ospf.xml.in
@@ -3,15 +3,18 @@
<interfaceDefinition>
<node name="protocols">
<children>
- <node name="nospf" owner="${vyos_conf_scripts_dir}/protocols_ospf.py">
+ <node name="ospf" owner="${vyos_conf_scripts_dir}/protocols_ospf.py">
<properties>
- <help>Open Shortest Path First protocol (OSPF) parameters</help>
+ <help>Open Shortest Path First (OSPF)</help>
<priority>620</priority>
</properties>
<children>
<tagNode name="access-list">
<properties>
<help>Access list to filter networks in routing updates</help>
+ <completionHelp>
+ <path>policy access-list</path>
+ </completionHelp>
<valueHelp>
<format>u32</format>
<description>Access-list number</description>
@@ -109,7 +112,7 @@
</leafNode>
<leafNode name="translate">
<properties>
- <help>Nssa-abr</help>
+ <help>Configure NSSA-ABR (default: candidate)</help>
<completionHelp>
<list>always candidate never</list>
</completionHelp>
@@ -129,6 +132,7 @@
<regex>^(always|candidate|never)$</regex>
</constraint>
</properties>
+ <defaultValue>candidate</defaultValue>
</leafNode>
</children>
</node>
@@ -194,6 +198,13 @@
<tagNode name="range">
<properties>
<help>Summarize routes matching prefix (border routers only)</help>
+ <valueHelp>
+ <format>ipv4net</format>
+ <description>Area range prefix</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-prefix"/>
+ </constraint>
</properties>
<children>
<leafNode name="cost">
@@ -254,6 +265,14 @@
<tagNode name="virtual-link">
<properties>
<help>Virtual link</help>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>OSPF area in dotted decimal notation</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 0-4294967295"/>
+ <validator name="ip-address"/>
+ </constraint>
</properties>
<children>
<node name="authentication">
@@ -301,7 +320,7 @@
</node>
<leafNode name="dead-interval">
<properties>
- <help>Interval after which a neighbor is declared dead</help>
+ <help>Interval after which a neighbor is declared dead (default: 40)</help>
<valueHelp>
<format>u32:1-65535</format>
<description>Neighbor dead interval (seconds)</description>
@@ -310,10 +329,11 @@
<validator name="numeric" argument="--range 1-65535"/>
</constraint>
</properties>
+ <defaultValue>40</defaultValue>
</leafNode>
<leafNode name="hello-interval">
<properties>
- <help>Interval between hello packets</help>
+ <help>Interval between hello packets (default: 10)</help>
<valueHelp>
<format>u32:1-65535</format>
<description>Hello interval (seconds)</description>
@@ -322,10 +342,11 @@
<validator name="numeric" argument="--range 1-65535"/>
</constraint>
</properties>
+ <defaultValue>10</defaultValue>
</leafNode>
<leafNode name="retransmit-interval">
<properties>
- <help>Interval between retransmitting lost link state advertisements</help>
+ <help>Interval between retransmitting lost link state advertisements (default: 5)</help>
<valueHelp>
<format>u32:1-65535</format>
<description>Retransmit interval (seconds)</description>
@@ -334,10 +355,11 @@
<validator name="numeric" argument="--range 1-65535"/>
</constraint>
</properties>
+ <defaultValue>5</defaultValue>
</leafNode>
<leafNode name="transmit-delay">
<properties>
- <help>Link state transmit delay</help>
+ <help>Link state transmit delay (default: 1)</help>
<valueHelp>
<format>u32:1-65535</format>
<description>Link state transmit delay (seconds)</description>
@@ -346,6 +368,7 @@
<validator name="numeric" argument="--range 1-65535"/>
</constraint>
</properties>
+ <defaultValue>1</defaultValue>
</leafNode>
</children>
</tagNode>
@@ -353,7 +376,7 @@
</tagNode>
<node name="auto-cost">
<properties>
- <help>Calculate OSPF interface cost according to bandwidth</help>
+ <help>Calculate OSPF interface cost according to bandwidth (default: 100)</help>
</properties>
<children>
<leafNode name="reference-bandwidth">
@@ -361,12 +384,13 @@
<help>Reference bandwidth method to assign OSPF cost</help>
<valueHelp>
<format>u32:1-4294967</format>
- <description>Reference bandwidth cost in Mbits/sec (default 100)</description>
+ <description>Reference bandwidth cost in Mbits/sec</description>
</valueHelp>
<constraint>
<validator name="numeric" argument="--range 1-4294967"/>
</constraint>
</properties>
+ <defaultValue>100</defaultValue>
</leafNode>
</children>
</node>
@@ -386,38 +410,9 @@
<valueless/>
</properties>
</leafNode>
- <leafNode name="metric">
- <properties>
- <help>OSPF default metric</help>
- <valueHelp>
- <format>u32:0-16777214</format>
- <description>Default metric</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 0-16777214"/>
- </constraint>
- </properties>
- </leafNode>
- <leafNode name="metric-type">
- <properties>
- <help>OSPF metric type for default routes</help>
- <valueHelp>
- <format>u32:1-2</format>
- <description>Metric type for default routes (default 2)</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 1-2"/>
- </constraint>
- </properties>
- </leafNode>
- <leafNode name="route-map">
- <properties>
- <help>Route map reference</help>
- <completionHelp>
- <path>policy route-map</path>
- </completionHelp>
- </properties>
- </leafNode>
+ #include <include/ospf-metric.xml.i>
+ #include <include/ospf-metric-type.xml.i>
+ #include <include/ospf-route-map.xml.i>
</children>
</node>
</children>
@@ -529,11 +524,11 @@
<properties>
<help>Advertise stub-router prior to full shutdown of OSPF</help>
<valueHelp>
- <format>u32:5-86400</format>
+ <format>u32:5-100</format>
<description>Time (seconds) to advertise self as stub-router</description>
</valueHelp>
<constraint>
- <validator name="numeric" argument="--range 5-86400"/>
+ <validator name="numeric" argument="--range 5-100"/>
</constraint>
</properties>
</leafNode>
@@ -575,41 +570,47 @@
<validator name="ipv4-address"/>
</constraint>
</properties>
+ <defaultValue>0.0.0.0</defaultValue>
</leafNode>
</children>
</node>
<tagNode name="neighbor">
<properties>
- <help>Neighbor IP address</help>
+ <help>Specify neighbor router</help>
<valueHelp>
<format>ipv4</format>
<description>Neighbor IP address</description>
</valueHelp>
+ <constraint>
+ <validator name="ipv4-address"/>
+ </constraint>
</properties>
<children>
<leafNode name="poll-interval">
<properties>
- <help>Dead neighbor polling interval</help>
+ <help>Dead neighbor polling interval (default: 60)</help>
<valueHelp>
<format>u32:1-65535</format>
- <description>Seconds between dead neighbor polling interval (default 60)</description>
+ <description>Seconds between dead neighbor polling interval</description>
</valueHelp>
<constraint>
<validator name="numeric" argument="--range 1-65535"/>
</constraint>
</properties>
+ <defaultValue>60</defaultValue>
</leafNode>
<leafNode name="priority">
<properties>
- <help>Neighbor priority in seconds</help>
+ <help>Neighbor priority in seconds (default: 0)</help>
<valueHelp>
<format>u32:0-255</format>
- <description>Neighbor priority (default 0)</description>
+ <description>Neighbor priority</description>
</valueHelp>
<constraint>
<validator name="numeric" argument="--range 0-255"/>
</constraint>
</properties>
+ <defaultValue>0</defaultValue>
</leafNode>
</children>
</tagNode>
@@ -620,7 +621,7 @@
<children>
<leafNode name="abr-type">
<properties>
- <help>OSPF ABR type</help>
+ <help>OSPF ABR type (default: cisco)</help>
<completionHelp>
<list>cisco ibm shortcut standard</list>
</completionHelp>
@@ -644,6 +645,7 @@
<regex>^(cisco|ibm|shortcut|standard)$</regex>
</constraint>
</properties>
+ <defaultValue>cisco</defaultValue>
</leafNode>
<leafNode name="opaque-lsa">
<properties>
@@ -674,31 +676,37 @@
<leafNode name="passive-interface">
<properties>
<help>Suppress routing updates on an interface</help>
+ <completionHelp>
+ <list>default</list>
+ <script>${vyos_completion_dir}/list_interfaces.py</script>
+ </completionHelp>
<valueHelp>
- <format>&lt;interface&gt;</format>
+ <format>txt</format>
<description>Interface to be passive (i.e. suppress routing updates)</description>
</valueHelp>
<valueHelp>
<format>default</format>
<description>Default to suppress routing updates on all interfaces</description>
</valueHelp>
- <completionHelp>
- <list>default</list>
- <script>${vyos_completion_dir}/list_interfaces.py</script>
- </completionHelp>
+ <constraint>
+ <regex>^(br|bond|dum|en|eth|gnv|peth|tun|vti|vxlan|wg|wlan)[0-9]+|lo|default$</regex>
+ </constraint>
<multi/>
</properties>
</leafNode>
<leafNode name="passive-interface-exclude">
<properties>
<help>Interface to exclude when using 'passive-interface default'</help>
- <valueHelp>
- <format>&lt;interface&gt;</format>
- <description>Interface to be passive (i.e. suppress routing updates)</description>
- </valueHelp>
<completionHelp>
<script>${vyos_completion_dir}/list_interfaces.py</script>
</completionHelp>
+ <valueHelp>
+ <format>txt</format>
+ <description>Interface to be passive (i.e. suppress routing updates)</description>
+ </valueHelp>
+ <constraint>
+ <regex>^(br|bond|dum|en|eth|gnv|peth|tun|vti|vxlan|wg|wlan)[0-9]+|lo$</regex>
+ </constraint>
<multi/>
</properties>
</leafNode>
@@ -713,6 +721,8 @@
</properties>
<children>
#include <include/ospf-metric.xml.i>
+ #include <include/ospf-metric-type.xml.i>
+ #include <include/ospf-route-map.xml.i>
</children>
</node>
<node name="connected">
@@ -721,6 +731,8 @@
</properties>
<children>
#include <include/ospf-metric.xml.i>
+ #include <include/ospf-metric-type.xml.i>
+ #include <include/ospf-route-map.xml.i>
</children>
</node>
<node name="kernel">
@@ -729,6 +741,8 @@
</properties>
<children>
#include <include/ospf-metric.xml.i>
+ #include <include/ospf-metric-type.xml.i>
+ #include <include/ospf-route-map.xml.i>
</children>
</node>
<node name="rip">
@@ -737,6 +751,8 @@
</properties>
<children>
#include <include/ospf-metric.xml.i>
+ #include <include/ospf-metric-type.xml.i>
+ #include <include/ospf-route-map.xml.i>
</children>
</node>
<node name="static">
@@ -745,6 +761,8 @@
</properties>
<children>
#include <include/ospf-metric.xml.i>
+ #include <include/ospf-metric-type.xml.i>
+ #include <include/ospf-route-map.xml.i>
</children>
</node>
</children>
@@ -768,14 +786,7 @@
</leafNode>
</children>
</node>
- <leafNode name="route-map">
- <properties>
- <help>Filter routes installed in local route map</help>
- <completionHelp>
- <path>policy route-map</path>
- </completionHelp>
- </properties>
- </leafNode>
+ #include <include/ospf-route-map.xml.i>
<node name="timers">
<properties>
<help>Adjust routing timers</help>
@@ -793,39 +804,42 @@
<children>
<leafNode name="delay">
<properties>
- <help>Delay (msec) from first change received till SPF calculation</help>
+ <help>Delay from first change received till SPF calculation (default: 200)</help>
<valueHelp>
<format>u32:0-600000</format>
- <description>Delay in msec (default 200)</description>
+ <description>Delay in milliseconds</description>
</valueHelp>
<constraint>
<validator name="numeric" argument="--range 0-600000"/>
</constraint>
</properties>
+ <defaultValue>200</defaultValue>
</leafNode>
<leafNode name="initial-holdtime">
<properties>
- <help>Initial hold time(msec) between consecutive SPF calculations</help>
+ <help>Initial hold time between consecutive SPF calculations (default: 1000)</help>
<valueHelp>
<format>u32:0-600000</format>
- <description>Initial hold time in msec (default 1000)</description>
+ <description>Initial hold time in milliseconds</description>
</valueHelp>
<constraint>
<validator name="numeric" argument="--range 0-600000"/>
</constraint>
</properties>
+ <defaultValue>1000</defaultValue>
</leafNode>
<leafNode name="max-holdtime">
<properties>
- <help>Maximum hold time (msec)</help>
+ <help>Maximum hold time (default: 10000)</help>
<valueHelp>
<format>u32:0-600000</format>
- <description>Max hold time in msec (default 10000)</description>
+ <description>Max hold time in milliseconds</description>
</valueHelp>
<constraint>
<validator name="numeric" argument="--range 0-600000"/>
</constraint>
</properties>
+ <defaultValue>10000</defaultValue>
</leafNode>
</children>
</node>