diff options
author | rbalocca <rbalocca@vyatta.com> | 2008-03-14 14:44:16 -0700 |
---|---|---|
committer | rbalocca <rbalocca@vyatta.com> | 2008-03-14 14:44:16 -0700 |
commit | e3b1e82cc2f5183993e7136bbf452b041e7055a6 (patch) | |
tree | dc67261e17b88786fece199d9c6cd5b973637416 /templates/protocols | |
parent | 0127c333b2634ba2833569e7ce546c898312bd99 (diff) | |
parent | 8d008f9f2cbbd80a54d30e94c1b7daa3d1c172f7 (diff) | |
download | vyatta-cfg-quagga-e3b1e82cc2f5183993e7136bbf452b041e7055a6.tar.gz vyatta-cfg-quagga-e3b1e82cc2f5183993e7136bbf452b041e7055a6.zip |
Merge branch 'glendale' into hollywood
Diffstat (limited to 'templates/protocols')
-rw-r--r-- | templates/protocols/bgp/node.tag/neighbor/node.tag/disable/node.def | 12 | ||||
-rw-r--r-- | templates/protocols/bgp/node.tag/network/node.def | 50 | ||||
-rw-r--r-- | templates/protocols/bgp/node.tag/network/node.tag/backdoor/node.def (renamed from templates/protocols/bgp/node.tag/network/node.tag/.backdoor/node.def) | 0 | ||||
-rw-r--r-- | templates/protocols/ospf/access-list/node.def | 4 |
4 files changed, 27 insertions, 39 deletions
diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/disable/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/disable/node.def deleted file mode 100644 index 673af92f..00000000 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/disable/node.def +++ /dev/null @@ -1,12 +0,0 @@ -help: Disable the Address Family for this Neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" -update:expression: "if [ -n \"$VAR(../remote-as/@)\" ]; then \ - peer=\"remote-as $VAR(../remote-as/@)\"; \ - else \ - peer=\"peer-group $VAR(../peer-group/@)\"; \ - fi; \ - ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ - -c \"neighbor $VAR(../@) $peer\" \ - -c \"no neighbor $VAR(../@) activate \" " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"router bgp $VAR(../../@)\" \ - -c \"neighbor $VAR(../@) activate \" " diff --git a/templates/protocols/bgp/node.tag/network/node.def b/templates/protocols/bgp/node.tag/network/node.def index acd2475b..c6061749 100644 --- a/templates/protocols/bgp/node.tag/network/node.def +++ b/templates/protocols/bgp/node.tag/network/node.def @@ -1,31 +1,31 @@ tag: type: ipv4net help: Specify a network to announce via BGP -syntax:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --check-prefix-boundry $VAR(@)" +syntax:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --check-prefix-boundry $VAR(@)"; + "Prefix doesn't fall on a natural boundry" -commit:expression: !($VAR(./backdoor/) != "" && $VAR(./route-map/) != ""); \ - "May specify route-map or backdoor but not both" +commit:expression: !($VAR(./backdoor/) != "" && $VAR(./route-map/) != ""); + "May specify route-map or backdoor but not both" -delete:expression: "touch /tmp/`echo $VAR(@) | sed 's!/!!'`.$PPID" +delete: touch /tmp/`echo $VAR(@) | sed 's!/!!'`.$PPID -end:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -noerr \ - -c \"configure terminal\" \ - -c \"router bgp $VAR(../@)\" \ - -c \"no network $VAR(@)\"; \ - if [ -f \"/tmp/`echo $VAR(@) | sed 's!/!!'`.$PPID\" ]; then \ - rm -rf /tmp/`echo $VAR(@) | sed 's!/!!'`.$PPID; \ - else \ -# -# Commenting out until cli bug 2525 is fixed -# -# if [ -n \"$VAR(./backdoor/)\" ]; then -# COND=\"backdoor\"; -# fi; - if [ -n \"$VAR(./route-map/@)\" ]; then \ - COND=\"route-map $VAR(./route-map/@)\"; \ - fi; \ - ${vyatta_sbindir}/vyatta-vtysh.pl \ - -c \"configure terminal\" \ - -c \"router bgp $VAR(../@)\" \ - -c \"network $VAR(@) $COND\"; \ - fi; " +end: ${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c "configure terminal" -c "router bgp $VAR(../@)" -c "no network $VAR(@)"; + + if [ -f "/tmp/`echo $VAR(@) | sed 's!/!!'`.$PPID" ]; then + rm -rf /tmp/`echo $VAR(@) | sed 's!/!!'`.$PPID; + else + # uncomment and replace the call to vyatta-check-typeless-node.pl pending bug 2525 + #if [ -n \"$VAR(./backdoor/)\" ]; then + # COND=\"backdoor\"; + #fi; + ${vyatta_sbindir}/vyatta-check-typeless-node.pl "protocols bgp $VAR(../@) network $VAR(@) backdoor"; + if [ $? -eq 0 ]; then + cond="backdoor "; + fi ; + + if [ -n "$VAR(./route-map/@)" ]; then + COND="route-map $VAR(./route-map/@)"; + fi; + + ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" -c "router bgp $VAR(../@)" -c "network $VAR(@) $cond"; + fi; diff --git a/templates/protocols/bgp/node.tag/network/node.tag/.backdoor/node.def b/templates/protocols/bgp/node.tag/network/node.tag/backdoor/node.def index b7dc6950..b7dc6950 100644 --- a/templates/protocols/bgp/node.tag/network/node.tag/.backdoor/node.def +++ b/templates/protocols/bgp/node.tag/network/node.tag/backdoor/node.def diff --git a/templates/protocols/ospf/access-list/node.def b/templates/protocols/ospf/access-list/node.def index 6ec0f65e..e806f106 100644 --- a/templates/protocols/ospf/access-list/node.def +++ b/templates/protocols/ospf/access-list/node.def @@ -1,4 +1,4 @@ tag: -type: txt +type: u32 commit:expression: $VAR(./export/) != ""; "must add protocol to filter" -help: access-list to filter networks in routing updates +help: Access-list to filter networks in routing updates |