summaryrefslogtreecommitdiff
path: root/templates/protocols/bgp/node.def
blob: ca7a448b0fb5f6d872fb37184a3e671f187222d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
tag:1
priority: 730
type: u32
help: Border Gateway Protocol (BGP) parameters
val_help: u32:1-4294967294; AS number

syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 4294967294 ; \
		   "AS number must be between 1 and 4294967294"

end: if [ -z "$VAR(.)" ] || [ "$COMMIT_ACTION" != DELETE ]; then
       vtysh -d bgpd -c 'conf t' -c 'router bgp $VAR(@)' -c 'no bgp ebgp-requires-policy'

       if [ -z $VAR(./parameters/network-import-check/) ]; then
         vtysh -d bgpd -c 'conf t' -c 'router bgp $VAR(@)' -c 'no bgp network import-check'
       fi

       /opt/vyatta/sbin/vyatta-bgp.pl --main
       vtysh -d bgpd -c 'sh run' > /opt/vyatta/etc/quagga/bgpd.conf
       sudo vtysh --writeconfig --noerror
     else
       rm -f /opt/vyatta/etc/quagga/bgpd.conf
     fi