summaryrefslogtreecommitdiff
path: root/templates/policy/extcommunity-list
diff options
context:
space:
mode:
Diffstat (limited to 'templates/policy/extcommunity-list')
-rw-r--r--templates/policy/extcommunity-list/expanded/description/node.def2
-rw-r--r--templates/policy/extcommunity-list/expanded/node.def8
-rw-r--r--templates/policy/extcommunity-list/expanded/rule/node.def6
-rw-r--r--templates/policy/extcommunity-list/expanded/rule/node.tag/action/node.def6
-rw-r--r--templates/policy/extcommunity-list/expanded/rule/node.tag/description/node.def2
-rw-r--r--templates/policy/extcommunity-list/expanded/rule/node.tag/regex/node.def5
-rw-r--r--templates/policy/extcommunity-list/node.def7
-rw-r--r--templates/policy/extcommunity-list/standard/description/node.def2
-rw-r--r--templates/policy/extcommunity-list/standard/node.def8
-rw-r--r--templates/policy/extcommunity-list/standard/rule/node.def6
-rw-r--r--templates/policy/extcommunity-list/standard/rule/node.tag/action/node.def6
-rw-r--r--templates/policy/extcommunity-list/standard/rule/node.tag/description/node.def2
-rw-r--r--templates/policy/extcommunity-list/standard/rule/node.tag/regex/node.def7
13 files changed, 67 insertions, 0 deletions
diff --git a/templates/policy/extcommunity-list/expanded/description/node.def b/templates/policy/extcommunity-list/expanded/description/node.def
new file mode 100644
index 00000000..7a660be4
--- /dev/null
+++ b/templates/policy/extcommunity-list/expanded/description/node.def
@@ -0,0 +1,2 @@
+type: txt
+help: Description for this community list
diff --git a/templates/policy/extcommunity-list/expanded/node.def b/templates/policy/extcommunity-list/expanded/node.def
new file mode 100644
index 00000000..95f6f003
--- /dev/null
+++ b/templates/policy/extcommunity-list/expanded/node.def
@@ -0,0 +1,8 @@
+tag:
+priority: 490
+type: txt
+help: Border Gateway Protocol (BGP) extended community-list filter
+
+syntax:expression: pattern $VAR(@) "^[a-zA-Z0-9]+$" ; "Should be alphanumeric name"
+
+end: /opt/vyatta/sbin/vyatta-policy.pl --update-community-list expanded $VAR(@)
diff --git a/templates/policy/extcommunity-list/expanded/rule/node.def b/templates/policy/extcommunity-list/expanded/rule/node.def
new file mode 100644
index 00000000..7826f33d
--- /dev/null
+++ b/templates/policy/extcommunity-list/expanded/rule/node.def
@@ -0,0 +1,6 @@
+tag:
+type: u32
+help: create a rule for this BGP extended community list
+val_help: u32:1-65535; Extended community-list rule number
+
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "rule number must be between 1 and 65535"
diff --git a/templates/policy/extcommunity-list/expanded/rule/node.tag/action/node.def b/templates/policy/extcommunity-list/expanded/rule/node.tag/action/node.def
new file mode 100644
index 00000000..db4bdbc6
--- /dev/null
+++ b/templates/policy/extcommunity-list/expanded/rule/node.tag/action/node.def
@@ -0,0 +1,6 @@
+type: txt
+help: Action to take on routes matching this rule [REQUIRED]
+val_help: permit; Permit matching routes
+val_help: deny; Deny matching routes
+
+syntax:expression: $VAR(@) in "permit", "deny"; "action must be permit or deny"
diff --git a/templates/policy/extcommunity-list/expanded/rule/node.tag/description/node.def b/templates/policy/extcommunity-list/expanded/rule/node.tag/description/node.def
new file mode 100644
index 00000000..b8e3095b
--- /dev/null
+++ b/templates/policy/extcommunity-list/expanded/rule/node.tag/description/node.def
@@ -0,0 +1,2 @@
+type: txt
+help: Description for this rule
diff --git a/templates/policy/extcommunity-list/expanded/rule/node.tag/regex/node.def b/templates/policy/extcommunity-list/expanded/rule/node.tag/regex/node.def
new file mode 100644
index 00000000..fae3784c
--- /dev/null
+++ b/templates/policy/extcommunity-list/expanded/rule/node.tag/regex/node.def
@@ -0,0 +1,5 @@
+type: txt
+help: Extended community regexp.
+val_help: Extended community list regular expression
+
+commit:expression: $VAR(../action/@) != ""; "You must specify an action"
diff --git a/templates/policy/extcommunity-list/node.def b/templates/policy/extcommunity-list/node.def
new file mode 100644
index 00000000..9676146c
--- /dev/null
+++ b/templates/policy/extcommunity-list/node.def
@@ -0,0 +1,7 @@
+tag:
+priority: 480
+type: txt
+help: Border Gateway Protocol (BGP) extended communities attribute. Usefull for implementing network policy for MPLS VPN/BGP by restricting routes according to their Route Target or Site of Origin.
+val_help: Type of extended community. standard or expanded.
+
+syntax:expression: pattern $VAR(@) "^standard|expanded$" ; "Should be either standard or expanded"
diff --git a/templates/policy/extcommunity-list/standard/description/node.def b/templates/policy/extcommunity-list/standard/description/node.def
new file mode 100644
index 00000000..7a660be4
--- /dev/null
+++ b/templates/policy/extcommunity-list/standard/description/node.def
@@ -0,0 +1,2 @@
+type: txt
+help: Description for this community list
diff --git a/templates/policy/extcommunity-list/standard/node.def b/templates/policy/extcommunity-list/standard/node.def
new file mode 100644
index 00000000..aec1edcd
--- /dev/null
+++ b/templates/policy/extcommunity-list/standard/node.def
@@ -0,0 +1,8 @@
+tag:
+priority: 485
+type: txt
+help: Border Gateway Protocol (BGP) extended community-list filter
+
+syntax:expression: pattern $VAR(@) "^[a-zA-Z0-9]+$" ; "Should be alphanumeric name"
+
+end: /opt/vyatta/sbin/vyatta-policy.pl --update-community-list standard $VAR(@)
diff --git a/templates/policy/extcommunity-list/standard/rule/node.def b/templates/policy/extcommunity-list/standard/rule/node.def
new file mode 100644
index 00000000..7826f33d
--- /dev/null
+++ b/templates/policy/extcommunity-list/standard/rule/node.def
@@ -0,0 +1,6 @@
+tag:
+type: u32
+help: create a rule for this BGP extended community list
+val_help: u32:1-65535; Extended community-list rule number
+
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "rule number must be between 1 and 65535"
diff --git a/templates/policy/extcommunity-list/standard/rule/node.tag/action/node.def b/templates/policy/extcommunity-list/standard/rule/node.tag/action/node.def
new file mode 100644
index 00000000..db4bdbc6
--- /dev/null
+++ b/templates/policy/extcommunity-list/standard/rule/node.tag/action/node.def
@@ -0,0 +1,6 @@
+type: txt
+help: Action to take on routes matching this rule [REQUIRED]
+val_help: permit; Permit matching routes
+val_help: deny; Deny matching routes
+
+syntax:expression: $VAR(@) in "permit", "deny"; "action must be permit or deny"
diff --git a/templates/policy/extcommunity-list/standard/rule/node.tag/description/node.def b/templates/policy/extcommunity-list/standard/rule/node.tag/description/node.def
new file mode 100644
index 00000000..b8e3095b
--- /dev/null
+++ b/templates/policy/extcommunity-list/standard/rule/node.tag/description/node.def
@@ -0,0 +1,2 @@
+type: txt
+help: Description for this rule
diff --git a/templates/policy/extcommunity-list/standard/rule/node.tag/regex/node.def b/templates/policy/extcommunity-list/standard/rule/node.tag/regex/node.def
new file mode 100644
index 00000000..36dd9954
--- /dev/null
+++ b/templates/policy/extcommunity-list/standard/rule/node.tag/regex/node.def
@@ -0,0 +1,7 @@
+type: txt
+help: Extended community value. Should be either AS:VAL or IP-Address:VAL
+val_help: Community list regular expression
+
+syntax:expression: pattern $VAR(@) "^([0-9]*)|([0-9]{1-3}\.[0-9]{1-3}\.[0-9]{1-3}\.[0-9]{1-3}):[0-9]*$"
+
+commit:expression: $VAR(../action/@) != ""; "You must specify an action"