sonic-buildimage/dockers/docker-fpm-frr/unisolate.j2
Taoyu Li a2fe0212be [ConfigDB] Move all BGP configuration into DB (#861)
- BGP data read from minigraph.py now match DB schema
- BGP templates are updated
- bgpcfgd can now deal with runtime neighbor create/delete
2017-08-08 16:23:58 -07:00

21 lines
598 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 eqaul in 'sed' command above
configure terminal
router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
{% for neighbor_ip in BGP_NEIGHBOR %}
no neighbor {{ neighbor_ip }} route-map ISOLATE out
{% endfor %}
exit
exit
{% for neighbor_ip in BGP_NEIGHBOR %}
clear ip bgp {{ neighbor_ip }} soft out
{% endfor %}