summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-02-15 20:22:17 +0100
committerChristian Poessinger <christian@poessinger.com>2021-02-15 20:22:41 +0100
commite9f581efe834dc27e78acff4a331fb9242440de5 (patch)
treed50e15d6e3dd242d7bbafba781ea7faf9196bc23
parent44596d08c374a80a9cf2bd31f3d937eaab8d872e (diff)
downloadvyos-1x-e9f581efe834dc27e78acff4a331fb9242440de5.tar.gz
vyos-1x-e9f581efe834dc27e78acff4a331fb9242440de5.zip
bgp: T1513: add per VRF vni support
-rw-r--r--data/templates/frr/vrf.frr.tmpl3
-rw-r--r--interface-definitions/include/vni.xml.i12
-rw-r--r--interface-definitions/interfaces-geneve.xml.in13
-rw-r--r--interface-definitions/interfaces-vxlan.xml.in13
-rw-r--r--interface-definitions/protocols-vrf.xml.in1
5 files changed, 18 insertions, 24 deletions
diff --git a/data/templates/frr/vrf.frr.tmpl b/data/templates/frr/vrf.frr.tmpl
index 0c8726908..8d3d8e9dd 100644
--- a/data/templates/frr/vrf.frr.tmpl
+++ b/data/templates/frr/vrf.frr.tmpl
@@ -3,6 +3,9 @@
{% if vrf is defined and vrf is not none %}
{% for vrf_name, vrf_config in vrf.items() %}
vrf {{ vrf_name }}
+{% if vrf_config.vni is defined and vrf_config.vni is not none %}
+ vni {{ vrf_config.vni }}
+{% endif %}
{% if vrf_config.static is defined and vrf_config.static is not none %}
{# IPv4 routes #}
{% if vrf_config.static.route is defined and vrf_config.static.route is not none %}
diff --git a/interface-definitions/include/vni.xml.i b/interface-definitions/include/vni.xml.i
new file mode 100644
index 000000000..faff4c3c3
--- /dev/null
+++ b/interface-definitions/include/vni.xml.i
@@ -0,0 +1,12 @@
+ <leafNode name="vni">
+ <properties>
+ <help>Virtual Network Identifier</help>
+ <valueHelp>
+ <format>0-16777214</format>
+ <description>VXLAN virtual network identifier</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 0-16777214"/>
+ </constraint>
+ </properties>
+ </leafNode>
diff --git a/interface-definitions/interfaces-geneve.xml.in b/interface-definitions/interfaces-geneve.xml.in
index 0c776e3c3..1064b2c18 100644
--- a/interface-definitions/interfaces-geneve.xml.in
+++ b/interface-definitions/interfaces-geneve.xml.in
@@ -35,18 +35,7 @@
</constraint>
</properties>
</leafNode>
- <leafNode name="vni">
- <properties>
- <help>Virtual Network Identifier</help>
- <valueHelp>
- <format>0-16777214</format>
- <description>GENEVE virtual network identifier</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 0-16777214"/>
- </constraint>
- </properties>
- </leafNode>
+ #include <include/vni.xml.i>
</children>
</tagNode>
</children>
diff --git a/interface-definitions/interfaces-vxlan.xml.in b/interface-definitions/interfaces-vxlan.xml.in
index f90a86274..234770971 100644
--- a/interface-definitions/interfaces-vxlan.xml.in
+++ b/interface-definitions/interfaces-vxlan.xml.in
@@ -73,18 +73,7 @@
</properties>
<defaultValue>8472</defaultValue>
</leafNode>
- <leafNode name="vni">
- <properties>
- <help>Virtual Network Identifier</help>
- <valueHelp>
- <format>0-16777214</format>
- <description>VXLAN virtual network identifier</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 0-16777214"/>
- </constraint>
- </properties>
- </leafNode>
+ #include <include/vni.xml.i>
</children>
</tagNode>
</children>
diff --git a/interface-definitions/protocols-vrf.xml.in b/interface-definitions/protocols-vrf.xml.in
index 81942d124..77297938b 100644
--- a/interface-definitions/protocols-vrf.xml.in
+++ b/interface-definitions/protocols-vrf.xml.in
@@ -27,6 +27,7 @@
#include <include/static-route6.xml.i>
</children>
</node>
+ #include <include/vni.xml.i>
</children>
</tagNode>
</children>