summaryrefslogtreecommitdiff
path: root/interface-definitions/include
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-08-18 12:53:16 +0200
committerChristian Poessinger <christian@poessinger.com>2021-08-18 12:59:14 +0200
commit8ce0cd9f09940f8c365ea1cc76b1b14197fdfd2a (patch)
tree4d959e1362add4178c7e29ba60bfdd1f4de7994e /interface-definitions/include
parent0df3e23d57192a1e1e9d12c00e3ca532138eed87 (diff)
downloadvyos-1x-8ce0cd9f09940f8c365ea1cc76b1b14197fdfd2a.tar.gz
vyos-1x-8ce0cd9f09940f8c365ea1cc76b1b14197fdfd2a.zip
bgp: evpn: T1513: re-structure route-target XML blocks
Make the both, export and import XML block re-usable by the IPv4 AFI.
Diffstat (limited to 'interface-definitions/include')
-rw-r--r--interface-definitions/include/bgp/afi-l2vpn-common.xml.i11
-rw-r--r--interface-definitions/include/bgp/route-target-both.xml.i14
-rw-r--r--interface-definitions/include/bgp/route-target-export.xml.i14
-rw-r--r--interface-definitions/include/bgp/route-target-import.xml.i14
-rw-r--r--interface-definitions/include/bgp/route-target.xml.i45
5 files changed, 52 insertions, 46 deletions
diff --git a/interface-definitions/include/bgp/afi-l2vpn-common.xml.i b/interface-definitions/include/bgp/afi-l2vpn-common.xml.i
index aaa69e6c8..a9a833851 100644
--- a/interface-definitions/include/bgp/afi-l2vpn-common.xml.i
+++ b/interface-definitions/include/bgp/afi-l2vpn-common.xml.i
@@ -12,5 +12,14 @@
</properties>
</leafNode>
#include <include/bgp/route-distinguisher.xml.i>
-#include <include/bgp/route-target.xml.i>
+<node name="route-target">
+ <properties>
+ <help>Route Target</help>
+ </properties>
+ <children>
+ #include <include/bgp/route-target-both.xml.i>
+ #include <include/bgp/route-target-export.xml.i>
+ #include <include/bgp/route-target-import.xml.i>
+ </children>
+</node>
<!-- include end -->
diff --git a/interface-definitions/include/bgp/route-target-both.xml.i b/interface-definitions/include/bgp/route-target-both.xml.i
new file mode 100644
index 000000000..2381f420f
--- /dev/null
+++ b/interface-definitions/include/bgp/route-target-both.xml.i
@@ -0,0 +1,14 @@
+<!-- include start from bgp/route-target-both.xml.i -->
+<leafNode name="both">
+ <properties>
+ <help>Route Target both import and export</help>
+ <valueHelp>
+ <format>txt</format>
+ <description>Route target (x.x.x.x:yyy|xxxx:yyyy)</description>
+ </valueHelp>
+ <constraint>
+ <regex>^((25[0-5]|2[0-4][0-9]|[1][0-9][0-9]|[1-9][0-9]|[0-9]?)(\.(25[0-5]|2[0-4][0-9]|[1][0-9][0-9]|[1-9][0-9]|[0-9]?)){3}|[0-9]{1,10}):[0-9]{1,5}$</regex>
+ </constraint>
+ </properties>
+</leafNode>
+<!-- include end -->
diff --git a/interface-definitions/include/bgp/route-target-export.xml.i b/interface-definitions/include/bgp/route-target-export.xml.i
new file mode 100644
index 000000000..0542000a5
--- /dev/null
+++ b/interface-definitions/include/bgp/route-target-export.xml.i
@@ -0,0 +1,14 @@
+<!-- include start from bgp/route-target-export.xml.i -->
+<leafNode name="export">
+ <properties>
+ <help>Route Target export</help>
+ <valueHelp>
+ <format>txt</format>
+ <description>Route target (x.x.x.x:yyy|xxxx:yyyy)</description>
+ </valueHelp>
+ <constraint>
+ <regex>^((25[0-5]|2[0-4][0-9]|[1][0-9][0-9]|[1-9][0-9]|[0-9]?)(\.(25[0-5]|2[0-4][0-9]|[1][0-9][0-9]|[1-9][0-9]|[0-9]?)){3}|[0-9]{1,10}):[0-9]{1,5}$</regex>
+ </constraint>
+ </properties>
+</leafNode>
+<!-- include end -->
diff --git a/interface-definitions/include/bgp/route-target-import.xml.i b/interface-definitions/include/bgp/route-target-import.xml.i
new file mode 100644
index 000000000..6a954885c
--- /dev/null
+++ b/interface-definitions/include/bgp/route-target-import.xml.i
@@ -0,0 +1,14 @@
+<!-- include start from bgp/route-target-import.xml.i -->
+<leafNode name="import">
+ <properties>
+ <help>Route Target import</help>
+ <valueHelp>
+ <format>txt</format>
+ <description>Route target (x.x.x.x:yyy|xxxx:yyyy)</description>
+ </valueHelp>
+ <constraint>
+ <regex>^((25[0-5]|2[0-4][0-9]|[1][0-9][0-9]|[1-9][0-9]|[0-9]?)(\.(25[0-5]|2[0-4][0-9]|[1][0-9][0-9]|[1-9][0-9]|[0-9]?)){3}|[0-9]{1,10}):[0-9]{1,5}$</regex>
+ </constraint>
+ </properties>
+</leafNode>
+<!-- include end -->
diff --git a/interface-definitions/include/bgp/route-target.xml.i b/interface-definitions/include/bgp/route-target.xml.i
deleted file mode 100644
index 674b6db15..000000000
--- a/interface-definitions/include/bgp/route-target.xml.i
+++ /dev/null
@@ -1,45 +0,0 @@
-<!-- include start from bgp/route-target.xml.i -->
-<node name="route-target">
- <properties>
- <help>Route Target</help>
- </properties>
- <children>
- <leafNode name="both">
- <properties>
- <help>Route Target both import and export</help>
- <valueHelp>
- <format>txt</format>
- <description>Route target (x.x.x.x:yyy|xxxx:yyyy)</description>
- </valueHelp>
- <constraint>
- <regex>^((25[0-5]|2[0-4][0-9]|[1][0-9][0-9]|[1-9][0-9]|[0-9]?)(\.(25[0-5]|2[0-4][0-9]|[1][0-9][0-9]|[1-9][0-9]|[0-9]?)){3}|[0-9]{1,10}):[0-9]{1,5}$</regex>
- </constraint>
- </properties>
- </leafNode>
- <leafNode name="export">
- <properties>
- <help>Route Target export</help>
- <valueHelp>
- <format>txt</format>
- <description>Route target (x.x.x.x:yyy|xxxx:yyyy)</description>
- </valueHelp>
- <constraint>
- <regex>^((25[0-5]|2[0-4][0-9]|[1][0-9][0-9]|[1-9][0-9]|[0-9]?)(\.(25[0-5]|2[0-4][0-9]|[1][0-9][0-9]|[1-9][0-9]|[0-9]?)){3}|[0-9]{1,10}):[0-9]{1,5}$</regex>
- </constraint>
- </properties>
- </leafNode>
- <leafNode name="import">
- <properties>
- <help>Route Target import</help>
- <valueHelp>
- <format>txt</format>
- <description>Route target (x.x.x.x:yyy|xxxx:yyyy)</description>
- </valueHelp>
- <constraint>
- <regex>^((25[0-5]|2[0-4][0-9]|[1][0-9][0-9]|[1-9][0-9]|[0-9]?)(\.(25[0-5]|2[0-4][0-9]|[1][0-9][0-9]|[1-9][0-9]|[0-9]?)){3}|[0-9]{1,10}):[0-9]{1,5}$</regex>
- </constraint>
- </properties>
- </leafNode>
- </children>
-</node>
-<!-- include end -->