diff options
author | rbalocca <rbalocca@vyatta.com> | 2008-03-18 16:54:17 -0700 |
---|---|---|
committer | rbalocca <rbalocca@vyatta.com> | 2008-03-18 16:54:17 -0700 |
commit | a5b27ed87185918adff12d777df6ab7ba82ca3b2 (patch) | |
tree | aa11042c8f39f99c5263c3c7593f7923a3b90834 /templates | |
parent | e3b1e82cc2f5183993e7136bbf452b041e7055a6 (diff) | |
parent | 4e2574e6907291df4e87c795dcbdd8111036e3de (diff) | |
download | vyatta-cfg-quagga-a5b27ed87185918adff12d777df6ab7ba82ca3b2.tar.gz vyatta-cfg-quagga-a5b27ed87185918adff12d777df6ab7ba82ca3b2.zip |
Merge branch 'glendale' into hollywood
Diffstat (limited to 'templates')
84 files changed, 516 insertions, 427 deletions
diff --git a/templates/policy/access-list/node.def b/templates/policy/access-list/node.def index de8ec16e..05736a3e 100644 --- a/templates/policy/access-list/node.def +++ b/templates/policy/access-list/node.def @@ -1,10 +1,14 @@ tag: type: u32 -help: IP access list number +help: IP access-list filter syntax:expression: ($VAR(@) >= 1 && $VAR(@) <= 199) || ($VAR(@) >= 1300 && $VAR(@) <= 2699); \ -"Access list number must be \n \ - <1-99> IP standard access list \n \ - <100-199> IP extended access list \n \ - <1300-1999> IP standard access list (expanded range) \n \ - <2000-2699> IP extended access list (expanded range) \n " -end:expression: "/opt/vyatta/sbin/vyatta-policy.pl --update-access-list $VAR(@)" +"Access list number must be + <1-99>\tIP standard access list + <100-199>\tIP extended access list + <1300-1999>\tIP standard access list (expanded range) + <2000-2699>\tIP extended access list (expanded range)" +comp_help: \1 <1-99>\tIP standard access list + <100-199>\tIP extended access list + <1300-1999>\tIP standard access list (expanded range) + <2000-2699>\tIP extended access list (expanded range) +end: /opt/vyatta/sbin/vyatta-policy.pl --update-access-list $VAR(@) diff --git a/templates/policy/access-list/node.tag/description/node.def b/templates/policy/access-list/node.tag/description/node.def index 1f2b8525..77835b24 100644 --- a/templates/policy/access-list/node.tag/description/node.def +++ b/templates/policy/access-list/node.tag/description/node.def @@ -1,2 +1,2 @@ type: txt -help: Access list description +help: set a description for this access-list diff --git a/templates/policy/access-list/node.tag/rule/node.def b/templates/policy/access-list/node.tag/rule/node.def index b33229bb..4f2ce75c 100644 --- a/templates/policy/access-list/node.tag/rule/node.def +++ b/templates/policy/access-list/node.tag/rule/node.def @@ -1,4 +1,5 @@ tag: type: u32 -help: Specify access-list rule number +help: create a rule for this access-list +comp_help: \1 <1-65535>\taccess-list rule number syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "rule number must be between 1 and 65535" diff --git a/templates/policy/access-list/node.tag/rule/node.tag/action/node.def b/templates/policy/access-list/node.tag/rule/node.tag/action/node.def index 735e0a77..c529071e 100644 --- a/templates/policy/access-list/node.tag/rule/node.tag/action/node.def +++ b/templates/policy/access-list/node.tag/rule/node.tag/action/node.def @@ -1,3 +1,5 @@ type: txt -help: Action to take on packets matching this rule -syntax:expression: $VAR(@) in "permit", "deny"; "must be permit or deny" +help: action to take on networks matching this rule +comp_help: \1 permit\tpermit matching networks + deny\t\tdeny matching networks +syntax:expression: $VAR(@) in "permit", "deny"; "action must be permit or deny" diff --git a/templates/policy/access-list/node.tag/rule/node.tag/description/node.def b/templates/policy/access-list/node.tag/rule/node.tag/description/node.def index b8e3095b..562ab020 100644 --- a/templates/policy/access-list/node.tag/rule/node.tag/description/node.def +++ b/templates/policy/access-list/node.tag/rule/node.tag/description/node.def @@ -1,2 +1,2 @@ type: txt -help: Description for this rule +help: set a description for this rule diff --git a/templates/policy/access-list/node.tag/rule/node.tag/destination/any/node.def b/templates/policy/access-list/node.tag/rule/node.tag/destination/any/node.def index d00ecfc3..1de3b2f6 100644 --- a/templates/policy/access-list/node.tag/rule/node.tag/destination/any/node.def +++ b/templates/policy/access-list/node.tag/rule/node.tag/destination/any/node.def @@ -1,7 +1,7 @@ -help: Filter any IP address -syntax:expression: ($VAR(../../../@) >= 100 && $VAR(../../../@) <= 199) || ($VAR(../../../@) >= 2000 && $VAR(../../../@) <= 2699); " \ -To set destination filter parameters, the access-list number must be \n \ - <100-199> IP extended access list \n \ - <2000-2699> IP extended access list (expanded range) \n" -commit:expression: $VAR(../../action/) != ""; "You must specify an action before committing" -commit:expression: ($VAR(../host/) == "") && ($VAR(../network/) == ""); "You may only define one filter type. (host|network|any)" +help: match any IP address +commit:expression: ($VAR(../../../@) >= 100 && $VAR(../../../@) <= 199) || ($VAR(../../../@) >= 2000 && $VAR(../../../@) <= 2699); "\ +policy access-list $VAR(../../../@) rule $VAR(../../@) destination: access-list number must be <100-199> or <2000-2699> to set destination matches" +commit:expression: ($VAR(../host/) == "") && ($VAR(../network/) == ""); "\ +policy access-list $VAR(../../../@) rule $VAR(../../@) destination: you may only define one filter type. (host|network|any)" +commit:expression: $VAR(../../action/) != ""; "policy access-list $VAR(../../../@) rule $VAR(../../@) destination: you must specify an action" + diff --git a/templates/policy/access-list/node.tag/rule/node.tag/destination/host/node.def b/templates/policy/access-list/node.tag/rule/node.tag/destination/host/node.def index e89026c7..46cb9007 100644 --- a/templates/policy/access-list/node.tag/rule/node.tag/destination/host/node.def +++ b/templates/policy/access-list/node.tag/rule/node.tag/destination/host/node.def @@ -1,8 +1,8 @@ type: ipv4 -help: Filter a host IP address -syntax:expression: ($VAR(../../../@) >= 100 && $VAR(../../../@) <= 199) || ($VAR(../../../@) >= 2000 && $VAR(../../../@) <= 2699); " \ -To set destination filter parameters, the access-list rule number must be \n \ - <100-199> IP extended access list \n \ - <2000-2699> IP extended access list (expanded range) \n" -commit:expression: ($VAR(../any/) == "") && ($VAR(../network/) == ""); "You may only define one filter type. (host|network|any)" -commit:expression: $VAR(../../action/) != ""; "You must specify an action before committing" +help: match a single host IP address +comp_help: \1 <x.x.x.x>\thost address to match +commit:expression: ($VAR(../../../@) >= 100 && $VAR(../../../@) <= 199) || ($VAR(../../../@) >= 2000 && $VAR(../../../@) <= 2699); "\ +policy access-list $VAR(../../../@) rule $VAR(../../@) destination: access-list number must be <100-199> or <2000-2699> to set destination matches" +commit:expression: ($VAR(../any/) == "") && ($VAR(../network/) == ""); "\ +policy access-list $VAR(../../../@) rule $VAR(../../@) destination: you may only define one filter type. (host|network|any)" +commit:expression: $VAR(../../action/) != ""; "policy access-list $VAR(../../../@) rule $VAR(../../@) destination: you must specify an action" diff --git a/templates/policy/access-list/node.tag/rule/node.tag/destination/inverse-mask/node.def b/templates/policy/access-list/node.tag/rule/node.tag/destination/inverse-mask/node.def index 7dea1a34..54d9b7fd 100644 --- a/templates/policy/access-list/node.tag/rule/node.tag/destination/inverse-mask/node.def +++ b/templates/policy/access-list/node.tag/rule/node.tag/destination/inverse-mask/node.def @@ -1,9 +1,8 @@ type: ipv4 -help: Filter a network IP netmask -syntax:expression: ($VAR(../../../@) >= 100 && $VAR(../../../@) <= 199) || ($VAR(../../../@) >= 2000 && $VAR(../../../@) <= 2699); " \ -To set destination filter parameters, the access-list rule number must be \n \ - <100-199> IP extended access list \n \ - <2000-2699> IP extended access list (expanded range) \n" -commit:expression: $VAR(../network/) != ""; "You must specify a network before committing" -commit:expression: $VAR(../../action/) != ""; "You must specify an action before committing" -commit:expression: ($VAR(../any/) == "") && ($VAR(../host/) == ""); "You may only define one filter type. (host|network|any)" +help: match a network/netmask (requires network be defined) +comp_help: \1 <x.x.x.x>\tinverse-mask to match +commit:expression: ($VAR(../../../@) >= 100 && $VAR(../../../@) <= 199) || ($VAR(../../../@) >= 2000 && $VAR(../../../@) <= 2699); "\ +policy access-list $VAR(../../../@) rule $VAR(../../@) destination: access-list number must be <100-199> or <2000-2699> to set destination matches" +commit:expression: ($VAR(../any/) == "") && ($VAR(../host/) == ""); "policy access-list $VAR(../../../@) rule $VAR(../../@) destination: you may only define one filter type. (host|network|any)" +commit:expression: $VAR(../network/) != ""; "policy access-list $VAR(../../../@) rule $VAR(../../@) destination: you must specify a network if you configure an inverse mask." +commit:expression: $VAR(../../action/) != ""; "policy access-list $VAR(../../../@) rule $VAR(../../@) destination: you must specify an action" diff --git a/templates/policy/access-list/node.tag/rule/node.tag/destination/network/node.def b/templates/policy/access-list/node.tag/rule/node.tag/destination/network/node.def index 9be5cd97..a33d28db 100644 --- a/templates/policy/access-list/node.tag/rule/node.tag/destination/network/node.def +++ b/templates/policy/access-list/node.tag/rule/node.tag/destination/network/node.def @@ -1,9 +1,8 @@ type: ipv4 -help: Filter a network IP address -syntax:expression: ($VAR(../../../@) >= 100 && $VAR(../../../@) <= 199) || ($VAR(../../../@) >= 2000 && $VAR(../../../@) <= 2699); " \ -To set destination filter parameters, the access-list rule number must be \n \ - <100-199> IP extended access list \n \ - <2000-2699> IP extended access list (expanded range) \n" -commit:expression: $VAR(../inverse-mask/) != ""; "You must specify an inverse-mask before committing" -commit:expression: $VAR(../../action/) != ""; "You must specify an action before committing" -commit:expression: ($VAR(../host/) == "") && ($VAR(../any/) == ""); "You may only define one filter type (host|network|any)" +help: match a network/netmask (requires inverse-mask be defined) +comp_help: \1 <x.x.x.x>\tnetwork to match +commit:expression: ($VAR(../../../@) >= 100 && $VAR(../../../@) <= 199) || ($VAR(../../../@) >= 2000 && $VAR(../../../@) <= 2699); "\ +policy access-list $VAR(../../../@) rule $VAR(../../@) destination: access-list number must be <100-199> or <2000-2699> to set destination matches" +commit:expression: ($VAR(../host/) == "") && ($VAR(../any/) == ""); "policy access-list $VAR(../../../@) rule $VAR(../../@) destination: you may only define one filter type. (host|network|any)" +commit:expression: $VAR(../inverse-mask/) != ""; "policy access-list $VAR(../../../@) rule $VAR(../../@) destination: you must specify an inverse-mask if you configure a network" +commit:expression: $VAR(../../action/) != ""; "policy access-list $VAR(../../../@) rule $VAR(../../@) destination: you must specify an action" diff --git a/templates/policy/access-list/node.tag/rule/node.tag/destination/node.def b/templates/policy/access-list/node.tag/rule/node.tag/destination/node.def index aaf2e4b4..e8659d13 100644 --- a/templates/policy/access-list/node.tag/rule/node.tag/destination/node.def +++ b/templates/policy/access-list/node.tag/rule/node.tag/destination/node.def @@ -1 +1 @@ -help: Define a destination address or network filter +help: match on destination network or address diff --git a/templates/policy/access-list/node.tag/rule/node.tag/source/any/node.def b/templates/policy/access-list/node.tag/rule/node.tag/source/any/node.def index 74b4a53c..6dd3b508 100644 --- a/templates/policy/access-list/node.tag/rule/node.tag/source/any/node.def +++ b/templates/policy/access-list/node.tag/rule/node.tag/source/any/node.def @@ -1,3 +1,3 @@ -help: Filter any IP address -commit:expression: ($VAR(../host/) == "") && ($VAR(../network/) == ""); "You may only define one filter type. (host|network|any)" -commit:expression: $VAR(../../action/) != ""; "You must specify an action before committing" +help: match any IP address +commit:expression: ($VAR(../host/) == "") && ($VAR(../network/) == ""); "policy access-list $VAR(../../../@) rule $VAR(../../@) source: you may only define one filter type. (host|network|any)" +commit:expression: $VAR(../../action/) != ""; "policy access-list $VAR(../../../@) rule $VAR(../../@) source: you must specify an action" diff --git a/templates/policy/access-list/node.tag/rule/node.tag/source/host/node.def b/templates/policy/access-list/node.tag/rule/node.tag/source/host/node.def index dcc0d026..94bfd185 100644 --- a/templates/policy/access-list/node.tag/rule/node.tag/source/host/node.def +++ b/templates/policy/access-list/node.tag/rule/node.tag/source/host/node.def @@ -1,4 +1,5 @@ type: ipv4 -help: Filter a host IP address -commit:expression: ($VAR(../any/) == "") && ($VAR(../network/) == ""); "You may only define one filter type. (host|network|any)" -commit:expression: $VAR(../../action/) != ""; "You must specify an action before committing" +help: match a single host IP address +comp_help: \1 <x.x.x.x>\thost address to match +commit:expression: ($VAR(../any/) == "") && ($VAR(../network/) == ""); "policy access-list $VAR(../../../@) rule $VAR(../../@) source: you may only define one filter type. (host|network|any)" +commit:expression: $VAR(../../action/) != ""; "policy access-list $VAR(../../../@) rule $VAR(../../@) source: you must specify an action" diff --git a/templates/policy/access-list/node.tag/rule/node.tag/source/inverse-mask/node.def b/templates/policy/access-list/node.tag/rule/node.tag/source/inverse-mask/node.def index 8002a86a..167d292a 100644 --- a/templates/policy/access-list/node.tag/rule/node.tag/source/inverse-mask/node.def +++ b/templates/policy/access-list/node.tag/rule/node.tag/source/inverse-mask/node.def @@ -1,5 +1,6 @@ type: ipv4 -help: Filter a network IP netmask -commit:expression: ($VAR(../any/) == "") && ($VAR(../host/) == ""); "You may only define one filter type. (host|network|any)" -commit:expression: $VAR(../network/) != ""; "You must specify a network before committing" -commit:expression: $VAR(../../action/) != ""; "You must specify an action before committing" +help: match a network/netmask (requires network be defined) +comp_help: \1 <x.x.x.x>\tinverse-mask to match +commit:expression: ($VAR(../any/) == "") && ($VAR(../host/) == ""); "policy access-list $VAR(../../../@) rule $VAR(../../@) source: you may only define one filter type. (host|network|any)" +commit:expression: $VAR(../network/) != ""; "policy access-list $VAR(../../../@) rule $VAR(../../@) source: you must specify a network if you configure an inverse-mask" +commit:expression: $VAR(../../action/) != ""; "policy access-list $VAR(../../../@) rule $VAR(../../@) source: you must specify an action" diff --git a/templates/policy/access-list/node.tag/rule/node.tag/source/network/node.def b/templates/policy/access-list/node.tag/rule/node.tag/source/network/node.def index f5f1e3eb..80508a27 100644 --- a/templates/policy/access-list/node.tag/rule/node.tag/source/network/node.def +++ b/templates/policy/access-list/node.tag/rule/node.tag/source/network/node.def @@ -1,5 +1,6 @@ type: ipv4 -help: Filter a network IP address -commit:expression: ($VAR(../host/) == "") && ($VAR(../any/) == ""); "You may only define one filter type (host|network|any)" -commit:expression: $VAR(../inverse-mask/) != ""; "You must specify an inverse-mask before committing" -commit:expression: $VAR(../../action/) != ""; "You must specify an action before committing" +help: match a network/netmask (requires inverse-mask be defined) +comp_help: \1 <x.x.x.x>\tnetwork to match +commit:expression: ($VAR(../host/) == "") && ($VAR(../any/) == ""); "policy access-list $VAR(../../../@) rule $VAR(../../@) source: you may only define one filter type. (host|network|any)" +commit:expression: $VAR(../inverse-mask/) != ""; "policy access-list $VAR(../../../@) rule $VAR(../../@) source: you must specify an inverse-mask if you configure a network" +commit:expression: $VAR(../../action/) != ""; "policy access-list $VAR(../../../@) rule $VAR(../../@) source: you must specify an action" diff --git a/templates/policy/access-list/node.tag/rule/node.tag/source/node.def b/templates/policy/access-list/node.tag/rule/node.tag/source/node.def index 6c77723e..b734c1f2 100644 --- a/templates/policy/access-list/node.tag/rule/node.tag/source/node.def +++ b/templates/policy/access-list/node.tag/rule/node.tag/source/node.def @@ -1 +1 @@ -help: Define a source address or network filter +help: match on source network or address diff --git a/templates/policy/as-path-list/node.def b/templates/policy/as-path-list/node.def index bda7042e..21285cc4 100644 --- a/templates/policy/as-path-list/node.def +++ b/templates/policy/as-path-list/node.def @@ -2,4 +2,5 @@ tag: type: txt help: BGP autonomous system path filter syntax:expression: pattern $VAR(@) "^[-a-zA-Z0-9.]+$" ; "as-path-list name must be alpha-numeric" -end:expression: "/opt/vyatta/sbin/vyatta-policy.pl --update-aspath-list $VAR(@)" +end: /opt/vyatta/sbin/vyatta-policy.pl --update-aspath-list $VAR(@) +comp_help: \1 <txt>\t\tas-path-list name diff --git a/templates/policy/as-path-list/node.tag/description/node.def b/templates/policy/as-path-list/node.tag/description/node.def index b45a1767..6790c1bd 100644 --- a/templates/policy/as-path-list/node.tag/description/node.def +++ b/templates/policy/as-path-list/node.tag/description/node.def @@ -1,2 +1,2 @@ type: txt -help: AS path list description +help: set a description for this as-path-list diff --git a/templates/policy/as-path-list/node.tag/rule/node.def b/templates/policy/as-path-list/node.tag/rule/node.def index adac0477..d3fbcfcc 100644 --- a/templates/policy/as-path-list/node.tag/rule/node.def +++ b/templates/policy/as-path-list/node.tag/rule/node.def @@ -1,4 +1,6 @@ tag: type: u32 -help: Specify as-path-list rule number +help: create a rule for this as-path-list +comp_help: \1 <1-65535>\tas-path-list rule number syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "rule number must be between 1 and 65535" + diff --git a/templates/policy/as-path-list/node.tag/rule/node.tag/action/node.def b/templates/policy/as-path-list/node.tag/rule/node.tag/action/node.def index 1b7787c5..437cb686 100644 --- a/templates/policy/as-path-list/node.tag/rule/node.tag/action/node.def +++ b/templates/policy/as-path-list/node.tag/rule/node.tag/action/node.def @@ -1,3 +1,5 @@ type: txt -help: Action to take on AS paths matching this rule +help: action to take on AS paths matching this rule +comp_help: \1 permit\tpermit matching as-paths + deny\t\tdeny matching as-paths syntax:expression: $VAR(@) in "permit", "deny"; "action must be permit or deny" diff --git a/templates/policy/as-path-list/node.tag/rule/node.tag/description/node.def b/templates/policy/as-path-list/node.tag/rule/node.tag/description/node.def index b8e3095b..562ab020 100644 --- a/templates/policy/as-path-list/node.tag/rule/node.tag/description/node.def +++ b/templates/policy/as-path-list/node.tag/rule/node.tag/description/node.def @@ -1,2 +1,2 @@ type: txt -help: Description for this rule +help: set a description for this rule diff --git a/templates/policy/as-path-list/node.tag/rule/node.tag/regex/node.def b/templates/policy/as-path-list/node.tag/rule/node.tag/regex/node.def index e84579d8..9b79e6b3 100644 --- a/templates/policy/as-path-list/node.tag/rule/node.tag/regex/node.def +++ b/templates/policy/as-path-list/node.tag/rule/node.tag/regex/node.def @@ -1,5 +1,6 @@ type: txt -help: AS path regular expression +help: match against an AS path regular expression +comp_help: \1 <aa:nn>\tas-path regular expression (ex: "50:1 6553:1201") # TODO: check regex syntax; \ # "invalid chars in regex syntax" -commit:expression: $VAR(../action/@) != ""; "You must specify an action before committing" +commit:expression: $VAR(../action/@) != ""; "policy as-path-list $VAR(../../@) rule $VAR(../@): You must specify an action" diff --git a/templates/policy/community-list/node.def b/templates/policy/community-list/node.def index c16aac71..69a5cbfc 100644 --- a/templates/policy/community-list/node.def +++ b/templates/policy/community-list/node.def @@ -1,8 +1,10 @@ tag: type: u32 -help: Add a community list entry -syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 500; " \ -community-list must be \ - <1-99> Community list number (standard) \ - <100-500> Community list number (expanded) " -end:expression: "/opt/vyatta/sbin/vyatta-policy.pl --update-community-list $VAR(@)" +help: BGP community-list filter +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 500; " +community-list must be + <1-99>\tBGP community list (standard) + <100-500>\tBGP community list (expanded) " +comp_help: \1 <1-99>\tBGP community list (standard) + <100-500>\tBGP community list (expanded) +end: /opt/vyatta/sbin/vyatta-policy.pl --update-community-list $VAR(@) diff --git a/templates/policy/community-list/node.tag/description/node.def b/templates/policy/community-list/node.tag/description/node.def index b29d027a..2ee61758 100644 --- a/templates/policy/community-list/node.tag/description/node.def +++ b/templates/policy/community-list/node.tag/description/node.def @@ -1,2 +1,2 @@ type: txt -help: Community list description +help: set a description for this community list diff --git a/templates/policy/community-list/node.tag/rule/node.def b/templates/policy/community-list/node.tag/rule/node.def index adac0477..94bb576e 100644 --- a/templates/policy/community-list/node.tag/rule/node.def +++ b/templates/policy/community-list/node.tag/rule/node.def @@ -1,4 +1,5 @@ tag: type: u32 -help: Specify as-path-list rule number +help: create a rule for this BGP community list +comp_help: \1 <1-65535>\tcommunity-list rule number syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "rule number must be between 1 and 65535" diff --git a/templates/policy/community-list/node.tag/rule/node.tag/action/node.def b/templates/policy/community-list/node.tag/rule/node.tag/action/node.def index 545bd4c0..66fabcd0 100644 --- a/templates/policy/community-list/node.tag/rule/node.tag/action/node.def +++ b/templates/policy/community-list/node.tag/rule/node.tag/action/node.def @@ -1,3 +1,5 @@ type: txt -help: Action to take on communities matching this rule +help: action to take on communities matching this rule +comp_help: \1 permit\tpermit matching communities + deny\t\tdeny matching communities syntax:expression: $VAR(@) in "permit", "deny"; "action must be permit or deny" diff --git a/templates/policy/community-list/node.tag/rule/node.tag/description/node.def b/templates/policy/community-list/node.tag/rule/node.tag/description/node.def index b8e3095b..562ab020 100644 --- a/templates/policy/community-list/node.tag/rule/node.tag/description/node.def +++ b/templates/policy/community-list/node.tag/rule/node.tag/description/node.def @@ -1,2 +1,2 @@ type: txt -help: Description for this rule +help: set a description for this rule diff --git a/templates/policy/community-list/node.tag/rule/node.tag/regex/node.def b/templates/policy/community-list/node.tag/rule/node.tag/regex/node.def index 5639ef67..0a703e0b 100644 --- a/templates/policy/community-list/node.tag/rule/node.tag/regex/node.def +++ b/templates/policy/community-list/node.tag/rule/node.tag/regex/node.def @@ -1,11 +1,11 @@ type: txt -help: Community list regular expression -# pending bug 2285 +help: match against a community list regular expression +comp_help: \1 <txt>\t\tcommunity-list regular expression syntax:expression: exec " \ if [ $VAR(../../@) -ge 1 ] && [ $VAR(../../@) -le 99 ]; then \ if [ -n \"`echo $VAR(@) | sed 's/[0-9]*:[0-9]*//g' | sed -e 's/internet//g' -e 's/local-AS//g' -e 's/no-advertise//g' -e 's/no-export//g'`\" ]; then \ - echo regex $VAR(@) is invalid for a standard community list; \ + echo policy community-list $VAR(../../@) rule $VAR(../@): regex $VAR(@) is invalid for a standard community list; \ exit 1 ; \ fi ; \ fi ; " -commit:expression: $VAR(../action/@) != ""; "You must specify an action before committing" +commit:expression: $VAR(../action/@) != ""; "policy community-list $VAR(../../@) rule $VAR(../@): You must specify an action" diff --git a/templates/policy/prefix-list/node.def b/templates/policy/prefix-list/node.def index b1fcc1f9..1680a287 100644 --- a/templates/policy/prefix-list/node.def +++ b/templates/policy/prefix-list/node.def @@ -1,4 +1,5 @@ tag: type: txt -help: Add a prefix list entry +help: IP prefix-list filter +comp_help: \1 <txt>\tprefix-list list name syntax:expression: pattern $VAR(@) "^[-a-zA-Z0-9.]+$" ; "prefix-list name must be alpha-numeric" diff --git a/templates/policy/prefix-list/node.tag/description/node.def b/templates/policy/prefix-list/node.tag/description/node.def index 8e10bcb9..8a4ae9fa 100644 --- a/templates/policy/prefix-list/node.tag/description/node.def +++ b/templates/policy/prefix-list/node.tag/description/node.def @@ -1,2 +1,2 @@ type: txt -help: Prefix list description +help: set a description for this prefix-list diff --git a/templates/policy/prefix-list/node.tag/rule/node.def b/templates/policy/prefix-list/node.tag/rule/node.def index 841e824c..f68dce7e 100644 --- a/templates/policy/prefix-list/node.tag/rule/node.def +++ b/templates/policy/prefix-list/node.tag/rule/node.def @@ -1,37 +1,39 @@ tag: type: u32 -help: Specify prefix-list rule number -commit:expression: $VAR(./prefix/) != ""; "must set a prefix" -commit:expression: $VAR(./action/) != ""; "must specify an action before committing" -delete:expression: "touch /tmp/protocols-$VAR(../@)-$VAR(@).$PPID \ - LEN=`echo $VAR(@) | awk -F/ '{ print $2 }'` ; \ - if [ -n \"$VAR(./ge/@)\" ]; then \ - COND=\"ge $VAR(./ge/@) \"; +help: create a rule for this prefix-list +comp_help: \1 <1-65535>\tprefix-list rule number +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "rule number must be between 1 and 65535" +commit:expression: $VAR(./prefix/) != ""; "policy prefix-list $VAR(../@) rule $VAR(@): You must specify a prefix" +commit:expression: $VAR(./action/) != ""; "policy prefix-list $VAR(../@) rule $VAR(@): You must specify an action" +delete: touch /tmp/protocols-$VAR(../@)-$VAR(@).$PPID ; + len=`echo $VAR(@) | awk -F/ '{ print $2 }'` ; + if [ -n "$VAR(./ge/@)" ]; then + cond="ge $VAR(./ge/@) "; fi; - if [ -n \"$VAR(./le/@)\" ]; then \ - COND=\"$COND le $VAR(./le/@) \"; \ - fi; \ - ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"no ip prefix-list $VAR(../@) seq $VAR(@) $VAR(./action/@) $VAR(./prefix/@) $COND \" " -end:expression: "LEN=`echo $VAR(./prefix/@) | awk -F/ '{ print $2 }'` ; \ - if [ -n \"$VAR(./ge/@)\" ]; then \ - if [ $LEN -ge $VAR(./ge/@) ]; then \ - echo ge must be greater than prefix length ;\ - exit 1 ; \ - fi ; \ - COND=\"ge $VAR(./ge/@) \"; + if [ -n "$VAR(./le/@)" ]; then + cond="$cond le $VAR(./le/@) "; + fi; + ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "no ip prefix-list $VAR(../@) seq $VAR(@) $VAR(./action/@) $VAR(./prefix/@) $cond " +end: len=`echo $VAR(./prefix/@) | awk -F/ '{ print $2 }'` ; + if [ -n "$VAR(./ge/@)" ]; then + if [ $len -ge $VAR(./ge/@) ]; then + echo "policy prefix-list $VAR(../@) rule $VAR(@): ge must be greater than prefix length"; + exit 1 ; + fi ; + cond="ge $VAR(./ge/@) "; fi; - if [ -n \"$VAR(./le/@)\" ]; then \ - if [ $VAR(./le/@) -ne 32 ] && [ -n \"$VAR(./ge/@)\" ] && [ $VAR(./le/@) -le $VAR(./ge/@) ]; then \ - echo le must be greater than or equal to ge ; \ - exit 1 ; \ - fi ; \ - COND=\"$COND le $VAR(./le/@) \"; \ - fi; \ - if [ -f \"/tmp/protocols-$VAR(../@)-$VAR(@).$PPID\" ]; then \ - rm -f \"protocols-$VAR(../@)-$VAR(@).$PPID\" ; \ - else \ - ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"ip prefix-list $VAR(../@) seq $VAR(@) $VAR(./action/@) $VAR(./prefix/@) $COND \" ; \ - fi ; \ - exit 0 ; " + if [ -n "$VAR(./le/@)" ]; then + if [ $VAR(./le/@) -ne 32 ] && [ -n "$VAR(./ge/@)" ] && [ $VAR(./le/@) -le $VAR(./ge/@) ]; then + echo "policy prefix-list $VAR(../@) rule $VAR(@): le must be greater than or equal to ge"; + exit 1 ; + fi ; + cond="$cond le $VAR(./le/@) "; + fi; + if [ -f "/tmp/protocols-$VAR(../@)-$VAR(@).$PPID" ]; then + rm -f "protocols-$VAR(../@)-$VAR(@).$PPID" ; + else + ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "ip prefix-list $VAR(../@) seq $VAR(@) $VAR(./action/@) $VAR(./prefix/@) $cond " ; + fi ; + exit 0 ; diff --git a/templates/policy/prefix-list/node.tag/rule/node.tag/action/node.def b/templates/policy/prefix-list/node.tag/rule/node.tag/action/node.def index 4cdf4170..2b641e7c 100644 --- a/templates/policy/prefix-list/node.tag/rule/node.tag/action/node.def +++ b/templates/policy/prefix-list/node.tag/rule/node.tag/action/node.def @@ -1,3 +1,5 @@ type: txt -help: Action to take on prefixes matching this rule +help: action to take on prefixes matching this rule +comp_help: \1 permit\tpermit matching prefixes + deny\t\tdeny matching prefixes syntax:expression: $VAR(@) in "permit", "deny"; "action must be permit or deny" diff --git a/templates/policy/prefix-list/node.tag/rule/node.tag/description/node.def b/templates/policy/prefix-list/node.tag/rule/node.tag/description/node.def index b8e3095b..562ab020 100644 --- a/templates/policy/prefix-list/node.tag/rule/node.tag/description/node.def +++ b/templates/policy/prefix-list/node.tag/rule/node.tag/description/node.def @@ -1,2 +1,2 @@ type: txt -help: Description for this rule +help: set a description for this rule diff --git a/templates/policy/prefix-list/node.tag/rule/node.tag/ge/node.def b/templates/policy/prefix-list/node.tag/rule/node.tag/ge/node.def index ae818e87..4187034b 100644 --- a/templates/policy/prefix-list/node.tag/rule/node.tag/ge/node.def +++ b/templates/policy/prefix-list/node.tag/rule/node.tag/ge/node.def @@ -1,3 +1,4 @@ type: u32 -help: Prefix greater than or equal to +help: match a netmask greater than or equal to prefix length +comp_help: \1 <0-32>\tnetmask greater than length syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 32; "ge must be between 0 and 32" diff --git a/templates/policy/prefix-list/node.tag/rule/node.tag/le/node.def b/templates/policy/prefix-list/node.tag/rule/node.tag/le/node.def index e108cd60..4ebe9128 100644 --- a/templates/policy/prefix-list/node.tag/rule/node.tag/le/node.def +++ b/templates/policy/prefix-list/node.tag/rule/node.tag/le/node.def @@ -1,3 +1,4 @@ type: u32 -help: Prefix less than or equal to +help: match a netmask less than or equal to prefix length +comp_help: \1 <0-32>\tnetmask less than length syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 32; "le must be between 0 and 32" diff --git a/templates/policy/prefix-list/node.tag/rule/node.tag/prefix/node.def b/templates/policy/prefix-list/node.tag/rule/node.tag/prefix/node.def index 5494d284..7145e0fd 100644 --- a/templates/policy/prefix-list/node.tag/rule/node.tag/prefix/node.def +++ b/templates/policy/prefix-list/node.tag/rule/node.tag/prefix/node.def @@ -1,2 +1,3 @@ type: ipv4net -help: Prefix to match against this rule +help: match on a prefix +comp_help: \1 <x.x.x.x/x>\tprefix to match against diff --git a/templates/policy/route-map/node.def b/templates/policy/route-map/node.def index dfdc6494..64161140 100644 --- a/templates/policy/route-map/node.def +++ b/templates/policy/route-map/node.def @@ -1,4 +1,5 @@ tag: type: txt -help: Create route-map or enter route-map command mode +help: IP route-map +comp_help: \1 <txt>\t\troute-map name syntax:expression: pattern $VAR(@) "^[-a-zA-Z0-9.]+$" ; "route-map $VAR(@): name must be alpha-numeric" diff --git a/templates/policy/route-map/node.tag/description/node.def b/templates/policy/route-map/node.tag/description/node.def index b2a5d581..77835b24 100644 --- a/templates/policy/route-map/node.tag/description/node.def +++ b/templates/policy/route-map/node.tag/description/node.def @@ -1,2 +1,2 @@ type: txt -help: Route map description +help: set a description for this access-list diff --git a/templates/policy/route-map/node.tag/rule/node.def b/templates/policy/route-map/node.tag/rule/node.def index b5a8e367..081ea884 100644 --- a/templates/policy/route-map/node.tag/rule/node.def +++ b/templates/policy/route-map/node.tag/rule/node.def @@ -1,7 +1,8 @@ tag: type: u32 -help: Specify route-map rule number -syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "route-map $VAR(../@): rule number $VAR(@) must be between 1 and 65535" +help: create a rule for this access-list +comp_help: \1 <1-65535>\troute-map rule number +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "rule number must be between 1 and 65535" delete: if [ -f /tmp/route-map-$VAR(../@)-rule-$VAR(@)-action.$PPID ]; then ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" -c "no route-map $VAR(../@) $VAR(./@/action/@) $VAR(@)"; rm -f /tmp/route-map-$VAR(../@)-rule-$VAR(@)-action.$PPID; diff --git a/templates/policy/route-map/node.tag/rule/node.tag/action/node.def b/templates/policy/route-map/node.tag/rule/node.tag/action/node.def index 3967558c..6b744ae8 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/action/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/action/node.def @@ -1,11 +1,13 @@ type: txt -help: Action to take on prefixes matching this rule -syntax:expression: $VAR(@) in "permit", "deny"; "route-map $VAR(../../@) $VAR(@) $VAR(../@) action: must be permit or deny" +help: action to take on prefixes matching this rule +comp_help: \1 permit\tpermit matching prefixes + deny\t\tdeny matching prefixes +syntax:expression: $VAR(@) in "permit", "deny"; "action must be permit or deny" update: /opt/vyatta/sbin/vyatta-policy.pl --check-routemap-action "policy route-map $VAR(../../@) rule $VAR(../@) action"; if [ $? -eq 0 ]; then ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" -c "route-map $VAR(../../@) $VAR(@) $VAR(../@)"; else - echo " You can not change the action for \"route-map $VAR(../../@) rule $VAR(../@)\"."; + echo "policy route-map $VAR(../../@) rule $VAR(../@): You can not change the action."; echo " To change the action you must first delete the rule "; echo -e " \"delete route-map $VAR(../../@) rule $VAR(../@)\" and commit it. \\n"; exit 1; @@ -14,7 +16,7 @@ delete: /opt/vyatta/sbin/vyatta-policy.pl --check-delete-routemap-action "policy if [ $? -eq 0 ]; then touch /tmp/route-map-$VAR(../../@)-rule-$VAR(../@)-action.$PPID ; else - echo " Action is a required node for \"route-map $VAR(../../@) rule $VAR(../@)\". "; + echo "policy route-map $VAR(../../@) rule $VAR(../@): Action is a required parameter. "; echo -e " To delete that node you must delete \"route-map $VAR(../../@) rule $VAR(../@)\". \\n"; exit 1; fi; diff --git a/templates/policy/route-map/node.tag/rule/node.tag/call/node.def b/templates/policy/route-map/node.tag/rule/node.tag/call/node.def index ee36359e..a80ea711 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/call/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/call/node.def @@ -1,8 +1,9 @@ type: txt -help: Target route-map name -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" "; "route-map $VAR(@) doesn't exist" -commit:expression: $VAR(../action/) != ""; "must define an action for route-map $VAR(../../@) rule $VAR(../@)" -update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"route-map $VAR(../../@) $VAR(../action/@) $VAR(../@)\" \ - -c \"call $VAR(@)\" " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"route-map $VAR(../../@) $VAR(../action/@) $VAR(../@)\" \ - -c \"no call \" " +help: call another route-map on match +comp_help: \1 <txt>\t\troute-map name +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" "; "policy route-map $VAR(../../@) rule $VAR(../@) call: called route-map $VAR(@) doesn't exist" +commit:expression: $VAR(../action/) != ""; "policy route-map $VAR(../../@) rule $VAR(../@): you must define an action" +update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" -c "route-map $VAR(../../@) $VAR(../action/@) $VAR(../@)" \ + -c "call $VAR(@)" +delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" -c "route-map $VAR(../../@) $VAR(../action/@) $VAR(../@)" \ + -c "no call " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/continue/node.def b/templates/policy/route-map/node.tag/rule/node.tag/continue/node.def index a8616682..4b7f500d 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/continue/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/continue/node.def @@ -1,10 +1,12 @@ type: u32 -help: Continue on a different entry within the route-map +help: jump to a different rule in this route-map on a match +comp_help: \1 <1-65535>\trule number syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "continue must be between 1 and 65535" -syntax:expression: $VAR(@) > $VAR(../../@); "you may only continue forward in the route-map" -update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" - -c \"route-map $VAR(../../@) $VAR(../action/@) $VAR(../@)\" \ - -c \"continue $VAR(@)\" " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" - -c \"route-map $VAR(../../@) $VAR(../action/@) $VAR(../@)\" \ - -c \"no continue \" " +commit:expression: $VAR(@) > $VAR(../@); "you may only continue forward in the route-map" +commit:expression: $VAR(../action/) != ""; "policy route-map $VAR(../../@) rule $VAR(../@): you must define an action" +update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../@) $VAR(../action/@) $VAR(../@)" \ + -c "continue $VAR(@)" +delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../@) $VAR(../action/@) $VAR(../@)" \ + -c "no continue " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/description/node.def b/templates/policy/route-map/node.tag/rule/node.tag/description/node.def index 9d03b86c..562ab020 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/description/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/description/node.def @@ -1,2 +1,2 @@ type: txt -help: Route map rule description +help: set a description for this rule diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/as-path/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/as-path/node.def index 5df86392..18d88542 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/as-path/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/as-path/node.def @@ -1,10 +1,11 @@ type: txt -help: Match BGP AS path list -commit:expression: $VAR(../../action/) != ""; "You must specify an action for route-map $VAR(../../../@) rule $VAR(../../@)" -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $VAR(@)\" "; "AS path list $VAR(@) doesn't exist" -update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"match as-path $VAR(@)\" " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"no match as-path $VAR(@)\" " +help: match against a BGP as-path-list +comp_help: \1 <txt>\t\tas-path-list name +commit:expression: $VAR(../../action/) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@): You must specify an action" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $VAR(@)\" "; "policy route-map $VAR(../../../@) rule $VAR(../../@) match as-path: AS path list $VAR(@) doesn't exist" +update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "match as-path $VAR(@)" +delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "no match as-path $VAR(@)" diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/community/community-list/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/community/community-list/node.def index a167e553..a586b6c3 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/community/community-list/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/community/community-list/node.def @@ -1,3 +1,5 @@ type: u32 -help: Match community list -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy community-list $VAR(@)\" "; "community-list $VAR(@) doesn't exist" +help: match against a BGP community-list +comp_help: \1 <1-99>\tBGP community list (standard) + <100-500>\tBGP community list (expanded) +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy community-list $VAR(@)\" "; "policy route-map $VAR(../../../../@) rule $VAR(../../../@) match community: community-list $VAR(@) doesn't exist" diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/community/exact-match/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/community/exact-match/node.def index 41922336..b145701c 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/community/exact-match/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/community/exact-match/node.def @@ -1 +1 @@ -help: Do exact matching of communities +help: match an exact matching of the community-list diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/community/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/community/node.def index 3ac8e05e..e97b21ea 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/community/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/community/node.def @@ -1,16 +1,19 @@ -help: Match BGP community list +help: match a BGP community-list delete: echo route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@) >> /tmp/delete-policy-route-map-$VAR(../../../@)-$VAR(../../@)-match-community.$PPID -## this will always return exact-match pending bug 2525 being fixed -end: if [ -z "$VAR(./community-list/@)" ]; then - echo You must configure a community-list ; - exit 1 ; - fi ; - if [ -f /tmp/delete-policy-route-map-$VAR(../../../@)-$VAR(../../@)-match-community.$PPID ]; then +end: if [ -f /tmp/delete-policy-route-map-$VAR(../../../@)-$VAR(../../@)-match-community.$PPID ]; then routemap=`cat /tmp/delete-policy-route-map-$VAR(../../../@)-$VAR(../../@)-match-community.$PPID` rm -f /tmp/delete-policy-route-map-$VAR(../../../@)-$VAR(../../@)-match-community.$PPID; ${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c "configure terminal" -c "$routemap " -c "no match community " ; exit 0; else + if [ -z "$VAR(./community-list/@)" ]; then + echo route-map $VAR(../../../@) rule $VAR(../../@) match community: you must configure a community-list ; + exit 1 ; + fi ; + if [ -z "$VAR(../../action/@)" ]; then + echo route-map $VAR(../../../@) rule $VAR(../../@): you must configure an action ; + exit 1 ; + fi ; routemap='route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)'; # uncomment and replace the call to vyatta-check-typeless-node.pl pending bug 2525 @@ -23,5 +26,5 @@ end: if [ -z "$VAR(./community-list/@)" ]; then fi ; ${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c "configure terminal" -c "$routemap " -c "no match community " ; - ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c "$routemap " -c "match community $VAR(./community-list/@) $cond" ; + ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" -c "$routemap " -c "match community $VAR(./community-list/@) $cond" ; fi diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/interface/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/interface/node.def index 782fdea0..27dd26ba 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/interface/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/interface/node.def @@ -1,15 +1,15 @@ type: txt -help: Match first hop interface of route -# TODO: this node isn't returning an error, but it also isn't adding anything to vyatta -commit:expression: $VAR(../../action/) != ""; "You must specify an action for route-map $VAR(../../../@) rule $VAR(../../@)" +help: match the first hop interface of a route +comp_help: \1 <txt>\t\tinterface name +commit:expression: $VAR(../../action/) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@): You must specify an action" syntax:expression: exec " \ if [ -z \"`ip addr | grep $VAR(@) `\" ]; then \ - echo $VAR(@) doesn\\'t exist on this system ; \ + echo policy route-map $VAR(../../../@) rule $VAR(../../@) match interface: interface $VAR(@) doesn\\'t exist on this system ; \ exit 1 ; \ fi ; " -update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"match interface $VAR(@)\" " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"no match interface $VAR(@)\" " +update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "match interface $VAR(@)" +delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "no match interface $VAR(@)" diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/access-list/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/access-list/node.def index b9335c70..46e92a4d 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/access-list/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/access-list/node.def @@ -1,11 +1,15 @@ type: u32 -help: access-list number -commit:expression: $VAR(../prefix-list/) == ""; "You may only specify a prefix-list or access-list" -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" "; "access-list $VAR(@) does not exist" -commit:expression: $VAR(../../../../action/) != ""; "You must specify an action for route-map $VAR(../../../../../@) rule $VAR(../../../../@)" -update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)\" \ - -c \"match ip address $VAR(@)\" " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)\" \ - -c \"no match ip address $VAR(@)\" " +help: match against an IP access-list +comp_help: \1 <1-99>\tIP standard access list number + <100-199>\tIP extended access list number + <1300-1999>\tIP standard access list number (expanded range) + <2000-2699>\tIP extended access list number (expanded range) +commit:expression: $VAR(../prefix-list/) == ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ip address access-list: you may only specify a prefix-list or access-list" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" "; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ip address access-list: access-list $VAR(@) does not exist" +commit:expression: $VAR(../../../../action/) != ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@): you must specify an action" +update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)" \ + -c "match ip address $VAR(@) " +delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)" \ + -c "no match ip address $VAR(@) " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/node.def index a90f87be..9785335b 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/node.def @@ -1 +1 @@ -help: Match address of route +help: match IP address of route diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/prefix-list/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/prefix-list/node.def index c3ab9b28..f3bea4ca 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/prefix-list/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/prefix-list/node.def @@ -1,11 +1,12 @@ type: txt -help: prefix-list name -commit:expression: $VAR(../access-list/) == ""; "You can only specify a prefix-list or access-list" -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $VAR(@)\" "; "prefix-list $VAR(@) does not exist" -commit:expression: $VAR(../../../../action/) != ""; "You must specify an action for route-map $VAR(../../../../../@) rule $VAR(../../../../@)" -update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)\" \ - -c \"match ip address prefix-list $VAR(@)\" " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)\" \ - -c \"no match ip address prefix-list $VAR(@)\" " +help: match against an IP prefix-list +comp_help: \1 <txt>\t\tprefix-list name +commit:expression: $VAR(../access-list/) == ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ip address prefix-list: you may only specify a prefix-list or access-list" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $VAR(@)\" "; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ip address prefix-list: prefix-list $VAR(@) does not exist" +commit:expression: $VAR(../../../../action/) != ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@): you must specify an action" +update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)" \ + -c "match ip address prefix-list $VAR(@)" +delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)" \ + -c "no match ip address prefix-list $VAR(@)" diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/nexthop/access-list/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/nexthop/access-list/node.def index 6bcb4a3c..605cb15f 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/nexthop/access-list/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/nexthop/access-list/node.def @@ -1,11 +1,15 @@ type: u32 -help: access-list number -commit:expression: $VAR(../prefix-list/) == ""; "You may only specify a prefix-list or access-list" -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" "; "access-list $VAR(@) does not exist" -commit:expression: $VAR(../../../../action/) != ""; "You must specify an action for route-map $VAR(../../../../../@) rule $VAR(../../../../@)" -update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)\" \ - -c \"match ip next-hop $VAR(@)\" " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)\" \ - -c \"no match ip next-hop $VAR(@)\" " +help: match against an IP access-list +comp_help: \1 <1-99>\tIP standard access list number + <100-199>\tIP extended access list number + <1300-1999>\tIP standard access list number (expanded range) + <2000-2699>\tIP extended access list number (expanded range) +commit:expression: $VAR(../prefix-list/) == ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ip nexthop access-list: you may only specify a prefix-list or access-list" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" "; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ip nexthop access-list: access-list $VAR(@) does not exist" +commit:expression: $VAR(../../../../action/) != ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@): you must specify an action" +update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)" \ + -c "match ip next-hop $VAR(@)" +delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)" \ + -c "no match ip next-hop $VAR(@)" diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/nexthop/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/nexthop/node.def index b0439561..7e174582 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/nexthop/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/nexthop/node.def @@ -1 +1 @@ -help: Match next-hop address of route +help: match IP next-hop of route diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/nexthop/prefix-list/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/nexthop/prefix-list/node.def index 346794ca..619cb178 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/nexthop/prefix-list/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/nexthop/prefix-list/node.def @@ -1,11 +1,12 @@ type: txt -help: prefix-list name -commit:expression: $VAR(../access-list/) == ""; "You can only specify a prefix-list or access-list" -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $VAR(@)\" "; "prefix-list $VAR(@) does not exist" -commit:expression: $VAR(../../../../action/) != ""; "You must specify an action for route-map $VAR(../../../../../@) rule $VAR(../../../../@)" -update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)\" \ - -c \"match ip next-hop prefix-list $VAR(@)\" " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)\" \ - -c \"no match ip next-hop prefix-list $VAR(@)\" " +help: match against an IP prefix-list +comp_help: \1 <txt>\t\tprefix-list name +commit:expression: $VAR(../access-list/) == ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ip nexthop prefix-list: you can only specify a prefix-list or access-list" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $VAR(@)\" "; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ip nexthop prefix-list: prefix-list $VAR(@) does not exist" +commit:expression: $VAR(../../../../action/) != ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@): you must specify an action" +update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)" \ + -c "match ip next-hop prefix-list $VAR(@)" +delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)" \ + -c "no match ip next-hop prefix-list $VAR(@)" diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/node.def index 6cea7554..5537a779 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/node.def @@ -1 +1 @@ -help: IP information +help: match IP prefix parameters diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/route-source/access-list/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/route-source/access-list/node.def index 85bcf447..ecbefe89 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/route-source/access-list/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/route-source/access-list/node.def @@ -1,11 +1,15 @@ type: u32 -help: access-list number -commit:expression: $VAR(../prefix-list/) == ""; "You may only specify a prefix-list or access-list" -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" "; "access-list $VAR(@) does not exist" -commit:expression: $VAR(../../../../action/) != ""; "You must specify an action for route-map $VAR(../../../../../@) rule $VAR(../../../../@)" -update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)\" \ - -c \"match ip route-source $VAR(@)\" " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)\" \ - -c \"no match ip route-source $VAR(@)\" " +help: match against an IP access-list +comp_help: \1 <1-99>\tIP standard access list number + <100-199>\tIP extended access list number + <1300-1999>\tIP standard access list number (expanded range) + <2000-2699>\tIP extended access list number (expanded range) +commit:expression: $VAR(../prefix-list/) == ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ip route-source access-list: you may only specify a prefix-list or access-list" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" "; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ip route-source access-list: access-list $VAR(@) does not exist" +commit:expression: $VAR(../../../../action/) != ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@): you must specify an action" +update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)" \ + -c "match ip route-source $VAR(@)" +delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)" \ + -c "no match ip route-source $VAR(@)" diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/route-source/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/route-source/node.def index 084598c8..6b45a452 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/route-source/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/route-source/node.def @@ -1 +1 @@ -help: Match route-source +help: match IP route-source diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/route-source/prefix-list/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/route-source/prefix-list/node.def index 2db6c602..f7f2adf6 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/route-source/prefix-list/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/route-source/prefix-list/node.def @@ -1,11 +1,12 @@ type: txt -help: prefix-list name -commit:expression: $VAR(../access-list/) == ""; "You can only specify a prefix-list or access-list" -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $VAR(@)\" "; "prefix-list $VAR(@) does not exist" -commit:expression: $VAR(../../../../action/) != ""; "You must specify an action for route-map $VAR(../../../../../@) rule $VAR(../../../../@)" -update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)\" \ - -c \"match ip route-source prefix-list $VAR(@)\" " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)\" \ - -c \"no match ip route-source prefix-list $VAR(@)\" " +help: match against an IP prefix-list +comp_help: \1 <txt>\t\tprefix-list name +commit:expression: $VAR(../access-list/) == ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ip route-source prefix-list: you can only specify a prefix-list or access-list" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $VAR(@)\" "; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ip route-source prefix-list: prefix-list $VAR(@) does not exist" +commit:expression: $VAR(../../../../action/) != ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ip route-source prefix-list: you must specify an action" +update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)" \ + -c "match ip route-source prefix-list $VAR(@)" +delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal" \ + -c "route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)" \ + -c "no match ip route-source prefix-list $VAR(@)" diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/metric/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/metric/node.def index ec674ef1..da0877e0 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/metric/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/metric/node.def @@ -1,10 +1,12 @@ type: u32 -help: Match metric of route -commit:expression: $VAR(../../action/) != ""; "You must specify an action for route-map $VAR(../../../@) rule $VAR(../../@)" -update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"match metric $VAR(@)\" " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"no match metric $VAR(@)\" " +help: match metric of route +comp_help: \1 <1-65535>\troute metric +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "metric must be between 1 and 65535" +commit:expression: $VAR(../../action/) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@): you must specify an action" +update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "match metric $VAR(@)" +delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "no match metric $VAR(@)" diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/node.def new file mode 100644 index 00000000..be9f97f7 --- /dev/null +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/node.def @@ -0,0 +1 @@ +help: match against route parameters diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/origin/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/origin/node.def index 1c7a5919..122c3500 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/origin/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/origin/node.def @@ -1,11 +1,14 @@ type: txt -help: BGP origin code +help: match BGP origin code +comp_help: \1 egp\t\texterior gateway protocol origin + igp\t\tinterior gateway protocol origin + incomplete\tincomplete origin syntax:expression: $VAR(@) in "egp", "igp", "incomplete"; "origin must be egp, igp, or incomplete" -commit:expression: $VAR(../../action/) != ""; "You must specify an action for route-map $VAR(../../../@) rule $VAR(../../@)" -update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"match origin $VAR(@)\" " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"no match origin $VAR(@)\" " +commit:expression: $VAR(../../action/) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@): you must specify an action" +update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "match origin $VAR(@)" +delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "no match origin $VAR(@)" diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/peer/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/peer/node.def index 696f2d93..fe5f872d 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/peer/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/peer/node.def @@ -1,11 +1,13 @@ type: txt -help: Match peer address +help: match peer address +comp_help: \1 <x.x.x.x>\tpeer IP address + local\t\tstatic or redistributed routes syntax:expression: exec "/opt/vyatta/sbin/vyatta-policy.pl --check-peer-syntax $VAR(@)"; "peer must be either an IP or local" -commit:expression: $VAR(../../action/) != ""; "You must specify an action for route-map $VAR(../../../@) rule $VAR(../../@)" -update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"match peer $VAR(@)\" " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"no match peer \" " +commit:expression: $VAR(../../action/) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@): you must specify an action" +update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "match peer $VAR(@)" +delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "no match peer " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/tag/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/tag/node.def index af88a29f..a113ed3c 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/match/tag/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/match/tag/node.def @@ -1,11 +1,12 @@ type: u32 -help: Match tag of route +help: match route tag +comp_help: \1 <1-65535>\troute tag syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "tag must be between 1 and 65535" -commit:expression: $VAR(../../action) != ""; "You must specify an action for route-map $VAR(../../../@) rule $VAR(../../@)" -update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"match tag $VAR(@)\" " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"no match tag $VAR(@)\" " +commit:expression: $VAR(../../action) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@): you must specify an action" +update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "match tag $VAR(@)" +delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "no match tag $VAR(@)" diff --git a/templates/policy/route-map/node.tag/rule/node.tag/on-match/goto/node.def b/templates/policy/route-map/node.tag/rule/node.tag/on-match/goto/node.def index 2203a9d6..caa5355e 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/on-match/goto/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/on-match/goto/node.def @@ -1,11 +1,13 @@ type: u32 -help: Goto sequence number -syntax:expression: $VAR(../next/) == ""; "you can set only goto or next" -syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "tag must be between 1 and 65535" -commit:expression: $VAR(../../action/) != ""; "You must specify an action for route-map $VAR(../../../@) rule $VAR(../../@)" -update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"on-match goto $VAR(@)\" " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"no on-match goto \" " +help: on match goto rule number +comp_help: \1 <1-65535>\trule number +syntax:expression: $VAR(../next/) == ""; "you may set only goto or next" +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "goto must be a rule number between 1 and 65535" +commit:expression: $VAR(@) > $VAR(../../@); "policy route-map $VAR(../../../@) rule $VAR(../../@): you may only go forward in the route-map" +commit:expression: $VAR(../../action/) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@): you must specify an action" +update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "on-match goto $VAR(@)" +delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "no on-match goto " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/on-match/next/node.def b/templates/policy/route-map/node.tag/rule/node.tag/on-match/next/node.def index 1e7e9bbe..1bbc62a6 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/on-match/next/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/on-match/next/node.def @@ -1,10 +1,10 @@ -help: Goto next sequence number -syntax:expression: $VAR(../goto/) == ""; "you can set only goto or next" -commit:expression: $VAR(../../action/) != ""; "You must specify an action for route-map $VAR(../../../@) rule $VAR(../../@)" -update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"on-match next \" " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"no on-match next \" " +help: on match goto next sequence number +syntax:expression: $VAR(../goto/) == ""; "you may set only goto or next" +commit:expression: $VAR(../../action/) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@): you must specify an action" +update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "on-match next " +delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "no on-match next " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/on-match/node.def b/templates/policy/route-map/node.tag/rule/node.tag/on-match/node.def index 718fe124..322f8267 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/on-match/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/on-match/node.def @@ -1 +1 @@ -help: Exit policy on matches +help: set the exit policy on matches diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/aggregator/as/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/aggregator/as/node.def index e0d63209..666dc54b 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/aggregator/as/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/aggregator/as/node.def @@ -1,3 +1,4 @@ type: u32 -help: AS number of aggregator -syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 4294967294; "AS number must be between 1 and 4294967294" +help: set the AS number of an aggregation +comp_help: \1 <1-65535>\tBGP AS number +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 4294967294; "BGP AS number must be between 1 and 4294967294" diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/aggregator/ip/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/aggregator/ip/node.def index 59f601c8..c6a6e878 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/aggregator/ip/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/aggregator/ip/node.def @@ -1,2 +1,3 @@ type: ipv4 -help: IP address of aggregator +help: set the IP address of an aggregation +comp_help: \1 <x.x.x.x>\tIP address diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/aggregator/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/aggregator/node.def index 84cca487..f24c09b3 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/aggregator/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/aggregator/node.def @@ -1,16 +1,16 @@ -help: BGP aggregator attribute -commit:expression: $VAR(./as/) != "" && $VAR(./ip/) != ""; "Must configure both as and ip" -commit:expression: $VAR(../../action/) != ""; "Must configure an action" -delete:expression: "echo $VAR(./as/@) $VAR(./ip/@) > /tmp/policy-route-map-$VAR(../../../@)-$VAR(../../action/@)-$VAR(../../@)-set-aggregator.$PPID" -end:expression: "if [ -f \"/tmp/policy-route-map-$VAR(../../../@)-$VAR(../../action/@)-$VAR(../../@)-set-aggregator.$PPID\" ]; then \ - as=$(cat /tmp/policy-route-map-$VAR(../../../@)-$VAR(../../action/@)-$VAR(../../@)-set-aggregator.$PPID); \ - ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"no set aggregator as $as\" ; \ - rm -rf /tmp/policy-route-map-$VAR(../../../@)-$VAR(../../action/@)-$VAR(../../@)-set-aggregator.$PPID; \ - else \ - as=\"$VAR(./as/@) $VAR(./ip/@)\"; \ - ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"set aggregator as $as\" ; \ - fi ; " +help: set the BGP aggregator attribute +commit:expression: $VAR(./as/) != "" && $VAR(./ip/) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@) set aggregator: you must configure both as and ip" +commit:expression: $VAR(../../action/) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@): you must configure an action" +delete: echo $VAR(./as/@) $VAR(./ip/@) > /tmp/policy-route-map-$VAR(../../../@)-$VAR(../../action/@)-$VAR(../../@)-set-aggregator.$PPID +end: if [ -f "/tmp/policy-route-map-$VAR(../../../@)-$VAR(../../action/@)-$VAR(../../@)-set-aggregator.$PPID" ]; then + as=$(cat /tmp/policy-route-map-$VAR(../../../@)-$VAR(../../action/@)-$VAR(../../@)-set-aggregator.$PPID); + ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "no set aggregator as $as" ; + rm -rf /tmp/policy-route-map-$VAR(../../../@)-$VAR(../../action/@)-$VAR(../../@)-set-aggregator.$PPID; + else + as="$VAR(./as/@) $VAR(./ip/@)"; + ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "set aggregator as $as" ; + fi ; diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/as-path-prepend/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/as-path-prepend/node.def index b9c1ae27..74f76321 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/as-path-prepend/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/as-path-prepend/node.def @@ -1,11 +1,11 @@ type: txt -help: Prepend string for a BGP AS-path attribute -syntax:expression: exec "/opt/vyatta/sbin/vyatta-check-as-prepend.pl \"$VAR(@)\" "; "Invalid AS path." -commit:expression: $VAR(../../action/) != ""; "You must specify an action for route-map $VAR(../../../@) rule $VAR(../../@)" -update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"set as-path prepend $VAR(@)\" " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"no set as-path prepend \" " -comp_help: Enter a list of AS numbers to prepend. Use double quotes around the list (f.g. "456 64500 45001") +help: set prepend string for a BGP AS-path attribute +comp_help: \1 <txt>\t\tBGP AS path prepend string (ex: "456 64500 45001") +syntax:expression: exec "/opt/vyatta/sbin/vyatta-check-as-prepend.pl \"$VAR(@)\" "; "invalid AS path string" +commit:expression: $VAR(../../action/) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@): you must specify an action" +update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "set as-path prepend $VAR(@)" +delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "no set as-path prepend " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/atomic-aggregate/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/atomic-aggregate/node.def index 0cc8560b..bf2b5f26 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/atomic-aggregate/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/atomic-aggregate/node.def @@ -1,8 +1,8 @@ -help: BGP atomic aggregate attribute -commit:expression: $VAR(../../action/) != ""; "You must specify an action for route-map $VAR(../../../@) rule $VAR(../../@)" -update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"set atomic-aggregate\" " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"no set atomic-aggregate\" " +help: set BGP atomic aggregate attribute +commit:expression: $VAR(../../action/) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@): you must specify an action" +update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "set atomic-aggregate" +delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "no set atomic-aggregate" diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/comm-list/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/comm-list/node.def index eed327b9..9153c209 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/comm-list/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/comm-list/node.def @@ -1,3 +1,5 @@ type: u32 -help: Set BGP community list -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy community-list $VAR(@)\""; "community list $VAR(@) does not exist" +help: set BGP communities with a community-list +comp_help: \1 <1-99>\t\tBGP community list (standard) + <100-500>\t\tBGP community list (expanded) +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy community-list $VAR(@)\""; "policy route-map $VAR(../../../@) rule $VAR(../../@) set comm-list: community list $VAR(@) does not exist" diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/delete/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/delete/node.def index 000d8d23..3fe495f2 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/delete/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/delete/node.def @@ -1 +1 @@ -help: Delete matching communities +help: delete BGP communities matching the community-list diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/node.def index 0dea5ab1..53f33fa2 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/node.def @@ -1,20 +1,24 @@ -help: Set BGP community list -delete:expression: "touch /tmp/policy-route-map-$VAR(../../../@)-$VAR(../../action/@)-$VAR(../../@)-set-comm-list.$PPID" -## this will always return delete pending bug 2525 being fixed -end:expression: "if [ -z \"$VAR(./comm-list/)\" ]; then \ - echo You must configure a comm-list ; \ - exit 1 ; \ - fi ; \ - ${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"no set comm-list \" ; \ - if [ -f \"/tmp/policy-route-map-$VAR(../../../@)-$VAR(../../action/@)-$VAR(../../@)-set-comm-list.$PPID\" ]; then \ - rm -rf /tmp/policy-route-map-$VAR(../../../@)-$VAR(../../action/@)-$VAR(../../@)-set-comm-list.$PPID; \ - else \ - if [ -n \"$VAR(./delete/)\" ]; then \ - cond=\"delete\" ; \ - fi ; \ - ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"set comm-list $VAR(./comm-list/@) $cond\" ; \ - fi; " +help: set or delete BGP communities matching a community-list +delete: touch /tmp/policy-route-map-$VAR(../../../@)-$VAR(../../action/@)-$VAR(../../@)-set-comm-list.$PPID +end: if [ -z "$VAR(./comm-list/)" ]; then + echo policy route-map $VAR(../../../@) rule $VAR(../../@) set comm-list: You must configure a comm-list ; + exit 1 ; + fi ; + ${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "no set comm-list " ; + if [ -f "/tmp/policy-route-map-$VAR(../../../@)-$VAR(../../action/@)-$VAR(../../@)-set-comm-list.$PPID" ]; then + rm -rf /tmp/policy-route-map-$VAR(../../../@)-$VAR(../../action/@)-$VAR(../../@)-set-comm-list.$PPID; + else + # uncomment this when 2525 is fixed and comment out the subsequent call + #if [ -n "$VAR(./delete/)" ]; then + # cond="delete" ; + #fi ; \ + ${vyatta_sbindir}/vyatta-check-typeless-node.pl "policy route-map $VAR(../../../@) rule $VAR(../../@) set comm-list delete"; + if [ $? -eq 0 ]; then + cond="delete "; + fi ; + ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "set comm-list $VAR(./comm-list/@) $cond" ; + fi; diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/community/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/community/node.def index 83c93e8c..cf05d819 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/community/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/community/node.def @@ -1,9 +1,15 @@ type: txt -help: Community number in aa:nn format or local-AS|no-advertise|no-export|internet|additive or none -commit:expression: $VAR(../../action/) != ""; "You must specify an action for route-map $VAR(../../../@) rule $VAR(../../@)" -update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"set community $VAR(@)\" " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"no set community \" " +help: set the BGP community attribute +comp_help: \1 <AA:NN>\t\tcommunity in 4 octet AS:value format + additive\t\tcommunities are appended to existing community string + internet\t\tsymbolic Internet community 0 + local-AS\t\tadvertise communities in local AS only (NO_EXPORT_SUBCONFED) + no-advertise\tdon't advertise this route to any peer (NO_ADVERTISE) + no-export\t\tdon't advertise outside of this AS of confederation boundry (NO_EXPORT) +commit:expression: $VAR(../../action/) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@): You must specify an action" +update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "set community $VAR(@)" +delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "no set community " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/ip-next-hop/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/ip-next-hop/node.def index 05438de7..7ee9cc5d 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/ip-next-hop/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/ip-next-hop/node.def @@ -1,10 +1,11 @@ type: ipv4 -help: Next hop IP address +help: set nexthop IP address +comp_help: \1 <x.x.x.x>\tIP address # TODO: can also set to peer for BGP -commit:expression: $VAR(../../action/) != ""; "You must specify an action for route-map $VAR(../../../@) rule $VAR(../../@)" -update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"set ip next-hop $VAR(@)\" " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"no set ip next-hop \" " +commit:expression: $VAR(../../action/) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@): you must specify an action" +update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "set ip next-hop $VAR(@)" +delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "no set ip next-hop " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/local-preference/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/local-preference/node.def index 678f081b..37bb016f 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/local-preference/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/local-preference/node.def @@ -1,9 +1,10 @@ type: u32 -help: BGP local preference path attribute -commit:expression: $VAR(../../action/) != ""; "You must specify an action for route-map $VAR(../../../@) rule $VAR(../../@)" -update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"set local-preference $VAR(@)\" " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"no set local-preference \" " +help: set BGP local preference attribute +comp_help: \1 <0-4294967295>\tlocal preference value +commit:expression: $VAR(../../action/) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@): you must specify an action" +update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "set local-preference $VAR(@)" +delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "no set local-preference " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/metric-type/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/metric-type/node.def index 318def7e..84f6c4f0 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/metric-type/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/metric-type/node.def @@ -1,13 +1,12 @@ type: txt -help: Set OSPF external metric-type +help: set OSPF external metric-type +comp_help: \1 type-1\tOSPF external type 1 metric + type-2\tOSPF external type 2 metric syntax:expression: $VAR(@) in "type-1", "type-2"; "Must be (type-1, type-2)" -commit:expression: $VAR(../../action/) != ""; "You must specify an action for route-map $VAR(../../../@) rule $VAR(../../@)" -update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"set metric-type $VAR(@)\" " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"no set metric-type \" " -comp_help: possible completions: - type-1 OSPF external type 1 metric - type-2 OSPF external type 2 metric +commit:expression: $VAR(../../action/) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@): you must specify an action" +update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "set metric-type $VAR(@)" +delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "no set metric-type " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/metric/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/metric/node.def index c16e4faf..67ee3415 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/metric/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/metric/node.def @@ -1,10 +1,12 @@ type: txt -help: Metric value for destination routing protocol +help: set destination routing protocol metric +comp_help: \1 <+/-metric>\tadd or subtract metric + <0-4294967295>\tmetric value syntax:expression: exec "if [ -n \"$(echo $VAR(@) | sed 's/^[+-]*[0123456789]*//')\" ]; then exit 1; fi; "; "metric must be an integer with an optional +/- prepend" -commit:expression: $VAR(../../action/) != ""; "You must specify an action for route-map $VAR(../../../@) rule $VAR(../../@)" -update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"set metric $VAR(@)\" " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"no set metric \" " +commit:expression: $VAR(../../action/) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@): you must specify an action" +update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "set metric $VAR(@)" +delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "no set metric " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/node.def index 80487db0..cb0a7dcd 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/node.def @@ -1 +1 @@ -help: Set values in destination routing protocol +help: set route parameters diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/origin/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/origin/node.def index 7fa269eb..4feb9c3d 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/origin/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/origin/node.def @@ -1,10 +1,13 @@ type: txt -help: BGP origin code +help: set BGP origin code +comp_help: \1 igp\t\tinterior gateway protocol origin + egp\t\texterior gateway protocol origin + incomplete\tincomplete origin syntax:expression: $VAR(@) in "igp", "egp", "incomplete"; "origin must be one of igp, egp, or incomplete" -commit:expression: $VAR(../../action/) != ""; "You must specify an action for route-map $VAR(../../../@) rule $VAR(../../@)" -update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"set origin $VAR(@)\" " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"no set origin \" " +commit:expression: $VAR(../../action/) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@): you must specify an action" +update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "set origin $VAR(@)" +delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "no set origin " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/originator-id/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/originator-id/node.def index f82602c4..471d6c3e 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/originator-id/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/originator-id/node.def @@ -1,9 +1,10 @@ type: ipv4 -help: BGP originator ID attribute -commit:expression: $VAR(../../action/) != ""; "You must specify an action for route-map $VAR(../../../@) rule $VAR(../../@)" -update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"set originator-id $VAR(@)\" " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"no set originator-id \" " +help: set BGP originator ID attribute +comp_help: \1 <x.x.x.x>\toriginator IP address +commit:expression: $VAR(../../action/) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@): you must specify an action" +update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "set originator-id $VAR(@)" +delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "no set originator-id " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/tag/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/tag/node.def index 9a74d304..5779477f 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/tag/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/tag/node.def @@ -1,10 +1,11 @@ type: u32 -help: Tag value for routing protocol +help: set tag value for routing protocol +comp_help: \1 <1-65535>\t\ttag value syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "tag must be between 1 and 65535" -commit:expression: $VAR(../../action/) != ""; "You must specify an action for route-map $VAR(../../../@) rule $VAR(../../@)" -update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"set tag $VAR(@)\" " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"no set tag \" " +commit:expression: $VAR(../../action/) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@): you must specify an action" +update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "set tag $VAR(@)" +delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "no set tag " diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/weight/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/weight/node.def index 035d8e38..1edfd480 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/weight/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/weight/node.def @@ -1,9 +1,10 @@ type: u32 -help: BGP weight for routing table -commit:expression: $VAR(../../action/) != ""; "You must specify an action for route-map $VAR(../../../@) rule $VAR(../../@)" -update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"set weight $VAR(@)\" " -delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" \ - -c \"route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)\" \ - -c \"no set weight \" " +help: set BGP weight attribute +comp_help: \1 <0-4294967295>\tBGP weight +commit:expression: $VAR(../../action/) != ""; "policy route-map $VAR(../../../@) rule $VAR(../../@): you must specify an action" +update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "set weight $VAR(@) " +delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" \ + -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ + -c "no set weight " diff --git a/templates/protocols/bgp/node.tag/network/node.def b/templates/protocols/bgp/node.tag/network/node.def index c6061749..3d547a34 100644 --- a/templates/protocols/bgp/node.tag/network/node.def +++ b/templates/protocols/bgp/node.tag/network/node.def @@ -5,7 +5,7 @@ syntax:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --check-prefix- "Prefix doesn't fall on a natural boundry" commit:expression: !($VAR(./backdoor/) != "" && $VAR(./route-map/) != ""); - "May specify route-map or backdoor but not both" + "protocols bgp $VAR(../@) network $VAR(@): May specify route-map or backdoor but not both" delete: touch /tmp/`echo $VAR(@) | sed 's!/!!'`.$PPID @@ -24,7 +24,7 @@ end: ${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c "configure terminal" -c "router fi ; if [ -n "$VAR(./route-map/@)" ]; then - COND="route-map $VAR(./route-map/@)"; + cond="route-map $VAR(./route-map/@)"; fi; ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" -c "router bgp $VAR(../@)" -c "network $VAR(@) $cond"; |