summaryrefslogtreecommitdiff
path: root/interface-definitions
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-05-09 19:38:36 +0200
committerChristian Poessinger <christian@poessinger.com>2021-05-09 19:38:36 +0200
commit100614ab3a96b5325da08c76c8db2f4cae93396a (patch)
tree0701d62bce5cae4d401355bda73a9661acc16ef8 /interface-definitions
parent59b2b2055f553e5a227d644ca0fc779d004f7d67 (diff)
downloadvyos-1x-100614ab3a96b5325da08c76c8db2f4cae93396a.tar.gz
vyos-1x-100614ab3a96b5325da08c76c8db2f4cae93396a.zip
bgp: xml: T2771: remove duplicated XML nodes
Instead of having a 95% copy from afi-common.xml.i in afi-common-vpn.xml.i, split out the part that is differend (default originate) and re-use the same building block.
Diffstat (limited to 'interface-definitions')
-rw-r--r--interface-definitions/include/bgp/afi-common-vpn.xml.i144
-rw-r--r--interface-definitions/include/bgp/afi-common.xml.i16
-rw-r--r--interface-definitions/include/bgp/afi-default-originate.xml.i10
-rw-r--r--interface-definitions/include/bgp/neighbor-afi-ipv4-labeled-unicast.xml.i1
-rw-r--r--interface-definitions/include/bgp/neighbor-afi-ipv4-multicast.xml.i1
-rw-r--r--interface-definitions/include/bgp/neighbor-afi-ipv4-unicast.xml.i1
-rw-r--r--interface-definitions/include/bgp/neighbor-afi-ipv4-vpn.xml.i4
-rw-r--r--interface-definitions/include/bgp/neighbor-afi-ipv6-labeled-unicast.xml.i1
-rw-r--r--interface-definitions/include/bgp/neighbor-afi-ipv6-multicast.xml.i1
-rw-r--r--interface-definitions/include/bgp/neighbor-afi-ipv6-unicast.xml.i1
-rw-r--r--interface-definitions/include/bgp/neighbor-afi-ipv6-vpn.xml.i4
11 files changed, 28 insertions, 156 deletions
diff --git a/interface-definitions/include/bgp/afi-common-vpn.xml.i b/interface-definitions/include/bgp/afi-common-vpn.xml.i
deleted file mode 100644
index 824fb98a3..000000000
--- a/interface-definitions/include/bgp/afi-common-vpn.xml.i
+++ /dev/null
@@ -1,144 +0,0 @@
-<!-- include start from bgp/afi-common-vpn.xml.i -->
-<leafNode name="addpath-tx-all">
- <properties>
- <help>Use addpath to advertise all paths to a neighbor</help>
- <valueless/>
- </properties>
-</leafNode>
-<leafNode name="addpath-tx-per-as">
- <properties>
- <help>Use addpath to advertise the bestpath per each neighboring AS</help>
- <valueless/>
- </properties>
-</leafNode>
-#include <include/bgp/afi-allowas-in.xml.i>
-<leafNode name="as-override">
- <properties>
- <help>AS for routes sent to this peer to be the local AS</help>
- <valueless/>
- </properties>
-</leafNode>
-#include <include/bgp/afi-attribute-unchanged.xml.i>
-<node name="disable-send-community">
- <properties>
- <help>Disable sending community attributes to this peer</help>
- </properties>
- <children>
- <leafNode name="extended">
- <properties>
- <help>Disable sending extended community attributes to this peer</help>
- <valueless/>
- </properties>
- </leafNode>
- <leafNode name="standard">
- <properties>
- <help>Disable sending standard community attributes to this peer</help>
- <valueless/>
- </properties>
- </leafNode>
- </children>
-</node>
-<node name="distribute-list">
- <properties>
- <help>Access-list to filter route updates to/from this peer-group</help>
- </properties>
- <children>
- <leafNode name="export">
- <properties>
- <help>Access-list to filter outgoing route updates to this peer-group</help>
- <completionHelp>
- <path>policy access-list</path>
- </completionHelp>
- <valueHelp>
- <format>u32:1-65535</format>
- <description>Access-list to filter outgoing route updates to this peer-group</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 1-65535"/>
- </constraint>
- </properties>
- </leafNode>
- <leafNode name="import">
- <properties>
- <help>Access-list to filter incoming route updates from this peer-group</help>
- <completionHelp>
- <path>policy access-list</path>
- </completionHelp>
- <valueHelp>
- <format>u32:1-65535</format>
- <description>Access-list to filter incoming route updates from this peer-group</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 1-65535"/>
- </constraint>
- </properties>
- </leafNode>
- </children>
-</node>
-<node name="filter-list">
- <properties>
- <help>as-path-list to filter route updates to/from this peer</help>
- </properties>
- <children>
- <leafNode name="export">
- <properties>
- <help>As-path-list to filter outgoing route updates to this peer</help>
- <completionHelp>
- <path>policy as-path-list</path>
- </completionHelp>
- </properties>
- </leafNode>
- <leafNode name="import">
- <properties>
- <help>As-path-list to filter incoming route updates from this peer</help>
- <completionHelp>
- <path>policy as-path-list</path>
- </completionHelp>
- </properties>
- </leafNode>
- </children>
-</node>
-<leafNode name="maximum-prefix">
- <properties>
- <help>Maximum number of prefixes to accept from this peer</help>
- <valueHelp>
- <format>u32:1-4294967295</format>
- <description>Prefix limit</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 1-4294967295"/>
- </constraint>
- </properties>
-</leafNode>
-#include <include/bgp/afi-nexthop-self.xml.i>
-<leafNode name="remove-private-as">
- <properties>
- <help>Remove private AS numbers from AS path in outbound route updates</help>
- <valueless/>
- </properties>
-</leafNode>
-#include <include/bgp/afi-route-map.xml.i>
-#include <include/bgp/afi-route-reflector-client.xml.i>
-#include <include/bgp/afi-route-server-client.xml.i>
-#include <include/bgp/afi-soft-reconfiguration.xml.i>
-<leafNode name="unsuppress-map">
- <properties>
- <help>Route-map to selectively unsuppress suppressed routes</help>
- <completionHelp>
- <path>policy route-map</path>
- </completionHelp>
- </properties>
-</leafNode>
-<leafNode name="weight">
- <properties>
- <help>Default weight for routes from this peer</help>
- <valueHelp>
- <format>u32:1-65535</format>
- <description>Default weight</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 1-65535"/>
- </constraint>
- </properties>
-</leafNode>
-<!-- included end -->
diff --git a/interface-definitions/include/bgp/afi-common.xml.i b/interface-definitions/include/bgp/afi-common.xml.i
index 601ffe223..ac4a3fca0 100644
--- a/interface-definitions/include/bgp/afi-common.xml.i
+++ b/interface-definitions/include/bgp/afi-common.xml.i
@@ -38,14 +38,6 @@
</leafNode>
</children>
</node>
-<node name="default-originate">
- <properties>
- <help>Originate default route to this peer</help>
- </properties>
- <children>
- #include <include/route-map.xml.i>
- </children>
-</node>
<node name="distribute-list">
<properties>
<help>Access-list to filter route updates to/from this peer-group</help>
@@ -135,6 +127,14 @@
<completionHelp>
<path>policy route-map</path>
</completionHelp>
+ <valueHelp>
+ <format>txt</format>
+ <description>Route map name</description>
+ </valueHelp>
+ <constraint>
+ <regex>^[-_a-zA-Z0-9.]+$</regex>
+ </constraint>
+ <constraintErrorMessage>Name of route-map can only contain alpha-numeric letters, hyphen and underscores</constraintErrorMessage>
</properties>
</leafNode>
<leafNode name="weight">
diff --git a/interface-definitions/include/bgp/afi-default-originate.xml.i b/interface-definitions/include/bgp/afi-default-originate.xml.i
new file mode 100644
index 000000000..ba1ec5704
--- /dev/null
+++ b/interface-definitions/include/bgp/afi-default-originate.xml.i
@@ -0,0 +1,10 @@
+<!-- include start from bgp/afi-default-originate.xml.i -->
+<node name="default-originate">
+ <properties>
+ <help>Originate default route to this peer</help>
+ </properties>
+ <children>
+ #include <include/route-map.xml.i>
+ </children>
+</node>
+<!-- include end -->
diff --git a/interface-definitions/include/bgp/neighbor-afi-ipv4-labeled-unicast.xml.i b/interface-definitions/include/bgp/neighbor-afi-ipv4-labeled-unicast.xml.i
index 5d0ca81bc..a489666e4 100644
--- a/interface-definitions/include/bgp/neighbor-afi-ipv4-labeled-unicast.xml.i
+++ b/interface-definitions/include/bgp/neighbor-afi-ipv4-labeled-unicast.xml.i
@@ -14,6 +14,7 @@
</node>
#include <include/bgp/afi-ipv4-prefix-list.xml.i>
#include <include/bgp/afi-common.xml.i>
+ #include <include/bgp/afi-default-originate.xml.i>
</children>
</node>
<!-- include end -->
diff --git a/interface-definitions/include/bgp/neighbor-afi-ipv4-multicast.xml.i b/interface-definitions/include/bgp/neighbor-afi-ipv4-multicast.xml.i
index 2bc974b7f..5a6e66dc1 100644
--- a/interface-definitions/include/bgp/neighbor-afi-ipv4-multicast.xml.i
+++ b/interface-definitions/include/bgp/neighbor-afi-ipv4-multicast.xml.i
@@ -14,6 +14,7 @@
</node>
#include <include/bgp/afi-ipv4-prefix-list.xml.i>
#include <include/bgp/afi-common.xml.i>
+ #include <include/bgp/afi-default-originate.xml.i>
</children>
</node>
<!-- include end -->
diff --git a/interface-definitions/include/bgp/neighbor-afi-ipv4-unicast.xml.i b/interface-definitions/include/bgp/neighbor-afi-ipv4-unicast.xml.i
index 3e2191e93..b7b7ca5b5 100644
--- a/interface-definitions/include/bgp/neighbor-afi-ipv4-unicast.xml.i
+++ b/interface-definitions/include/bgp/neighbor-afi-ipv4-unicast.xml.i
@@ -14,6 +14,7 @@
</node>
#include <include/bgp/afi-ipv4-prefix-list.xml.i>
#include <include/bgp/afi-common.xml.i>
+ #include <include/bgp/afi-default-originate.xml.i>
</children>
</node>
<!-- include end -->
diff --git a/interface-definitions/include/bgp/neighbor-afi-ipv4-vpn.xml.i b/interface-definitions/include/bgp/neighbor-afi-ipv4-vpn.xml.i
index b5edaccf3..967d78486 100644
--- a/interface-definitions/include/bgp/neighbor-afi-ipv4-vpn.xml.i
+++ b/interface-definitions/include/bgp/neighbor-afi-ipv4-vpn.xml.i
@@ -1,11 +1,11 @@
-<!-- included start from bgp-neighbor-afi-ipv4-vpn.xml.i -->
+<!-- included start from bgp/neighbor-afi-ipv4-vpn.xml.i -->
<node name="ipv4-vpn">
<properties>
<help>IPv4 VPN BGP neighbor parameters</help>
</properties>
<children>
#include <include/bgp/afi-ipv4-prefix-list.xml.i>
- #include <include/bgp/afi-common-vpn.xml.i>
+ #include <include/bgp/afi-common.xml.i>
</children>
</node>
<!-- include end -->
diff --git a/interface-definitions/include/bgp/neighbor-afi-ipv6-labeled-unicast.xml.i b/interface-definitions/include/bgp/neighbor-afi-ipv6-labeled-unicast.xml.i
index c2f14570b..eb4f7939c 100644
--- a/interface-definitions/include/bgp/neighbor-afi-ipv6-labeled-unicast.xml.i
+++ b/interface-definitions/include/bgp/neighbor-afi-ipv6-labeled-unicast.xml.i
@@ -15,6 +15,7 @@
#include <include/bgp/afi-ipv6-nexthop-local.xml.i>
#include <include/bgp/afi-ipv6-prefix-list.xml.i>
#include <include/bgp/afi-common.xml.i>
+ #include <include/bgp/afi-default-originate.xml.i>
</children>
</node>
<!-- include end -->
diff --git a/interface-definitions/include/bgp/neighbor-afi-ipv6-multicast.xml.i b/interface-definitions/include/bgp/neighbor-afi-ipv6-multicast.xml.i
index 4890e2b51..1d8e84935 100644
--- a/interface-definitions/include/bgp/neighbor-afi-ipv6-multicast.xml.i
+++ b/interface-definitions/include/bgp/neighbor-afi-ipv6-multicast.xml.i
@@ -7,6 +7,7 @@
#include <include/bgp/afi-ipv6-nexthop-local.xml.i>
#include <include/bgp/afi-ipv6-prefix-list.xml.i>
#include <include/bgp/afi-common.xml.i>
+ #include <include/bgp/afi-default-originate.xml.i>
</children>
</node>
<!-- include end -->
diff --git a/interface-definitions/include/bgp/neighbor-afi-ipv6-unicast.xml.i b/interface-definitions/include/bgp/neighbor-afi-ipv6-unicast.xml.i
index 68f61c72a..f6b812c28 100644
--- a/interface-definitions/include/bgp/neighbor-afi-ipv6-unicast.xml.i
+++ b/interface-definitions/include/bgp/neighbor-afi-ipv6-unicast.xml.i
@@ -15,6 +15,7 @@
#include <include/bgp/afi-ipv6-nexthop-local.xml.i>
#include <include/bgp/afi-ipv6-prefix-list.xml.i>
#include <include/bgp/afi-common.xml.i>
+ #include <include/bgp/afi-default-originate.xml.i>
</children>
</node>
<!-- include end -->
diff --git a/interface-definitions/include/bgp/neighbor-afi-ipv6-vpn.xml.i b/interface-definitions/include/bgp/neighbor-afi-ipv6-vpn.xml.i
index 62a4345fc..c0df71cf3 100644
--- a/interface-definitions/include/bgp/neighbor-afi-ipv6-vpn.xml.i
+++ b/interface-definitions/include/bgp/neighbor-afi-ipv6-vpn.xml.i
@@ -1,4 +1,4 @@
-<!-- included start from bgp-neighbor-afi-ipv6-vpn.xml.i -->
+<!-- include start from bgp/neighbor-afi-ipv6-vpn.xml.i -->
<node name="ipv6-vpn">
<properties>
<help>IPv6 VPN BGP neighbor parameters</help>
@@ -6,7 +6,7 @@
<children>
#include <include/bgp/afi-ipv6-nexthop-local.xml.i>
#include <include/bgp/afi-ipv6-prefix-list.xml.i>
- #include <include/bgp/afi-common-vpn.xml.i>
+ #include <include/bgp/afi-common.xml.i>
</children>
</node>
<!-- include end -->