From 100614ab3a96b5325da08c76c8db2f4cae93396a Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 9 May 2021 19:38:36 +0200 Subject: 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. --- .../include/bgp/afi-common-vpn.xml.i | 144 --------------------- interface-definitions/include/bgp/afi-common.xml.i | 16 +-- .../include/bgp/afi-default-originate.xml.i | 10 ++ .../bgp/neighbor-afi-ipv4-labeled-unicast.xml.i | 1 + .../include/bgp/neighbor-afi-ipv4-multicast.xml.i | 1 + .../include/bgp/neighbor-afi-ipv4-unicast.xml.i | 1 + .../include/bgp/neighbor-afi-ipv4-vpn.xml.i | 4 +- .../bgp/neighbor-afi-ipv6-labeled-unicast.xml.i | 1 + .../include/bgp/neighbor-afi-ipv6-multicast.xml.i | 1 + .../include/bgp/neighbor-afi-ipv6-unicast.xml.i | 1 + .../include/bgp/neighbor-afi-ipv6-vpn.xml.i | 4 +- 11 files changed, 28 insertions(+), 156 deletions(-) delete mode 100644 interface-definitions/include/bgp/afi-common-vpn.xml.i create mode 100644 interface-definitions/include/bgp/afi-default-originate.xml.i (limited to 'interface-definitions/include') 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 @@ - - - - Use addpath to advertise all paths to a neighbor - - - - - - Use addpath to advertise the bestpath per each neighboring AS - - - -#include - - - AS for routes sent to this peer to be the local AS - - - -#include - - - Disable sending community attributes to this peer - - - - - Disable sending extended community attributes to this peer - - - - - - Disable sending standard community attributes to this peer - - - - - - - - Access-list to filter route updates to/from this peer-group - - - - - Access-list to filter outgoing route updates to this peer-group - - policy access-list - - - u32:1-65535 - Access-list to filter outgoing route updates to this peer-group - - - - - - - - - Access-list to filter incoming route updates from this peer-group - - policy access-list - - - u32:1-65535 - Access-list to filter incoming route updates from this peer-group - - - - - - - - - - - as-path-list to filter route updates to/from this peer - - - - - As-path-list to filter outgoing route updates to this peer - - policy as-path-list - - - - - - As-path-list to filter incoming route updates from this peer - - policy as-path-list - - - - - - - - Maximum number of prefixes to accept from this peer - - u32:1-4294967295 - Prefix limit - - - - - - -#include - - - Remove private AS numbers from AS path in outbound route updates - - - -#include -#include -#include -#include - - - Route-map to selectively unsuppress suppressed routes - - policy route-map - - - - - - Default weight for routes from this peer - - u32:1-65535 - Default weight - - - - - - - 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 @@ - - - Originate default route to this peer - - - #include - - Access-list to filter route updates to/from this peer-group @@ -135,6 +127,14 @@ policy route-map + + txt + Route map name + + + ^[-_a-zA-Z0-9.]+$ + + Name of route-map can only contain alpha-numeric letters, hyphen and underscores 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 @@ + + + + Originate default route to this peer + + + #include + + + 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 @@ #include #include + #include 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 @@ #include #include + #include 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 @@ #include #include + #include 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 @@ - + IPv4 VPN BGP neighbor parameters #include - #include + #include 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 #include + #include 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 #include + #include 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 #include + #include 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 @@ - + IPv6 VPN BGP neighbor parameters @@ -6,7 +6,7 @@ #include #include - #include + #include -- cgit v1.2.3