sonic-buildimage/dockers/docker-fpm-quagga/isolate.j2
Sagar Balani 559132103e
Address upstream comments (#11)
* Remove all non bfn specific changes from upstream PR
2018-06-20 13:28:43 -07:00

21 lines
603 B
Django/Jinja
Executable File

#!/bin/bash
## vtysh only accepts script in stdin, so cannot be directly used in shebang
## Cut the tail of this script and feed vtysh stdin
sed -n -e '9,$p' < "$0" | vtysh "$@"
## Exit with vtysh return code
exit $?
## vtysh script start from next line, which line number MUST equal in 'sed' command above
configure terminal
router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
{% for neighbor_addr in BGP_NEIGHBOR %}
neighbor {{ neighbor_addr }} route-map ISOLATE out
{% endfor %}
exit
exit
{% for neighbor_addr in BGP_NEIGHBOR %}
clear ip bgp {{ neighbor_addr }} soft out
{% endfor %}