summaryrefslogtreecommitdiff
path: root/interface-definitions/include
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-02-05 23:10:59 +0100
committerChristian Poessinger <christian@poessinger.com>2021-02-05 23:10:59 +0100
commitd7a84dc144951f698ae17111ed50d6dbd2f65fe7 (patch)
tree3d1998a19ed20625d14335e817e55808c7ee3bf0 /interface-definitions/include
parentf55fe07dc1894e22eda522d65cb4b1364da16c38 (diff)
parent96d51fa69fbe072fe5c9e8efd4fa6a89d8a2771a (diff)
downloadvyos-1x-d7a84dc144951f698ae17111ed50d6dbd2f65fe7.tar.gz
vyos-1x-d7a84dc144951f698ae17111ed50d6dbd2f65fe7.zip
Merge branch 't2450-vrf' of github.com:c-po/vyos-1x into current
* 't2450-vrf' of github.com:c-po/vyos-1x: xml: add new common "interface-name" validator xml: include: accel: add missing file include comments smoketest: static: improve static route testing route: static: T2450: provide full protocol support in XML and Python with new CLI vrf: T2450: provide full protocol support in XML and Python with new CLI migrator: ospf: T3267: cleanup empty interface "ip" nodes
Diffstat (limited to 'interface-definitions/include')
-rw-r--r--interface-definitions/include/accel-radius-additions-disable-accounting.xlm.in3
-rw-r--r--interface-definitions/include/bgp-update-source.xml.i2
-rw-r--r--interface-definitions/include/static-route-blackhole.xml.i10
-rw-r--r--interface-definitions/include/static-route-disable.xml.i8
-rw-r--r--interface-definitions/include/static-route-interface.xml.i17
-rw-r--r--interface-definitions/include/static-route-vrf.xml.i (renamed from interface-definitions/include/static-route-next-hop-vrf.xml.i)14
-rw-r--r--interface-definitions/include/static-route.xml.i75
-rw-r--r--interface-definitions/include/static-route6.xml.i75
8 files changed, 188 insertions, 16 deletions
diff --git a/interface-definitions/include/accel-radius-additions-disable-accounting.xlm.in b/interface-definitions/include/accel-radius-additions-disable-accounting.xlm.in
index 026f67453..0b5797483 100644
--- a/interface-definitions/include/accel-radius-additions-disable-accounting.xlm.in
+++ b/interface-definitions/include/accel-radius-additions-disable-accounting.xlm.in
@@ -1,7 +1,8 @@
+<!-- included start from accel-radius-additions-disable-accounting.xlm.in -->
<leafNode name="disable-accounting">
<properties>
<help>Disable accounting</help>
<valueless/>
</properties>
</leafNode>
-
+<!-- included end -->
diff --git a/interface-definitions/include/bgp-update-source.xml.i b/interface-definitions/include/bgp-update-source.xml.i
index c1db2e2c1..a8b212720 100644
--- a/interface-definitions/include/bgp-update-source.xml.i
+++ b/interface-definitions/include/bgp-update-source.xml.i
@@ -21,7 +21,7 @@
<constraint>
<validator name="ipv4-address"/>
<validator name="ipv6-address"/>
- <regex>^(br|bond|dum|en|eth|gnv|peth|tun|vti|vxlan|wg|wlan)[0-9]+|lo$</regex>
+ <validator name="interface-name"/>
</constraint>
</properties>
</leafNode>
diff --git a/interface-definitions/include/static-route-blackhole.xml.i b/interface-definitions/include/static-route-blackhole.xml.i
new file mode 100644
index 000000000..c880ee778
--- /dev/null
+++ b/interface-definitions/include/static-route-blackhole.xml.i
@@ -0,0 +1,10 @@
+<!-- included start from static-route-blackhole.xml.i -->
+<node name="blackhole">
+ <properties>
+ <help>Silently discard packets when matched</help>
+ </properties>
+ <children>
+ #include <include/static-route-distance.xml.i>
+ </children>
+</node>
+<!-- included end -->
diff --git a/interface-definitions/include/static-route-disable.xml.i b/interface-definitions/include/static-route-disable.xml.i
deleted file mode 100644
index 100ca3cbf..000000000
--- a/interface-definitions/include/static-route-disable.xml.i
+++ /dev/null
@@ -1,8 +0,0 @@
-<!-- included start from static-route-disable.xml.i.xml.i -->
-<leafNode name="disable">
- <properties>
- <help>Disable interface static route</help>
- <valueless/>
- </properties>
-</leafNode>
-<!-- included end -->
diff --git a/interface-definitions/include/static-route-interface.xml.i b/interface-definitions/include/static-route-interface.xml.i
new file mode 100644
index 000000000..0f10837df
--- /dev/null
+++ b/interface-definitions/include/static-route-interface.xml.i
@@ -0,0 +1,17 @@
+<!-- included start from static-route-interface.xml.i -->
+<leafNode name="interface">
+ <properties>
+ <help>Gateway interface name</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py</script>
+ </completionHelp>
+ <valueHelp>
+ <format>txt</format>
+ <description>Gateway interface name</description>
+ </valueHelp>
+ <constraint>
+ <validator name="interface-name"/>
+ </constraint>
+ </properties>
+</leafNode>
+<!-- included end -->
diff --git a/interface-definitions/include/static-route-next-hop-vrf.xml.i b/interface-definitions/include/static-route-vrf.xml.i
index c90140856..70f8b0be8 100644
--- a/interface-definitions/include/static-route-next-hop-vrf.xml.i
+++ b/interface-definitions/include/static-route-vrf.xml.i
@@ -1,16 +1,18 @@
-<!-- included start from static-route-next-hop-vrf.xml.i -->
-<leafNode name="next-hop-vrf">
+<!-- included start from static-route-vrf.xml.i -->
+<leafNode name="vrf">
<properties>
<help>VRF to leak route</help>
+ <completionHelp>
+ <list>default</list>
+ <path>vrf name</path>
+ </completionHelp>
<valueHelp>
<format>txt</format>
<description>Name of VRF to leak to</description>
</valueHelp>
- <completionHelp>
- <path>protocols vrf</path>
- </completionHelp>
<constraint>
- <regex>^[a-zA-Z0-9\-_]{1,100}$</regex>
+ <regex>^(default)$</regex>
+ <validator name="vrf-name"/>
</constraint>
</properties>
</leafNode>
diff --git a/interface-definitions/include/static-route.xml.i b/interface-definitions/include/static-route.xml.i
new file mode 100644
index 000000000..6225025ca
--- /dev/null
+++ b/interface-definitions/include/static-route.xml.i
@@ -0,0 +1,75 @@
+<!-- included start from static-route.xml.i -->
+<tagNode name="route">
+ <properties>
+ <help>VRF static IPv4 route</help>
+ <valueHelp>
+ <format>ipv4net</format>
+ <description>IPv4 static route</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-prefix"/>
+ </constraint>
+ </properties>
+ <children>
+ <node name="blackhole">
+ <properties>
+ <help>Silently discard pkts when matched</help>
+ </properties>
+ <children>
+ #include <include/static-route-distance.xml.i>
+ <leafNode name="tag">
+ <properties>
+ <help>Tag value for this route</help>
+ <valueHelp>
+ <format>u32:1-4294967295</format>
+ <description>Tag value for this route</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-4294967295"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+ <tagNode name="interface">
+ <properties>
+ <help>Next-hop IPv4 router interface</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py</script>
+ </completionHelp>
+ <valueHelp>
+ <format>txt</format>
+ <description>Gateway interface name</description>
+ </valueHelp>
+ <constraint>
+ <validator name="interface-name"/>
+ </constraint>
+ </properties>
+ <children>
+ #include <include/generic-disable-node.xml.i>
+ #include <include/static-route-distance.xml.i>
+ #include <include/static-route-vrf.xml.i>
+ </children>
+ </tagNode>
+ <tagNode name="next-hop">
+ <properties>
+ <help>Next-hop IPv4 router address</help>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>Next-hop router address</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-address"/>
+ </constraint>
+ </properties>
+ <children>
+ #include <include/generic-disable-node.xml.i>
+ #include <include/static-route-distance.xml.i>
+ #include <include/static-route-interface.xml.i>
+ #include <include/static-route-vrf.xml.i>
+ </children>
+ </tagNode>
+ </children>
+</tagNode>
+<!-- included end -->
+
diff --git a/interface-definitions/include/static-route6.xml.i b/interface-definitions/include/static-route6.xml.i
new file mode 100644
index 000000000..25d4d22a2
--- /dev/null
+++ b/interface-definitions/include/static-route6.xml.i
@@ -0,0 +1,75 @@
+<!-- included start from static-route6.xml.i -->
+<tagNode name="route6">
+ <properties>
+ <help>VRF static IPv6 route</help>
+ <valueHelp>
+ <format>ipv6net</format>
+ <description>IPv6 static route</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv6-prefix"/>
+ </constraint>
+ </properties>
+ <children>
+ <node name="blackhole">
+ <properties>
+ <help>Silently discard pkts when matched</help>
+ </properties>
+ <children>
+ #include <include/static-route-distance.xml.i>
+ <leafNode name="tag">
+ <properties>
+ <help>Tag value for this route</help>
+ <valueHelp>
+ <format>u32:1-4294967295</format>
+ <description>Tag value for this route</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-4294967295"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+ <tagNode name="interface">
+ <properties>
+ <help>IPv6 gateway interface name</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_interfaces.py</script>
+ </completionHelp>
+ <valueHelp>
+ <format>txt</format>
+ <description>Gateway interface name</description>
+ </valueHelp>
+ <constraint>
+ <validator name="interface-name"/>
+ </constraint>
+ </properties>
+ <children>
+ #include <include/generic-disable-node.xml.i>
+ #include <include/static-route-distance.xml.i>
+ #include <include/static-route-vrf.xml.i>
+ </children>
+ </tagNode>
+ <tagNode name="next-hop">
+ <properties>
+ <help>IPv6 gateway address</help>
+ <valueHelp>
+ <format>ipv6</format>
+ <description>Next-hop IPv6 router</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv6-address"/>
+ </constraint>
+ </properties>
+ <children>
+ #include <include/generic-disable-node.xml.i>
+ #include <include/static-route-distance.xml.i>
+ #include <include/static-route-interface.xml.i>
+ #include <include/static-route-vrf.xml.i>
+ </children>
+ </tagNode>
+ </children>
+</tagNode>
+<!-- included end -->
+