summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/policy/access-list/node.def1
-rw-r--r--templates/policy/access-list6/node.def1
-rw-r--r--templates/policy/as-path-list/node.def1
-rw-r--r--templates/policy/community-list/node.def1
-rw-r--r--templates/policy/node.def1
-rw-r--r--templates/policy/prefix-list/node.def1
-rw-r--r--templates/policy/prefix-list6/node.def1
-rw-r--r--templates/policy/route-map/node.def1
-rw-r--r--templates/protocols/static/table/node.def5
-rw-r--r--templates/protocols/static/table/node.tag/interface-route/node.def7
-rw-r--r--templates/protocols/static/table/node.tag/interface-route/node.tag/next-hop-interface/node.def34
-rw-r--r--templates/protocols/static/table/node.tag/interface-route/node.tag/next-hop-interface/node.tag/disable/node.def1
-rw-r--r--templates/protocols/static/table/node.tag/interface-route/node.tag/next-hop-interface/node.tag/distance/node.def4
-rw-r--r--templates/protocols/static/table/node.tag/route/node.def7
-rw-r--r--templates/protocols/static/table/node.tag/route/node.tag/blackhole/distance/node.def4
-rw-r--r--templates/protocols/static/table/node.tag/route/node.tag/blackhole/node.def22
-rw-r--r--templates/protocols/static/table/node.tag/route/node.tag/next-hop/node.def38
-rw-r--r--templates/protocols/static/table/node.tag/route/node.tag/next-hop/node.tag/disable/node.def1
-rw-r--r--templates/protocols/static/table/node.tag/route/node.tag/next-hop/node.tag/distance/node.def4
19 files changed, 134 insertions, 1 deletions
diff --git a/templates/policy/access-list/node.def b/templates/policy/access-list/node.def
index 92323da0..173acf0d 100644
--- a/templates/policy/access-list/node.def
+++ b/templates/policy/access-list/node.def
@@ -1,4 +1,5 @@
tag:
+priority: 470
type: u32
help: IP access-list filter
syntax:expression: ($VAR(@) >= 1 && $VAR(@) <= 199) || ($VAR(@) >= 1300 && $VAR(@) <= 2699); \
diff --git a/templates/policy/access-list6/node.def b/templates/policy/access-list6/node.def
index 7ddb65ac..c9323c70 100644
--- a/templates/policy/access-list6/node.def
+++ b/templates/policy/access-list6/node.def
@@ -1,4 +1,5 @@
tag:
+priority: 470
type: txt
help: IPv6 access-list filter
val_help: Name of IPv6 access-list
diff --git a/templates/policy/as-path-list/node.def b/templates/policy/as-path-list/node.def
index 96a616a6..faa1268c 100644
--- a/templates/policy/as-path-list/node.def
+++ b/templates/policy/as-path-list/node.def
@@ -1,4 +1,5 @@
tag:
+priority: 470
type: txt
help: Border Gateway Protocol (BGP) autonomous system path filter
val_help: AS path list name
diff --git a/templates/policy/community-list/node.def b/templates/policy/community-list/node.def
index bf41b6a1..5d4dc0bb 100644
--- a/templates/policy/community-list/node.def
+++ b/templates/policy/community-list/node.def
@@ -1,4 +1,5 @@
tag:
+priority: 470
type: u32
help: Border Gateway Protocol (BGP) community-list filter
diff --git a/templates/policy/node.def b/templates/policy/node.def
index 837ff6be..2dfa390f 100644
--- a/templates/policy/node.def
+++ b/templates/policy/node.def
@@ -1,2 +1 @@
-priority: 470
help: Routing policy
diff --git a/templates/policy/prefix-list/node.def b/templates/policy/prefix-list/node.def
index 3b1f2a20..bdf9dcec 100644
--- a/templates/policy/prefix-list/node.def
+++ b/templates/policy/prefix-list/node.def
@@ -1,4 +1,5 @@
tag:
+priority: 470
type: txt
help: IP prefix-list filter
val_help: Prefix list name
diff --git a/templates/policy/prefix-list6/node.def b/templates/policy/prefix-list6/node.def
index 0dd244ca..effbbbf2 100644
--- a/templates/policy/prefix-list6/node.def
+++ b/templates/policy/prefix-list6/node.def
@@ -1,4 +1,5 @@
tag:
+priority: 470
type: txt
help: IPv6 prefix-list filter
val_help: Prefix list name
diff --git a/templates/policy/route-map/node.def b/templates/policy/route-map/node.def
index b2fa6b8c..1a3fd8b7 100644
--- a/templates/policy/route-map/node.def
+++ b/templates/policy/route-map/node.def
@@ -1,4 +1,5 @@
tag:
+priority: 470
type: txt
help: IP route-map
val_help: Route map name
diff --git a/templates/protocols/static/table/node.def b/templates/protocols/static/table/node.def
new file mode 100644
index 00000000..3f639363
--- /dev/null
+++ b/templates/protocols/static/table/node.def
@@ -0,0 +1,5 @@
+tag:
+type: u32
+help: Policy route table number
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 250; "Must be between (1-250)"
+val_help: u32:1-250; Policy route table number
diff --git a/templates/protocols/static/table/node.tag/interface-route/node.def b/templates/protocols/static/table/node.tag/interface-route/node.def
new file mode 100644
index 00000000..73dd97a3
--- /dev/null
+++ b/templates/protocols/static/table/node.tag/interface-route/node.def
@@ -0,0 +1,7 @@
+tag:
+type: ipv4net
+help: Interface based static route
+syntax:expression: exec "${vyatta_sbindir}/check_prefix_boundary $VAR(@)"
+
+commit:expression: $VAR(./next-hop-interface/) != "" ; \
+ "Must add a next-hop-interface for route $VAR(@)"
diff --git a/templates/protocols/static/table/node.tag/interface-route/node.tag/next-hop-interface/node.def b/templates/protocols/static/table/node.tag/interface-route/node.tag/next-hop-interface/node.def
new file mode 100644
index 00000000..255e572d
--- /dev/null
+++ b/templates/protocols/static/table/node.tag/interface-route/node.tag/next-hop-interface/node.def
@@ -0,0 +1,34 @@
+tag:
+type: txt
+help: Next-hop interface [REQUIRED]
+# show all current interface
+# but syntax accepts any interface since it may exist later (ppp etc)
+allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show all
+
+
+end:
+ if [[ -n "$VAR(../../../table/@)" ]]
+ then
+ table="table $VAR(../../../table/@)"
+ fi
+ if [[ -z "$VAR(./disable)" ]]
+ then
+ if [[ ${COMMIT_ACTION} = 'DELETE' ]]
+ then
+ if ! ${vyatta_sbindir}/vyatta-next-hop-check $VAR(../@) ipv4 interface; then
+ exit 1;
+ fi
+ vtysh -c "configure terminal" \
+ -c "no ip route $VAR(../@) $VAR(@) $table"
+ else
+ if [[ -n "$VAR(./distance/@)" ]]
+ then
+ dist="$VAR(./distance/@)"
+ fi
+ vtysh -c "configure terminal" \
+ -c "ip route $VAR(../@) $VAR(@) $table $dist";
+ fi
+ else
+ vtysh -c "configure terminal" \
+ -c "no ip route $VAR(../@) $VAR(@) $table"
+ fi
diff --git a/templates/protocols/static/table/node.tag/interface-route/node.tag/next-hop-interface/node.tag/disable/node.def b/templates/protocols/static/table/node.tag/interface-route/node.tag/next-hop-interface/node.tag/disable/node.def
new file mode 100644
index 00000000..92f2ba51
--- /dev/null
+++ b/templates/protocols/static/table/node.tag/interface-route/node.tag/next-hop-interface/node.tag/disable/node.def
@@ -0,0 +1 @@
+help: Disable IPv4 interface static route
diff --git a/templates/protocols/static/table/node.tag/interface-route/node.tag/next-hop-interface/node.tag/distance/node.def b/templates/protocols/static/table/node.tag/interface-route/node.tag/next-hop-interface/node.tag/distance/node.def
new file mode 100644
index 00000000..61abcc65
--- /dev/null
+++ b/templates/protocols/static/table/node.tag/interface-route/node.tag/next-hop-interface/node.tag/distance/node.def
@@ -0,0 +1,4 @@
+type: u32
+help: Distance value for this route
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 255; "Must be between (1-255)"
+val_help: u32:1-255; Distance for this route
diff --git a/templates/protocols/static/table/node.tag/route/node.def b/templates/protocols/static/table/node.tag/route/node.def
new file mode 100644
index 00000000..682ca944
--- /dev/null
+++ b/templates/protocols/static/table/node.tag/route/node.def
@@ -0,0 +1,7 @@
+tag:
+type: ipv4net
+help: Static route
+syntax:expression: exec "${vyatta_sbindir}/check_prefix_boundary $VAR(@)"
+
+commit:expression: $VAR(./next-hop/) != "" || $VAR(./blackhole/) != ""; \
+ "Must add either a next-hop or blackhole for route $VAR(@)"
diff --git a/templates/protocols/static/table/node.tag/route/node.tag/blackhole/distance/node.def b/templates/protocols/static/table/node.tag/route/node.tag/blackhole/distance/node.def
new file mode 100644
index 00000000..61abcc65
--- /dev/null
+++ b/templates/protocols/static/table/node.tag/route/node.tag/blackhole/distance/node.def
@@ -0,0 +1,4 @@
+type: u32
+help: Distance value for this route
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 255; "Must be between (1-255)"
+val_help: u32:1-255; Distance for this route
diff --git a/templates/protocols/static/table/node.tag/route/node.tag/blackhole/node.def b/templates/protocols/static/table/node.tag/route/node.tag/blackhole/node.def
new file mode 100644
index 00000000..06dbe5ae
--- /dev/null
+++ b/templates/protocols/static/table/node.tag/route/node.tag/blackhole/node.def
@@ -0,0 +1,22 @@
+help: Silently discard pkts when matched
+
+end:
+ if [[ -n "$VAR(../../../table/@)" ]]
+ then
+ table="table $VAR(../../../table/@)"
+ fi
+ if [ ${COMMIT_ACTION} = 'DELETE' ]; then
+ if ! ${vyatta_sbindir}/vyatta-next-hop-check $VAR(../@) ipv4 address; then
+ exit 1;
+ fi
+
+ vtysh -c "configure terminal" \
+ -c "no ip route $VAR(../@) null0 $table";
+ else
+ if [ -n "$VAR(./distance/@)" ]; then
+ dist="$VAR(./distance/@)";
+ fi;
+
+ vtysh -c "configure terminal" \
+ -c "ip route $VAR(../@) null0 $table $dist";
+ fi;
diff --git a/templates/protocols/static/table/node.tag/route/node.tag/next-hop/node.def b/templates/protocols/static/table/node.tag/route/node.tag/next-hop/node.def
new file mode 100644
index 00000000..5fb54a8b
--- /dev/null
+++ b/templates/protocols/static/table/node.tag/route/node.tag/next-hop/node.def
@@ -0,0 +1,38 @@
+tag:
+type: ipv4
+help: Next-hop router [REQUIRED]
+end:
+ if [[ -n "$VAR(../../../table/@)" ]]
+ then
+ table="table $VAR(../../../table/@)"
+ fi
+ if [[ -z "$VAR(./disable)" ]]
+ then
+ if [[ ${COMMIT_ACTION} = 'DELETE' ]]
+ then
+ if ! ${vyatta_sbindir}/vyatta-next-hop-check $VAR(../@) ipv4 address; then
+ exit 1;
+ fi
+ if ${vyatta_sbindir}/vyatta-gateway-static_route-check.pl \
+ "$VAR(../@)" "$VAR(@)"
+ then
+ vtysh -c "configure terminal" \
+ -c "no ip route $VAR(../@) $VAR(@) $table"
+ fi
+ else
+ if [[ -n "$VAR(./distance/@)" ]]
+ then
+ dist="$VAR(./distance/@)"
+ fi
+ vtysh -c "configure terminal" \
+ -c "ip route $VAR(../@) $VAR(@) $table $dist";
+ fi
+ else
+ if ${vyatta_sbindir}/vyatta-gateway-static_route-check.pl \
+ "$VAR(../@)" "$VAR(@)"
+ then
+ vtysh -c "configure terminal" \
+ -c "no ip route $VAR(../@) $VAR(@) $table"
+ fi
+ fi
+
diff --git a/templates/protocols/static/table/node.tag/route/node.tag/next-hop/node.tag/disable/node.def b/templates/protocols/static/table/node.tag/route/node.tag/next-hop/node.tag/disable/node.def
new file mode 100644
index 00000000..de3afda4
--- /dev/null
+++ b/templates/protocols/static/table/node.tag/route/node.tag/next-hop/node.tag/disable/node.def
@@ -0,0 +1 @@
+help: Disable IPv4 next-hop static route
diff --git a/templates/protocols/static/table/node.tag/route/node.tag/next-hop/node.tag/distance/node.def b/templates/protocols/static/table/node.tag/route/node.tag/next-hop/node.tag/distance/node.def
new file mode 100644
index 00000000..61abcc65
--- /dev/null
+++ b/templates/protocols/static/table/node.tag/route/node.tag/next-hop/node.tag/distance/node.def
@@ -0,0 +1,4 @@
+type: u32
+help: Distance value for this route
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 255; "Must be between (1-255)"
+val_help: u32:1-255; Distance for this route