From 3f2173873e0519ea253759e7e119b2bcaea596bb Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Mon, 13 Dec 2021 21:06:47 +0100 Subject: op-mode: xml: refactor "show ip(v6) route" to use #include building blocks This change then adds supper to filter for given route types under a VRF instance. You will have "show ip route bgp" in the global VRF and "show ip route vrf red bgp" in the red VRF. Same commands apply to IPv6 routes. --- op-mode-definitions/show-ip-route.xml.in | 109 +++++++------------------------ 1 file changed, 25 insertions(+), 84 deletions(-) (limited to 'op-mode-definitions/show-ip-route.xml.in') diff --git a/op-mode-definitions/show-ip-route.xml.in b/op-mode-definitions/show-ip-route.xml.in index fdbb6859d..1e906672d 100644 --- a/op-mode-definitions/show-ip-route.xml.in +++ b/op-mode-definitions/show-ip-route.xml.in @@ -13,12 +13,7 @@ vtysh -c "show ip route" - - - Show IP BGP routes - - vtysh -c "show ip route bgp" - + #include Show kernel route cache @@ -34,12 +29,7 @@ ip -s route list cache $5 - - - Show IP connected routes - - vtysh -c "show ip route connected" - + #include Show kernel route table @@ -55,76 +45,15 @@ ip -s route list $5 - - - Show IP IS-IS routes - - vtysh -c "show ip route isis" - - - - Show IP kernel routes - - vtysh -c "show ip route kernel" - - - - Show IP OSPF routes - - vtysh -c "show ip route ospf" - - - - Show IP RIP routes - - vtysh -c "show ip route rip" - - - - Show IP static routes - - vtysh -c "show ip route static" - - - - Show IP routes summary - - vtysh -c "show ip route summary" - - - - Show IP supernet routes - - vtysh -c "show ip route supernets-only" - - - - Show IP routes in policy table - - - - - Show IP routes in policy table - - <1-200> - - - vtysh -c "show ip route table $5" - - - - Show only routes with tag - - - - - Tag value - - <1-4294967295> - - - vtysh -c "show ip route tag $5" - + #include + #include + #include + #include + #include + #include + #include + #include + #include Show IP routes in VRF @@ -133,7 +62,19 @@ vrf name - vtysh -c "show ip route vrf $5" + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + @@ -144,7 +85,7 @@ <x.x.x.x> <x.x.x.x/x> - vtysh -c "show ip route $4" + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ -- cgit v1.2.3