From 1520deeddfb6928e0b7053a6f526909407868dfd Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Tue, 5 Jul 2022 12:21:17 +0200 Subject: op-mode: bgp: T4494: re-use available building blocks for BGP resets --- op-mode-definitions/reset-ip-bgp.xml.in | 151 ++------------------------------ 1 file changed, 6 insertions(+), 145 deletions(-) (limited to 'op-mode-definitions') diff --git a/op-mode-definitions/reset-ip-bgp.xml.in b/op-mode-definitions/reset-ip-bgp.xml.in index 913d76666..34a4503d9 100644 --- a/op-mode-definitions/reset-ip-bgp.xml.in +++ b/op-mode-definitions/reset-ip-bgp.xml.in @@ -6,7 +6,7 @@ - Clear Border Gateway Protocol (BGP) statistics or status + Border Gateway Protocol (BGP) information @@ -41,108 +41,8 @@ - - - Clear all external peers - - WORD - - - vtysh -c "clear bgp ipv4 external" - - - - Send route-refresh unless using 'soft-reconfiguration inbound' - - vtysh -c "clear bgp ipv4 external in" - - - - Push out prefix-list ORF and do inbound soft reconfig - - vtysh -c "clear bgp ipv4 external in prefix-filter" - - - - - - Resend all outbound updates - - vtysh -c "clear bgp ipv4 external out" - - - - Soft reconfig inbound and outbound updates - - vtysh -c "clear bgp ipv4 external soft" - - - - Clear via soft reconfig of inbound update - - vtysh -c "clear bgp ipv4 external soft in" - - - - Resend all outbound updates - - vtysh -c "clear bgp ipv4 external soft out" - - - - - - - - Clear BGP statistics or status for given peer-group - - WORD - - - vtysh -c "clear bgp ipv4 peer-group $5" - - - - Send route-refresh unless using 'soft-reconfiguration inbound' - - vtysh -c "clear bgp ipv4 peer-group $5 in" - - - - Push out prefix-list ORF and do inbound soft reconfig - - vtysh -c "clear bgp ipv4 peer-group $5 in prefix-filter" - - - - - - Resend all outbound updates - - vtysh -c "clear bgp ipv4 peer-group $5 out" - - - - Soft reconfig inbound and outbound updates - - vtysh -c "clear bgp ipv4 peer-group $5 soft" - - - - Clear via soft reconfig of inbound update - - vtysh -c "clear bgp ipv4 peer-group $5 soft in" - - - - Resend all outbound updates - - vtysh -c "clear bgp ipv4 peer-group $5 soft out" - - - - - + #include + #include Clear BGP statistics or status for vrf @@ -172,53 +72,14 @@ - Clear BGP neighbor IP address + BGP IPv4/IPv6 neighbor to clear - vtysh -c "clear bgp ipv4 $4" + ${vyos_op_scripts_dir}/vtysh_wrapper.sh $@ - - - Send route-refresh unless using 'soft-reconfiguration inbound' - - vtysh -c "clear bgp ipv4 $4 in" - - - - Push out prefix-list ORF and do inbound soft reconfig - - vtysh -c "clear bgp ipv4 $4 in prefix-filter" - - - - - - Resend all outbound updates - - vtysh -c "clear bgp ipv4 $4 out" - - - - Soft reconfig inbound and outbound updates - - vtysh -c "clear bgp ipv4 $4 soft" - - - - Clear via soft reconfig of inbound update - - vtysh -c "clear bgp ipv4 $4 soft in" - - - - Resend all outbound updates - - vtysh -c "clear bgp ipv4 $4 soft out" - - - + #include -- cgit v1.2.3