summaryrefslogtreecommitdiff
path: root/interface-definitions
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-03-04 22:02:26 +0100
committerChristian Poessinger <christian@poessinger.com>2020-03-04 22:02:26 +0100
commit10ef1bb6c4a8e02081660eddf5918c92151382b7 (patch)
tree31885f0a2b32b0db18f9e44b634e9176c5de54f0 /interface-definitions
parent1257c0126bdc10bba605652f624815b2e0350ca2 (diff)
parent153d1535d954f59cc48ed26f6cc552703b8cbd73 (diff)
downloadvyos-1x-10ef1bb6c4a8e02081660eddf5918c92151382b7.tar.gz
vyos-1x-10ef1bb6c4a8e02081660eddf5918c92151382b7.zip
Merge branch 't31-vrf' of github.com:c-po/vyos-1x into current
* 't31-vrf' of github.com:c-po/vyos-1x: vrf: T31: enable vrf support for dummy interface templates: T2099: make op-mode path completion helper working vrf: T31: reorder routing table lookups vrf: T31: adding unreachable routes to the routing tables vrf: T31: prior to the v4.8 kernel iif and oif rules are needed vrf: T31: create iproute2 table to name mapping reference vrf: T31: rename 'vrf disable-bind-to-all ipv4' to 'vrf bind-to-all' vrf: T31: support add/remove of interfaces from vrf vrf: T31: remove superfluous vyos.vrf library functions vrf: T31: reduce script complexity vrf: T31: no need to use sudo calls in vrf.py vrf: T31: make 'show vrf' command behave like other 'show interface commands' xml: include: description: adjust help message vrf: T31: improve help for routing table vrf: T31: reuse interface-description.xml.i for instance description vrf: T31: use embedded regex on 'vrf name' instead of python script vrf: T31: initial support for a VRF backend in XML/Python ifconfig: T2057: generic interface option setting
Diffstat (limited to 'interface-definitions')
-rw-r--r--interface-definitions/include/interface-description.xml.i4
-rw-r--r--interface-definitions/include/interface-vrf.xml.i12
-rw-r--r--interface-definitions/interfaces-dummy.xml.in1
-rw-r--r--interface-definitions/vrf.xml.in47
4 files changed, 62 insertions, 2 deletions
diff --git a/interface-definitions/include/interface-description.xml.i b/interface-definitions/include/interface-description.xml.i
index 7a7a37871..961533e26 100644
--- a/interface-definitions/include/interface-description.xml.i
+++ b/interface-definitions/include/interface-description.xml.i
@@ -1,9 +1,9 @@
<leafNode name="description">
<properties>
- <help>Interface description</help>
+ <help>Interface specific description</help>
<constraint>
<regex>.{1,256}$</regex>
</constraint>
- <constraintErrorMessage>Interface description too long (limit 256 characters)</constraintErrorMessage>
+ <constraintErrorMessage>Description too long (limit 256 characters)</constraintErrorMessage>
</properties>
</leafNode>
diff --git a/interface-definitions/include/interface-vrf.xml.i b/interface-definitions/include/interface-vrf.xml.i
new file mode 100644
index 000000000..355e7f0f3
--- /dev/null
+++ b/interface-definitions/include/interface-vrf.xml.i
@@ -0,0 +1,12 @@
+<leafNode name="vrf">
+ <properties>
+ <help>VRF instance name</help>
+ <valueHelp>
+ <format>text</format>
+ <description>VRF instance name</description>
+ </valueHelp>
+ <completionHelp>
+ <path>vrf name</path>
+ </completionHelp>
+ </properties>
+</leafNode>
diff --git a/interface-definitions/interfaces-dummy.xml.in b/interface-definitions/interfaces-dummy.xml.in
index 39809a610..5229e602a 100644
--- a/interface-definitions/interfaces-dummy.xml.in
+++ b/interface-definitions/interfaces-dummy.xml.in
@@ -19,6 +19,7 @@
#include <include/address-ipv4-ipv6.xml.i>
#include <include/interface-description.xml.i>
#include <include/interface-disable.xml.i>
+ #include <include/interface-vrf.xml.i>
</children>
</tagNode>
</children>
diff --git a/interface-definitions/vrf.xml.in b/interface-definitions/vrf.xml.in
new file mode 100644
index 000000000..f1895598e
--- /dev/null
+++ b/interface-definitions/vrf.xml.in
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="vrf" owner="${vyos_conf_scripts_dir}/vrf.py">
+ <properties>
+ <help>Virtual Routing and Forwarding</help>
+ <!-- must be before any interface creation -->
+ <priority>210</priority>
+ </properties>
+ <children>
+ <leafNode name="bind-to-all">
+ <properties>
+ <help>Enable binding services to all VRFs</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ <tagNode name="name">
+ <properties>
+ <help>VRF instance name</help>
+ <constraint>
+ <regex>[^/\s]{1,16}$</regex>
+ </constraint>
+ <constraintErrorMessage>VRF instance name must be 16 characters or less</constraintErrorMessage>
+ <valueHelp>
+ <format>name</format>
+ <description>Instance name</description>
+ </valueHelp>
+ </properties>
+ <children>
+ <leafNode name="table">
+ <properties>
+ <help>Routing table associated with this instance</help>
+ <constraint>
+ <validator name="numeric" argument="--range 1-2147483647"/>
+ </constraint>
+ <constraintErrorMessage>Invalid kernel table number</constraintErrorMessage>
+ <valueHelp>
+ <format>1-2147483647</format>
+ <description>Routing table ID</description>
+ </valueHelp>
+ </properties>
+ </leafNode>
+ #include <include/interface-description.xml.i>
+ </children>
+ </tagNode>
+ </children>
+ </node>
+</interfaceDefinition> \ No newline at end of file