From 3d8a84781500ee193564fc7ef1e173d0270ad5c9 Mon Sep 17 00:00:00 2001 From: sever-sever Date: Fri, 26 Mar 2021 09:14:02 +0000 Subject: bgp: T3434: op-mode CLI refactoring for support vrf --- op-mode-definitions/include/bgp-common.xml.i | 170 +++++++++++++++++++++++++++ op-mode-definitions/show-ip-bgp.xml.in | 169 ++------------------------ 2 files changed, 177 insertions(+), 162 deletions(-) create mode 100644 op-mode-definitions/include/bgp-common.xml.i diff --git a/op-mode-definitions/include/bgp-common.xml.i b/op-mode-definitions/include/bgp-common.xml.i new file mode 100644 index 000000000..a1154d965 --- /dev/null +++ b/op-mode-definitions/include/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-ip-bgp.xml.in b/op-mode-definitions/show-ip-bgp.xml.in index 690de0a1d..9a271b4a5 100644 --- a/op-mode-definitions/show-ip-bgp.xml.in +++ b/op-mode-definitions/show-ip-bgp.xml.in @@ -10,174 +10,19 @@ vtysh -c "show ip bgp" - - - Show BGP attribute information - - vtysh -c "show ip bgp attribute-info" - - - - Display only routes with non-natural netmasks - - vtysh -c "show ip bgp cidr-only" - - - - List all bgp community information - - vtysh -c "show ip bgp community-info" - - #include - #include - + #include + + Show bgp routing protocol for given VRF - policy prefix-list + vrf name + all - - - - Show BGP IPv4 information - - - - Show BGP IPv4 unicast information - - - - - Display only routes with non-natural netmasks - - vtysh -c "show ip bgp ipv4 unicast cidr-only" - - - - Show BGP routes matching the communities - - vtysh -c "show ip bgp ipv4 unicast community" - - - - Display routes matching the specified communities - - <AA:NN> local-AS no-advertise no-export - - - vtysh -c "show ip bgp ipv4 unicast community $7" - - - - Show BGP routes matching specified community list - - vtysh -c "show ip bgp ipv4 unicast community-list $7" - - - - Show BGP routes exactly matching specified community list - - vtysh -c "show ip bgp ipv4 unicast community-list $7 exact-match" - - - - - - Show detailed BGP IPv4 unicast neighbor information - - - - - vtysh -c "show ip bgp ipv4 unicast neighbors $7" - - - - Show routes advertised to a BGP neighbor - - vtysh -c "show ip bgp ipv4 unicast neighbor $7 advertised-routes" - - - - Show detailed prefix count information - - vtysh -c "show ip bgp ipv4 unicast neighbor $7 prefix-counts" - - - - Show the received routes from neighbor - - vtysh -c "show ip bgp ipv4 unicast neighbor $7 received-routes" - - - - Show routes learned from neighbor - - vtysh -c "show ip bgp ipv4 unicast neighbor $7 routes" - - - - - - Show BGP path information - - vtysh -c "show ip bgp ipv4 unicast paths" - - - - Show BGP routes matching the specified prefix list - - vtysh -c "show ip bgp ipv4 unicast prefix-list $7" - - - - Show BGP routes matching the specified AS path regular expression - - vtysh -c "show ip bgp ipv4 unicast regexp $5" - - - - Show BGP routes matching the specified route map - - vtysh -c "show ip bgp route-map $5" - - - - Show summary of BGP information - - vtysh -c "show ip bgp summary" - - - - - - Show BGP information for specified IP address or prefix - - <x.x.x.x> <x.x.x.x/x> - - - vtysh -c "show ip bgp $6" - + #include - - - - Show BGP large-community information - - vtysh -c "show ip bgp large-community-info" - - - - Show BGP memory usage - - vtysh -c "show ip bgp memory" - - - - Show BGP path information - - vtysh -c "show ip bgp paths" - + -- cgit v1.2.3