diff options
author | rbalocca <rbalocca@vyatta.com> | 2008-04-09 12:04:39 -0700 |
---|---|---|
committer | rbalocca <rbalocca@vyatta.com> | 2008-04-09 12:04:39 -0700 |
commit | c9b4583f38f4bc7fedef6f05d31ef7ea2020473a (patch) | |
tree | 90e329b103b904144fef2f1eea2e6cb620ab215c /templates/protocols | |
parent | d26b9a2c82d8df98211d2362a3b235f8420eb0d1 (diff) | |
parent | 67c9ab299d135e8866e81868843197dd3aa78d02 (diff) | |
download | vyatta-cfg-quagga-c9b4583f38f4bc7fedef6f05d31ef7ea2020473a.tar.gz vyatta-cfg-quagga-c9b4583f38f4bc7fedef6f05d31ef7ea2020473a.zip |
Merge branch 'glendale' into hollywood
Diffstat (limited to 'templates/protocols')
16 files changed, 138 insertions, 123 deletions
diff --git a/templates/protocols/ospf/access-list/node.tag/export/node.def b/templates/protocols/ospf/access-list/node.tag/export/node.def index 98e6e169..b553053c 100644 --- a/templates/protocols/ospf/access-list/node.tag/export/node.def +++ b/templates/protocols/ospf/access-list/node.tag/export/node.def @@ -1,17 +1,16 @@ multi: type: txt help: Filter outgoing routing updates -syntax:expression: $VAR(@) in "bgp", "connected", "isis", "kernel", "rip", "static"; "Must be (bgp, connected, isis, kernel, rip, or static)" -create:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"router ospf\" \ - -c \"distribute-list $VAR(../@) out $VAR(@) \"; " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"router ospf\" \ - -c \"no distribute-list $VAR(../@) out $VAR(@) \"; " +syntax:expression: $VAR(@) in "bgp", "connected", "kernel", "rip", "static"; "Must be (bgp, connected, kernel, rip, or static)" +create: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "router ospf" \ + -c "distribute-list $VAR(../@) out $VAR(@)"; +delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "router ospf" \ + -c "no distribute-list $VAR(../@) out $VAR(@)"; comp_help: possible completions: - bgp Filter bgp routes - connected Filter connected routes - isis Filter isis routes - kernel Filter kernel routes - rip Filter rip routes - static Filter static routes + bgp Filter bgp routes + connected Filter connected routes + kernel Filter kernel routes + rip Filter rip routes + static Filter static routes diff --git a/templates/protocols/ospf/area/node.tag/area-type/nssa/default-cost/node.def b/templates/protocols/ospf/area/node.tag/area-type/nssa/default-cost/node.def index 95f73f69..21a486a7 100644 --- a/templates/protocols/ospf/area/node.tag/area-type/nssa/default-cost/node.def +++ b/templates/protocols/ospf/area/node.tag/area-type/nssa/default-cost/node.def @@ -1,11 +1,19 @@ type: u32 help: Set the summary-default cost of nssa area syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 16777215; "Cost must be between 0-16777215" -update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"router ospf\" \ - -c \"area $VAR(../../../@) default-cost $VAR(@)\"; " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"router ospf\" \ - -c \"no area $VAR(../../../@) default-cost $VAR(@)\"; " + +create: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "router ospf" \ + -c "area $VAR(../../../@) nssa" \ + -c "area $VAR(../../../@) default-cost $VAR(@)"; + +update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "router ospf" \ + -c "area $VAR(../../../@) default-cost $VAR(@)"; + +delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "router ospf" \ + -c "no area $VAR(../../../@) default-cost $VAR(@)"; + comp_help: possible completions: - <0-16777215> Set summary default cost + <0-16777215> Set summary default cost diff --git a/templates/protocols/ospf/area/node.tag/area-type/nssa/no-summary/node.def b/templates/protocols/ospf/area/node.tag/area-type/nssa/no-summary/node.def index fa1f76e4..4999ff7a 100644 --- a/templates/protocols/ospf/area/node.tag/area-type/nssa/no-summary/node.def +++ b/templates/protocols/ospf/area/node.tag/area-type/nssa/no-summary/node.def @@ -1,7 +1 @@ help: Do not inject inter-area routes into stub -create:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"router ospf\" \ - -c \"area $VAR(../../../@) nssa no-summary \"; " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"router ospf\" \ - -c \"no area $VAR(../../../@) nssa no-summary \"; " diff --git a/templates/protocols/ospf/area/node.tag/area-type/nssa/node.def b/templates/protocols/ospf/area/node.tag/area-type/nssa/node.def index 9ac0569f..b27f0b3a 100644 --- a/templates/protocols/ospf/area/node.tag/area-type/nssa/node.def +++ b/templates/protocols/ospf/area/node.tag/area-type/nssa/node.def @@ -2,7 +2,26 @@ help: nssa OSPF area syntax:expression: ! $VAR(../../@) in "0", "0.0.0.0"; "Backbone can't be NSSA" syntax:expression: $VAR(../normal/) == "" ; "Must delete normal area type first" syntax:expression: $VAR(../stub/) == "" ; "Must delete stub area type first" -update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"router ospf\" -c \"area $VAR(../../@) nssa\"; " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"router ospf\" -c \"no area $VAR(../../@) nssa\"; " + +delete: touch /tmp/ospf-area-nssa.$PPID +end: if [ -f "/tmp/ospf-area-nssa.$PPID" ]; then + ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "router ospf" -c "no area $VAR(../../@) nssa"; + rm /tmp/ospf-area-nssa.$PPID; + else + if [ -n "$VAR(translate/@)" ]; then + PARM="translate-$VAR(translate/@)"; + fi; + # using workaround pending bug 2525 + # + # if [ -n "$VAR(no-summary/)" ]; then + # PARM="$PARM no-summary"; + # fi; + ${vyatta_sbindir}/vyatta-check-typeless-node.pl \ + "protocols ospf area $VAR(../../@) area-type nssa no-summary"; + if [ $? -eq 0 ] ; then + PARM="$PARM no-summary"; + fi; + ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "router ospf" -c "area $VAR(../../@) nssa $PARM"; + fi; diff --git a/templates/protocols/ospf/area/node.tag/area-type/nssa/translate/node.def b/templates/protocols/ospf/area/node.tag/area-type/nssa/translate/node.def index ff32811f..9b6db051 100644 --- a/templates/protocols/ospf/area/node.tag/area-type/nssa/translate/node.def +++ b/templates/protocols/ospf/area/node.tag/area-type/nssa/translate/node.def @@ -2,12 +2,7 @@ type: txt help: Configure NSSA-ABR default: "candidate" syntax:expression: $VAR(@) in "always", "candidate", "never"; "Must be (always, candidate, or never)" -update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"router ospf\" \ - -c \"area $VAR(../../../@) nssa translate-$VAR(@) \"; " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"router ospf\" \ - -c \"area $VAR(../../../@) nssa translate-candidate \"; " + comp_help: possible completions: always Configure NSSA-ABR to always translate candidate Configure NSSA-ABR for translate election (default) diff --git a/templates/protocols/ospf/area/node.tag/area-type/stub/default-cost/node.def b/templates/protocols/ospf/area/node.tag/area-type/stub/default-cost/node.def index cc7d96fa..78c28760 100644 --- a/templates/protocols/ospf/area/node.tag/area-type/stub/default-cost/node.def +++ b/templates/protocols/ospf/area/node.tag/area-type/stub/default-cost/node.def @@ -1,11 +1,19 @@ type: u32 help: Set the summary-default cost of stub area syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 16777215; "Cost must be between 0-16777215" -update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"router ospf\" \ - -c \"area $VAR(../../../@) default-cost $VAR(@)\"; " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"router ospf\" \ - -c \"no area $VAR(../../../@) default-cost $VAR(@)\"; " + +create: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "router ospf" \ + -c "area $VAR(../../../@) stub" \ + -c "area $VAR(../../../@) default-cost $VAR(@)"; + +update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "router ospf" \ + -c "area $VAR(../../../@) default-cost $VAR(@)"; + +delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "router ospf" \ + -c "no area $VAR(../../../@) default-cost $VAR(@)"; + comp_help: possible completions: <0-16777215> Set summary default cost of stub area diff --git a/templates/protocols/ospf/capability/node.def b/templates/protocols/ospf/capability/node.def deleted file mode 100644 index 089d322e..00000000 --- a/templates/protocols/ospf/capability/node.def +++ /dev/null @@ -1 +0,0 @@ -help: Enable specific OSPF feature diff --git a/templates/protocols/ospf/capability/opaque/node.def b/templates/protocols/ospf/capability/opaque/node.def deleted file mode 100644 index da95642a..00000000 --- a/templates/protocols/ospf/capability/opaque/node.def +++ /dev/null @@ -1,5 +0,0 @@ -help: Opaque LSA -create:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"router ospf\" -c \"capability opaque\"; " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"router ospf\" -c \"no capability opaque\"; " diff --git a/templates/protocols/ospf/compatible/node.def b/templates/protocols/ospf/compatible/node.def deleted file mode 100644 index a92c9f0e..00000000 --- a/templates/protocols/ospf/compatible/node.def +++ /dev/null @@ -1 +0,0 @@ -help: OSPF compatibility list diff --git a/templates/protocols/ospf/compatible/rfc1583/node.def b/templates/protocols/ospf/compatible/rfc1583/node.def deleted file mode 100644 index e8145fb2..00000000 --- a/templates/protocols/ospf/compatible/rfc1583/node.def +++ /dev/null @@ -1,7 +0,0 @@ -help: compatible with RFC 1583 -create:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"router ospf\" \ - -c \"compatible rfc1583\"; " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"router ospf\" \ - -c \"no compatible rfc1583\"; " diff --git a/templates/protocols/ospf/default-information/originate/node.def b/templates/protocols/ospf/default-information/originate/node.def index 540b39bd..084d529e 100644 --- a/templates/protocols/ospf/default-information/originate/node.def +++ b/templates/protocols/ospf/default-information/originate/node.def @@ -1,24 +1,30 @@ help: Distribute a default route -delete:expression: "touch /tmp/ospf-default-info.$PPID" -end:expression: "\ - if [ -f \"/tmp/ospf-default-info.$PPID\" ]; then \ - ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"router ospf\" \ - -c \"no default-information originate \"; \ - else \ - if [ -n \"$VAR(./always/@)\" ]; then \ - PARM=\"always\"; \ - fi; \ - if [ -n \"$VAR(./metric/@)\" ]; then \ - PARM=\"$PARM metric $VAR(./metric/@)\"; \ - fi; \ - if [ -n \"$VAR(./metric-type/@)\" ]; then \ - PARM=\"$PARM metric-type $VAR(./metric-type/@)\"; \ - fi; \ - if [ -n \"$VAR(./route-map/@)\" ]; then \ - PARM=\"$PARM route-map $VAR(./route-map/@)\"; \ - fi; \ - ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"router ospf\" \ - -c \"default-information originate $PARM\"; \ - fi; " +delete: touch /tmp/ospf-default-info.$PPID +end: if [ -f "/tmp/ospf-default-info.$PPID" ]; then + ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "router ospf" \ + -c "no default-information originate"; + else + # uncomment and remove script pending bug 2525 + # + # if [ -n "$VAR(./always/)" ]; then + # PARM="always"; + # fi; + ${vyatta_sbindir}/vyatta-check-typeless-node.pl \ + "protocols ospf default-information originate always"; + if [ $? -eq 0 ] ; then + PARM="always"; + fi; + if [ -n "$VAR(./metric/@)" ]; then + PARM="$PARM metric $VAR(./metric/@)"; + fi; + if [ -n "$VAR(./metric-type/@)" ]; then + PARM="$PARM metric-type $VAR(./metric-type/@)"; + fi; + if [ -n "$VAR(./route-map/@)" ]; then + PARM="$PARM route-map $VAR(./route-map/@)"; + fi; + ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "router ospf" \ + -c "default-information originate $PARM"; + fi; diff --git a/templates/protocols/ospf/neighbor/node.tag/poll-interval/node.def b/templates/protocols/ospf/neighbor/node.tag/poll-interval/node.def index de508545..7c234d10 100644 --- a/templates/protocols/ospf/neighbor/node.tag/poll-interval/node.def +++ b/templates/protocols/ospf/neighbor/node.tag/poll-interval/node.def @@ -1,11 +1,12 @@ type: u32 help: Dead neighbor polling interval +default: 60 syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "Must be between 1-65535 seconds" -update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"router ospf\" \ - -c \"neighbor $VAR(../@) poll-interval $VAR(@)\"; " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"router ospf\" \ - -c \"no neighbor $VAR(../@) poll-interval $VAR(@)\"; " +update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "router ospf" \ + -c "neighbor $VAR(../@) poll-interval $VAR(@)"; +delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "router ospf" \ + -c "neighbor $VAR(../@) poll-interval 60"; comp_help: possible completions: - <1-65535> Seconds between dead neighbor polling interval + <1-65535> Seconds between dead neighbor polling interval (default 60) diff --git a/templates/protocols/ospf/neighbor/node.tag/priority/node.def b/templates/protocols/ospf/neighbor/node.tag/priority/node.def index 167dec0f..16af4dc3 100644 --- a/templates/protocols/ospf/neighbor/node.tag/priority/node.def +++ b/templates/protocols/ospf/neighbor/node.tag/priority/node.def @@ -1,11 +1,12 @@ type: u32 help: Neighbor priority in seconds +default: 0 syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 255; "Priority must be between 0-255" -update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"router ospf\" \ - -c \"neighbor $VAR(../@) priority $VAR(@)\"; " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"router ospf\" \ - -c \"no neighbor $VAR(../@) priority $VAR(@)\"; " +update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "router ospf" \ + -c "neighbor $VAR(../@) priority $VAR(@)"; +delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "router ospf" \ + -c "neighbor $VAR(../@) priority 0"; comp_help: possible completions: - <0-255> Set neighbor priority + <0-255> Set neighbor priority (default 0) diff --git a/templates/protocols/ospf/parameters/abr-type/node.def b/templates/protocols/ospf/parameters/abr-type/node.def index b81d798e..3e63c885 100644 --- a/templates/protocols/ospf/parameters/abr-type/node.def +++ b/templates/protocols/ospf/parameters/abr-type/node.def @@ -2,14 +2,14 @@ type: txt help: Set OSPF ABR type default: "cisco" syntax:expression: $VAR(@) in "cisco", "ibm", "shortcut", "standard"; "Must be (cisco, ibm, shortcut, standard)" -update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"router ospf\" \ - -c \"ospf abr-type $VAR(@)\"; " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"router ospf\" \ - -c \"no ospf abr-type $VAR(@)\"; " +update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "router ospf" \ + -c "ospf abr-type $VAR(@)"; +delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "router ospf" \ + -c "ospf abr-type cisco"; comp_help: possible completions: - cisco Set cisco ABR type (default) - ibm Set ibm ABR type - shortcut Set shortcut ABR type - standard Set standard ABR type + cisco Set cisco ABR type (default) + ibm Set ibm ABR type + shortcut Set shortcut ABR type + standard Set standard ABR type diff --git a/templates/protocols/ospf/refresh/timers/node.def b/templates/protocols/ospf/refresh/timers/node.def index 83334d11..91d285cd 100644 --- a/templates/protocols/ospf/refresh/timers/node.def +++ b/templates/protocols/ospf/refresh/timers/node.def @@ -1,11 +1,11 @@ type: u32 help: Set refresh timer syntax:expression: $VAR(@) >= 10 && $VAR(@) <= 1800; "must be between 10-1800" -update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" / - -c \"router ospf\" \ - -c \"no refresh timer\" -c \"refresh timer $VAR(@)\"; " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" / - -c \"router ospf\" \ - -c \"no refresh timer $VAR(@)\"; " +update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "router ospf" \ + -c "no refresh timer" -c "refresh timer $VAR(@)"; +delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "router ospf" \ + -c "no refresh timer $VAR(@)"; comp_help: possible completions: - <10-1800> Timer value in seconds + <10-1800> Timer value in seconds diff --git a/templates/protocols/ospf/timers/throttle/spf/node.def b/templates/protocols/ospf/timers/throttle/spf/node.def index d94698ea..9f68167c 100644 --- a/templates/protocols/ospf/timers/throttle/spf/node.def +++ b/templates/protocols/ospf/timers/throttle/spf/node.def @@ -1,14 +1,12 @@ help: OSPF SPF timers -delete:expression: "touch /tmp/ospf-timer.$PPID" -end:expression: "\ - if [ -f \"/tmp/ospf-timer.$PPID\" ]; then \ - ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"router ospf\" \ - -c \"no timers throttle spf\"; \ - rm /tmp/ospf-timer.$PPID; \ - else \ - ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"router ospf\" \ - -c \"timers throttle spf $VAR(delay/@) \ - $VAR(initial-holdtime/@) $VAR(max-holdtime/@)\"; \ - fi; " +delete: touch /tmp/ospf-timer.$PPID +end: if [ -f "/tmp/ospf-timer.$PPID" ]; then + ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "router ospf" \ + -c "no timers throttle spf"; + rm /tmp/ospf-timer.$PPID; + else + ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "router ospf" \ + -c "timers throttle spf $VAR(delay/@) $VAR(initial-holdtime/@) $VAR(max-holdtime/@)"; + fi; |