From 34d789579cda1a940ac65671b41466880267944b Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Fri, 9 Apr 2021 19:44:44 +0200 Subject: op-mode: bgp: move common includes to include/bgp directory This change makes it easier to group all BGP related operational level command building blocks in one place. --- op-mode-definitions/include/bgp-afi-common.xml.i | 40 ---- .../include/bgp-afi-ipv4-ipv6-common.xml.i | 243 --------------------- op-mode-definitions/include/bgp-common.xml.i | 170 -------------- .../include/bgp-prefix-bestpath-multipath.xml.i | 20 -- op-mode-definitions/include/bgp/afi-common.xml.i | 40 ++++ .../include/bgp/afi-ipv4-ipv6-common.xml.i | 243 +++++++++++++++++++++ .../include/bgp/prefix-bestpath-multipath.xml.i | 20 ++ .../include/bgp/show-ip-bgp-common.xml.i | 170 ++++++++++++++ op-mode-definitions/show-bgp.xml.in | 16 +- op-mode-definitions/show-ip-bgp.xml.in | 4 +- 10 files changed, 483 insertions(+), 483 deletions(-) delete mode 100644 op-mode-definitions/include/bgp-afi-common.xml.i delete mode 100644 op-mode-definitions/include/bgp-afi-ipv4-ipv6-common.xml.i delete mode 100644 op-mode-definitions/include/bgp-common.xml.i delete mode 100644 op-mode-definitions/include/bgp-prefix-bestpath-multipath.xml.i create mode 100644 op-mode-definitions/include/bgp/afi-common.xml.i create mode 100644 op-mode-definitions/include/bgp/afi-ipv4-ipv6-common.xml.i create mode 100644 op-mode-definitions/include/bgp/prefix-bestpath-multipath.xml.i create mode 100644 op-mode-definitions/include/bgp/show-ip-bgp-common.xml.i diff --git a/op-mode-definitions/include/bgp-afi-common.xml.i b/op-mode-definitions/include/bgp-afi-common.xml.i deleted file mode 100644 index 06cfc42a5..000000000 --- a/op-mode-definitions/include/bgp-afi-common.xml.i +++ /dev/null @@ -1,40 +0,0 @@ - - - - Community number where AA and NN are (0-65535) - - AA:NN - - - - - - Exact match of the communities - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - List of large-community numbers - - AA:BB:CC - - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - RIB advertisement statistics - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Summary of BGP neighbor status - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - diff --git a/op-mode-definitions/include/bgp-afi-ipv4-ipv6-common.xml.i b/op-mode-definitions/include/bgp-afi-ipv4-ipv6-common.xml.i deleted file mode 100644 index dc0926375..000000000 --- a/op-mode-definitions/include/bgp-afi-ipv4-ipv6-common.xml.i +++ /dev/null @@ -1,243 +0,0 @@ - - - - Display routes matching the community - - - - - Should accept local VPN route if exported and imported into different VRF (well-known community) - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Should accept VPN route with local nexthop (well-known community) - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Inform EBGP peers to blackhole traffic to prefix (well-known community) - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Exact match of the communities - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Graceful shutdown (well-known community) - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Staled Long-lived Graceful Restart VPN route (well-known community) - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Do not send outside local AS (well-known community) - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Do not advertise to any peer (well-known community) - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Do not export to next AS (well-known community) - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Removed because Long-lived Graceful Restart was not enabled for VPN route (well-known community) - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Do not export to any peer (well-known community) - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - RT translated VPNv4 route filtering (well-known community) - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - RT translated VPNv6 route filtering (well-known community) - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - RT VPNv4 route filtering (well-known community) - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - RT VPNv6 route filtering (well-known community) - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Display routes matching the community-list - - 1-500 name - - - - - - Show BGP routes exactly matching specified community list - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Display detailed information about dampening - - - - - Display paths suppressed due to dampening - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Display flap statistics of routes - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Display detail of configured dampening parameters - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - - - Display routes conforming to the filter-list - - - - - - - - Show BGP routes matching the specified large-communities - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Detailed information on TCP and BGP neighbor connections - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Show detailed BGP IPv4 unicast neighbor information - - - - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Show routes advertised to a BGP neighbor - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Show dampened routes received from BGP neighbor - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Show flap statistics of the routes learned from BGP neighbor - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Show detailed prefix count information for BGP neighbor - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Show information received from BGP neighbor - - - - - Show prefixlist filter - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - - - Show received routes from BGP neighbor - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Show routes learned from BGP neighbor - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - - - Display routes conforming to the prefix-list - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Display routes matching the AS path regular expression - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Show BGP routes matching the specified route map - - policy route-map - - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - diff --git a/op-mode-definitions/include/bgp-common.xml.i b/op-mode-definitions/include/bgp-common.xml.i deleted file mode 100644 index 788fefd2c..000000000 --- a/op-mode-definitions/include/bgp-common.xml.i +++ /dev/null @@ -1,170 +0,0 @@ - - - - Show BGP attribute information - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Display only routes with non-natural netmasks - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - List all bgp community information - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - -#include -#include - - - - policy prefix-list - - - - - - Show BGP IPv4 information - - - - - Show BGP IPv4 unicast information - - - - - Display only routes with non-natural netmasks - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Show BGP routes matching the communities - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Display routes matching the specified communities - - <AA:NN> local-AS no-advertise no-export - - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Show BGP routes matching specified community list - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Show BGP routes exactly matching specified community list - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - - - Show detailed BGP IPv4 unicast neighbor information - - - - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Show routes advertised to a BGP neighbor - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Show detailed prefix count information - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Show the received routes from neighbor - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Show routes learned from neighbor - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - - - Show BGP path information - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Show BGP routes matching the specified prefix list - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Show BGP routes matching the specified AS path regular expression - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Show BGP routes matching the specified route map - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Show summary of BGP information - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - - - Show BGP information for specified IP address or prefix - - <x.x.x.x> <x.x.x.x/x> - - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - - - Show BGP large-community information - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Show BGP memory usage - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Show BGP path information - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - diff --git a/op-mode-definitions/include/bgp-prefix-bestpath-multipath.xml.i b/op-mode-definitions/include/bgp-prefix-bestpath-multipath.xml.i deleted file mode 100644 index 224fa6b45..000000000 --- a/op-mode-definitions/include/bgp-prefix-bestpath-multipath.xml.i +++ /dev/null @@ -1,20 +0,0 @@ - - - - Display only the bestpath - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Display only multipaths - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - - Display route and more specific routes - - ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - diff --git a/op-mode-definitions/include/bgp/afi-common.xml.i b/op-mode-definitions/include/bgp/afi-common.xml.i new file mode 100644 index 000000000..e48482282 --- /dev/null +++ b/op-mode-definitions/include/bgp/afi-common.xml.i @@ -0,0 +1,40 @@ + + + + Community number where AA and NN are (0-65535) + + AA:NN + + + + + + Exact match of the communities + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + List of large-community numbers + + AA:BB:CC + + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + RIB advertisement statistics + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Summary of BGP neighbor status + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + diff --git a/op-mode-definitions/include/bgp/afi-ipv4-ipv6-common.xml.i b/op-mode-definitions/include/bgp/afi-ipv4-ipv6-common.xml.i new file mode 100644 index 000000000..f1b699347 --- /dev/null +++ b/op-mode-definitions/include/bgp/afi-ipv4-ipv6-common.xml.i @@ -0,0 +1,243 @@ + + + + Display routes matching the community + + + + + Should accept local VPN route if exported and imported into different VRF (well-known community) + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Should accept VPN route with local nexthop (well-known community) + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Inform EBGP peers to blackhole traffic to prefix (well-known community) + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Exact match of the communities + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Graceful shutdown (well-known community) + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Staled Long-lived Graceful Restart VPN route (well-known community) + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Do not send outside local AS (well-known community) + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Do not advertise to any peer (well-known community) + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Do not export to next AS (well-known community) + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Removed because Long-lived Graceful Restart was not enabled for VPN route (well-known community) + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Do not export to any peer (well-known community) + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + RT translated VPNv4 route filtering (well-known community) + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + RT translated VPNv6 route filtering (well-known community) + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + RT VPNv4 route filtering (well-known community) + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + RT VPNv6 route filtering (well-known community) + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Display routes matching the community-list + + 1-500 name + + + + + + Show BGP routes exactly matching specified community list + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Display detailed information about dampening + + + + + Display paths suppressed due to dampening + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Display flap statistics of routes + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Display detail of configured dampening parameters + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + + + Display routes conforming to the filter-list + + + + + + + + Show BGP routes matching the specified large-communities + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Detailed information on TCP and BGP neighbor connections + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show detailed BGP IPv4 unicast neighbor information + + + + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show routes advertised to a BGP neighbor + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show dampened routes received from BGP neighbor + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show flap statistics of the routes learned from BGP neighbor + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show detailed prefix count information for BGP neighbor + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show information received from BGP neighbor + + + + + Show prefixlist filter + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + + + Show received routes from BGP neighbor + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show routes learned from BGP neighbor + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + + + Display routes conforming to the prefix-list + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Display routes matching the AS path regular expression + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show BGP routes matching the specified route map + + policy route-map + + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + diff --git a/op-mode-definitions/include/bgp/prefix-bestpath-multipath.xml.i b/op-mode-definitions/include/bgp/prefix-bestpath-multipath.xml.i new file mode 100644 index 000000000..2d91a8253 --- /dev/null +++ b/op-mode-definitions/include/bgp/prefix-bestpath-multipath.xml.i @@ -0,0 +1,20 @@ + + + + Display only the bestpath + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Display only multipaths + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Display route and more specific routes + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + diff --git a/op-mode-definitions/include/bgp/show-ip-bgp-common.xml.i b/op-mode-definitions/include/bgp/show-ip-bgp-common.xml.i new file mode 100644 index 000000000..e599bfb3f --- /dev/null +++ b/op-mode-definitions/include/bgp/show-ip-bgp-common.xml.i @@ -0,0 +1,170 @@ + + + + Show BGP attribute information + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Display only routes with non-natural netmasks + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + List all bgp community information + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + +#include +#include + + + + policy prefix-list + + + + + + Show BGP IPv4 information + + + + + Show BGP IPv4 unicast information + + + + + Display only routes with non-natural netmasks + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show BGP routes matching the communities + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Display routes matching the specified communities + + <AA:NN> local-AS no-advertise no-export + + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show BGP routes matching specified community list + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show BGP routes exactly matching specified community list + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + + + Show detailed BGP IPv4 unicast neighbor information + + + + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show routes advertised to a BGP neighbor + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show detailed prefix count information + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show the received routes from neighbor + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show routes learned from neighbor + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + + + Show BGP path information + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show BGP routes matching the specified prefix list + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show BGP routes matching the specified AS path regular expression + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show BGP routes matching the specified route map + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show summary of BGP information + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + + + Show BGP information for specified IP address or prefix + + <x.x.x.x> <x.x.x.x/x> + + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + + + Show BGP large-community information + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show BGP memory usage + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + + + Show BGP path information + + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + diff --git a/op-mode-definitions/show-bgp.xml.in b/op-mode-definitions/show-bgp.xml.in index 0d0a88dfb..62abbe938 100644 --- a/op-mode-definitions/show-bgp.xml.in +++ b/op-mode-definitions/show-bgp.xml.in @@ -8,7 +8,7 @@ ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - #include + #include Network in the BGP routing table to display @@ -17,7 +17,7 @@ - #include + #include ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ @@ -26,8 +26,8 @@ IPv4 Address Family - #include - #include + #include + #include @@ -38,7 +38,7 @@ - #include + #include ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ @@ -47,8 +47,8 @@ IPv6 Address Family - #include - #include + #include + #include @@ -71,7 +71,7 @@ ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - #include + #include Display information about all EVPN NLRIs diff --git a/op-mode-definitions/show-ip-bgp.xml.in b/op-mode-definitions/show-ip-bgp.xml.in index 9a271b4a5..4097bcf2d 100644 --- a/op-mode-definitions/show-ip-bgp.xml.in +++ b/op-mode-definitions/show-ip-bgp.xml.in @@ -10,7 +10,7 @@ vtysh -c "show ip bgp" - #include + #include Show bgp routing protocol for given VRF @@ -20,7 +20,7 @@ - #include + #include -- cgit v1.2.3