From fb2b3c48a47f2f6c28dbe7420eb1a1f691085db1 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 20 Feb 2021 19:52:22 +0100 Subject: op-mode: bgp: T1513: no need for "sudo" Commit 68f7d1474d ("op-mode: bgp: T1513: add "show bgp" tree containing l2vpn evpn") added the required XML definitions and a bash helper script. The helper always got invoked using "sudo" which is not necessary for vtysh. Calling "sudo" only slows down the system when e.g. RADIUS backed accounts are used. --- op-mode-definitions/include/bgp-afi-common.xml.i | 10 ++-- .../include/bgp-afi-ipv4-ipv6-common.xml.i | 68 +++++++++++----------- .../include/bgp-prefix-bestpath-multipath.xml.i | 6 +- .../include/vtysh-generic-detail.xml.i | 2 +- 4 files changed, 43 insertions(+), 43 deletions(-) (limited to 'op-mode-definitions/include') diff --git a/op-mode-definitions/include/bgp-afi-common.xml.i b/op-mode-definitions/include/bgp-afi-common.xml.i index b496e910a..06cfc42a5 100644 --- a/op-mode-definitions/include/bgp-afi-common.xml.i +++ b/op-mode-definitions/include/bgp-afi-common.xml.i @@ -11,10 +11,10 @@ Exact match of the communities - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ @@ -23,18 +23,18 @@ AA:BB:CC - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ RIB advertisement statistics - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ Summary of BGP neighbor status - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${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 index 6de666603..dc0926375 100644 --- a/op-mode-definitions/include/bgp-afi-ipv4-ipv6-common.xml.i +++ b/op-mode-definitions/include/bgp-afi-ipv4-ipv6-common.xml.i @@ -8,94 +8,94 @@ Should accept local VPN route if exported and imported into different VRF (well-known community) - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ Should accept VPN route with local nexthop (well-known community) - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ Inform EBGP peers to blackhole traffic to prefix (well-known community) - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ Exact match of the communities - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ Graceful shutdown (well-known community) - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ Staled Long-lived Graceful Restart VPN route (well-known community) - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ Do not send outside local AS (well-known community) - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ Do not advertise to any peer (well-known community) - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ Do not export to next AS (well-known community) - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ Removed because Long-lived Graceful Restart was not enabled for VPN route (well-known community) - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ Do not export to any peer (well-known community) - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ RT translated VPNv4 route filtering (well-known community) - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ RT translated VPNv6 route filtering (well-known community) - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ RT VPNv4 route filtering (well-known community) - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ RT VPNv6 route filtering (well-known community) - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ @@ -109,10 +109,10 @@ Show BGP routes exactly matching specified community list - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ @@ -123,19 +123,19 @@ Display paths suppressed due to dampening - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ Display flap statistics of routes - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ Display detail of configured dampening parameters - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ @@ -151,13 +151,13 @@ Show BGP routes matching the specified large-communities - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ Detailed information on TCP and BGP neighbor connections - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ @@ -166,31 +166,31 @@ - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ Show routes advertised to a BGP neighbor - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ Show dampened routes received from BGP neighbor - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ Show flap statistics of the routes learned from BGP neighbor - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ Show detailed prefix count information for BGP neighbor - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ @@ -201,7 +201,7 @@ Show prefixlist filter - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ @@ -209,13 +209,13 @@ Show received routes from BGP neighbor - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ Show routes learned from BGP neighbor - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ @@ -223,13 +223,13 @@ Display routes conforming to the prefix-list - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ Display routes matching the AS path regular expression - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ @@ -238,6 +238,6 @@ policy route-map - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${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 index 3bea5cf13..224fa6b45 100644 --- a/op-mode-definitions/include/bgp-prefix-bestpath-multipath.xml.i +++ b/op-mode-definitions/include/bgp-prefix-bestpath-multipath.xml.i @@ -3,18 +3,18 @@ Display only the bestpath - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ Display only multipaths - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ Display route and more specific routes - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ diff --git a/op-mode-definitions/include/vtysh-generic-detail.xml.i b/op-mode-definitions/include/vtysh-generic-detail.xml.i index 9e1f90649..5a3097a77 100644 --- a/op-mode-definitions/include/vtysh-generic-detail.xml.i +++ b/op-mode-definitions/include/vtysh-generic-detail.xml.i @@ -3,6 +3,6 @@ Detailed information - sudo ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ -- cgit v1.2.3