diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-01-14 14:53:28 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-01-14 14:53:28 -0800 |
commit | eb6fd59986cc471e4f6fb7cce356c2e1251e54f3 (patch) | |
tree | 727a578d65bf46d6ff6cfe6f0575ec8c8f97a662 /templates/policy | |
parent | 17a77a2161625348b1f1c08b1f1df44471e77ac7 (diff) | |
download | vyatta-cfg-quagga-eb6fd59986cc471e4f6fb7cce356c2e1251e54f3.tar.gz vyatta-cfg-quagga-eb6fd59986cc471e4f6fb7cce356c2e1251e54f3.zip |
Check arguement to policy route-map COMMUNITY rule N set community
Add completion and syntax validation
Bug 4964
Diffstat (limited to 'templates/policy')
-rw-r--r-- | templates/policy/route-map/node.tag/rule/node.tag/set/community/node.def | 12 |
1 files changed, 11 insertions, 1 deletions
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 89d434b5..b8dcf529 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 @@ -6,10 +6,20 @@ comp_help: \1 <AA:NN>\t\tcommunity in 4 octet AS:value format 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" + +allowed:echo "local-as no-advertise no-export internet additive" + +syntax:expression: pattern $VAR(@) "^[[:digit:]]+:[[:digit:]]+$" \ + || $VAR(@) in "local-as", "no-advertise","no-export","internet","additive" \ + ; "$VAR(@): Unknown community string or attribute" + +commit:expression: $VAR(../../action/) != ""; \ + "policy route-map $VAR(../../../@) rule $VAR(../../@): You must specify an action" + update: vyatta-vtysh -c "configure terminal" \ -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ -c "set community $VAR(@)" + delete: vyatta-vtysh -c "configure terminal" \ -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \ -c "no set community " |