summaryrefslogtreecommitdiff
path: root/templates/policy/community-list
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2007-10-01 13:14:31 -0700
committerAn-Cheng Huang <ancheng@vyatta.com>2007-10-01 13:14:31 -0700
commitcfa368bbc1d4c55c42c60838e04fc523625932b7 (patch)
treee439217d7e3ebb726b9954d7f823db2b47f18c9d /templates/policy/community-list
downloadvyatta-cfg-quagga-upstream.tar.gz
vyatta-cfg-quagga-upstream.zip
initial import (from eureka /cli).upstream
Diffstat (limited to 'templates/policy/community-list')
-rw-r--r--templates/policy/community-list/node.def8
-rw-r--r--templates/policy/community-list/node.tag/description/node.def2
-rw-r--r--templates/policy/community-list/node.tag/rule/node.def4
-rw-r--r--templates/policy/community-list/node.tag/rule/node.tag/action/node.def3
-rw-r--r--templates/policy/community-list/node.tag/rule/node.tag/description/node.def2
-rw-r--r--templates/policy/community-list/node.tag/rule/node.tag/regex/node.def11
6 files changed, 30 insertions, 0 deletions
diff --git a/templates/policy/community-list/node.def b/templates/policy/community-list/node.def
new file mode 100644
index 00000000..812dd436
--- /dev/null
+++ b/templates/policy/community-list/node.def
@@ -0,0 +1,8 @@
+tag:
+type: u32
+help: "Add a community list entry"
+syntax: $(@) >= 1 && $(@) <= 500; " \
+community-list must be \
+ <1-99> Community list number (standard) \
+ <100-500> Community list number (expanded) "
+end: "/opt/vyatta/sbin/vyatta_policy.pl --update-community-list $(@)"
diff --git a/templates/policy/community-list/node.tag/description/node.def b/templates/policy/community-list/node.tag/description/node.def
new file mode 100644
index 00000000..c6f76be3
--- /dev/null
+++ b/templates/policy/community-list/node.tag/description/node.def
@@ -0,0 +1,2 @@
+type: txt
+help: "community-list description"
diff --git a/templates/policy/community-list/node.tag/rule/node.def b/templates/policy/community-list/node.tag/rule/node.def
new file mode 100644
index 00000000..3a0c33bd
--- /dev/null
+++ b/templates/policy/community-list/node.tag/rule/node.def
@@ -0,0 +1,4 @@
+tag:
+type: u32
+help: "Specify as-path-list rule number"
+syntax: $(@) >= 1 && $(@) <= 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
new file mode 100644
index 00000000..92e66ad2
--- /dev/null
+++ b/templates/policy/community-list/node.tag/rule/node.tag/action/node.def
@@ -0,0 +1,3 @@
+type: txt
+help: "action to take on communities matching this rule"
+syntax: $(@) 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
new file mode 100644
index 00000000..3d61ac85
--- /dev/null
+++ b/templates/policy/community-list/node.tag/rule/node.tag/description/node.def
@@ -0,0 +1,2 @@
+type: txt
+help: "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
new file mode 100644
index 00000000..6b116123
--- /dev/null
+++ b/templates/policy/community-list/node.tag/rule/node.tag/regex/node.def
@@ -0,0 +1,11 @@
+type: txt
+help: "community list regular expression"
+# pending bug 2285
+syntax: exec " \
+if [ $(../../@) -ge 1 ] && [ $(../../@) -le 99 ]; then \
+ if [ -n \"`echo $(@) | 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 $(@) is invalid for a standard community list; \
+ exit 1 ; \
+ fi ; \
+fi ; "
+commit: $(../action/@) != ""; "You must specify an action before committing"