summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2011-01-04 14:08:16 -0800
committerStig Thormodsrud <stig@vyatta.com>2011-01-04 14:08:16 -0800
commit871890ad5952cd7f099f531453d8abe0b2f89ffc (patch)
treeaa27ce83b94b5c0b9d29c57bd2f121d3926c124b /templates
parente5c6ff1660cb07e8b0f51ef18f5efa4da14e18e9 (diff)
downloadvyatta-cfg-quagga-871890ad5952cd7f099f531453d8abe0b2f89ffc.tar.gz
vyatta-cfg-quagga-871890ad5952cd7f099f531453d8abe0b2f89ffc.zip
Revert "OSPFv3 templates replaced to correspond new backend"
This reverts commit d1bc0854513d794245bb53f4aa785abd4d70341f.
Diffstat (limited to 'templates')
-rw-r--r--templates/protocols/ospfv3/area/node.def3
-rw-r--r--templates/protocols/ospfv3/area/node.tag/.filter-list/node.tag/node.def6
-rw-r--r--templates/protocols/ospfv3/area/node.tag/export-list/node.def6
-rw-r--r--templates/protocols/ospfv3/area/node.tag/import-list/node.def6
-rw-r--r--templates/protocols/ospfv3/area/node.tag/interface/node.def6
-rw-r--r--templates/protocols/ospfv3/area/node.tag/range/node.def16
-rw-r--r--templates/protocols/ospfv3/area/node.tag/range/node.tag/advertise/node.def7
-rw-r--r--templates/protocols/ospfv3/area/node.tag/range/node.tag/not-advertise/node.def6
-rw-r--r--templates/protocols/ospfv3/node.def3
-rw-r--r--templates/protocols/ospfv3/parameters/router-id/node.def3
-rw-r--r--templates/protocols/ospfv3/redistribute/bgp/node.def12
-rw-r--r--templates/protocols/ospfv3/redistribute/connected/node.def12
-rw-r--r--templates/protocols/ospfv3/redistribute/kernel/node.def11
-rw-r--r--templates/protocols/ospfv3/redistribute/ripng/node.def12
-rw-r--r--templates/protocols/ospfv3/redistribute/static/node.def12
15 files changed, 118 insertions, 3 deletions
diff --git a/templates/protocols/ospfv3/area/node.def b/templates/protocols/ospfv3/area/node.def
index f3824397..73750abb 100644
--- a/templates/protocols/ospfv3/area/node.def
+++ b/templates/protocols/ospfv3/area/node.def
@@ -1,5 +1,6 @@
tag:
type: txt
help: OSPFv3 Area
-syntax:expression: exec "/opt/vyatta/sbin/vyatta-ospfv3.pl --check-area --area=$VAR(@)"
+syntax:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --check-ospf-area $VAR(@)"; "Invalid OSFPv3 area \"$VAR(@)\" "
+val_help: u32; OSPFv3 area in decimal notation
val_help: ipv4; OSPFv3 area in dotted decimal notation
diff --git a/templates/protocols/ospfv3/area/node.tag/.filter-list/node.tag/node.def b/templates/protocols/ospfv3/area/node.tag/.filter-list/node.tag/node.def
index 5fa7a60c..6bcaaf77 100644
--- a/templates/protocols/ospfv3/area/node.tag/.filter-list/node.tag/node.def
+++ b/templates/protocols/ospfv3/area/node.tag/.filter-list/node.tag/node.def
@@ -2,3 +2,9 @@ tag:
type: txt
help: Direction of filter (in|out)
allowed: echo "in out"
+create:expression: "vtysh -c \"configure terminal\" \
+ -c \"router ospf6 \" \
+ -c \"area $VAR(../../@) filter-list $VAR(../@) $VAR(@) \"; "
+delete:expression: "vtysh -c \"configure terminal\" \
+ -c \"router ospf6 \" \
+ -c \"no area $VAR(../../@) filter-list $VAR(../@) $VAR(@) \"; "
diff --git a/templates/protocols/ospfv3/area/node.tag/export-list/node.def b/templates/protocols/ospfv3/area/node.tag/export-list/node.def
index 4e603e7d..a27ca264 100644
--- a/templates/protocols/ospfv3/area/node.tag/export-list/node.def
+++ b/templates/protocols/ospfv3/area/node.tag/export-list/node.def
@@ -1,2 +1,8 @@
type: txt
help: Name of export-list
+create:expression: "vtysh -c \"configure terminal\" \
+ -c \"router ospf6 \" \
+ -c \"area $VAR(../@) export-list $VAR(@) \"; "
+delete:expression: "vtysh -c \"configure terminal\" \
+ -c \"router ospf6 \" \
+ -c \"no area $VAR(../@) export-list $VAR(@) \"; "
diff --git a/templates/protocols/ospfv3/area/node.tag/import-list/node.def b/templates/protocols/ospfv3/area/node.tag/import-list/node.def
index 43feacca..cc689ab2 100644
--- a/templates/protocols/ospfv3/area/node.tag/import-list/node.def
+++ b/templates/protocols/ospfv3/area/node.tag/import-list/node.def
@@ -1,2 +1,8 @@
type: txt
help: Name of import-list
+create:expression: "vtysh -c \"configure terminal\" \
+ -c \"router ospf6 \" \
+ -c \"area $VAR(../@) import-list $VAR(@) \"; "
+delete:expression: "vtysh -c \"configure terminal\" \
+ -c \"router ospf6 \" \
+ -c \"no area $VAR(../@) import-list $VAR(@) \"; "
diff --git a/templates/protocols/ospfv3/area/node.tag/interface/node.def b/templates/protocols/ospfv3/area/node.tag/interface/node.def
index 9263778c..046b78d6 100644
--- a/templates/protocols/ospfv3/area/node.tag/interface/node.def
+++ b/templates/protocols/ospfv3/area/node.tag/interface/node.def
@@ -2,4 +2,10 @@ multi:
type: txt
help: OSPFv3 area interface
+create: vtysh -c "configure terminal" -c "router ospf6" \
+ -c "interface $VAR(@) area $VAR(../@)"
+
+delete: vtysh -c "configure terminal" -c "router ospf6" \
+ -c "no interface $VAR(@) area $VAR(../@)"
+
allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show all
diff --git a/templates/protocols/ospfv3/area/node.tag/range/node.def b/templates/protocols/ospfv3/area/node.tag/range/node.def
index 6249e511..4b594cd9 100644
--- a/templates/protocols/ospfv3/area/node.tag/range/node.def
+++ b/templates/protocols/ospfv3/area/node.tag/range/node.def
@@ -2,3 +2,19 @@ tag:
type: ipv6net
help: Specify IPv6 prefix (border routers only)
syntax:expression: exec "${vyatta_sbindir}/check_prefix_boundary $VAR(@)"
+
+delete: touch /tmp/ospf6-range.$PPID
+
+end: if [ -f /tmp/ospf6-range.$PPID ]; then
+ vtysh -c "configure terminal" \
+ -c "router ospf6" \
+ -c "no area $VAR(../@) range $VAR(@)";
+ rm /tmp/ospf6-range.$PPID;
+ else
+ vtysh --noerror -c "configure terminal" \
+ -c "router ospf6" \
+ -c "no area $VAR(../@) range $VAR(@)";
+ vtysh -c "configure terminal" \
+ -c "router ospf6" \
+ -c "area $VAR(../@) range $VAR(@)";
+ fi;
diff --git a/templates/protocols/ospfv3/area/node.tag/range/node.tag/advertise/node.def b/templates/protocols/ospfv3/area/node.tag/range/node.tag/advertise/node.def
index 29e0d619..81be1db0 100644
--- a/templates/protocols/ospfv3/area/node.tag/range/node.tag/advertise/node.def
+++ b/templates/protocols/ospfv3/area/node.tag/range/node.tag/advertise/node.def
@@ -1,2 +1,7 @@
help: Advertise this range
-
+create:expression: "vtysh -c \"configure terminal\" \
+ -c \"router ospf6\" \
+ -c \"area $VAR(../../@) range $VAR(../@) advertise\"; "
+delete:expression: "vtysh -c \"configure terminal\" \
+ -c \"router ospf6\" \
+ -c \"no area $VAR(../../@) range $VAR(../@) advertise\"; "
diff --git a/templates/protocols/ospfv3/area/node.tag/range/node.tag/not-advertise/node.def b/templates/protocols/ospfv3/area/node.tag/range/node.tag/not-advertise/node.def
index bb524e98..d0a74ecd 100644
--- a/templates/protocols/ospfv3/area/node.tag/range/node.tag/not-advertise/node.def
+++ b/templates/protocols/ospfv3/area/node.tag/range/node.tag/not-advertise/node.def
@@ -1 +1,7 @@
help: Do not advertise this range
+create:expression: "vtysh -c \"configure terminal\" \
+ -c \"router ospf6\" \
+ -c \"area $VAR(../../@) range $VAR(../@) not-advertise\"; "
+delete:expression: "vtysh -c \"configure terminal\" \
+ -c \"router ospf6\" \
+ -c \"no area $VAR(../../@) range $VAR(../@) not-advertise\"; "
diff --git a/templates/protocols/ospfv3/node.def b/templates/protocols/ospfv3/node.def
index 0776b936..72e1886f 100644
--- a/templates/protocols/ospfv3/node.def
+++ b/templates/protocols/ospfv3/node.def
@@ -1,3 +1,4 @@
priority: 640
help: IPv6 Open Shortest Path First protocol (OSPFv3) parameters
-end: ${vyatta_sbindir}/vyatta-ospfv3.pl --main
+create: vtysh -c "configure terminal" -c "router ospf6"
+delete: vtysh -c "configure terminal" -c "no router ospf6"
diff --git a/templates/protocols/ospfv3/parameters/router-id/node.def b/templates/protocols/ospfv3/parameters/router-id/node.def
index 659cccf1..f0a02436 100644
--- a/templates/protocols/ospfv3/parameters/router-id/node.def
+++ b/templates/protocols/ospfv3/parameters/router-id/node.def
@@ -1,2 +1,5 @@
type: ipv4
help: Router identifier
+update:expression: "vtysh -c \"configure terminal\" \
+ -c \"router ospf6\" \
+ -c \"router-id $VAR(@)\" "
diff --git a/templates/protocols/ospfv3/redistribute/bgp/node.def b/templates/protocols/ospfv3/redistribute/bgp/node.def
index c18804bc..3541a9a4 100644
--- a/templates/protocols/ospfv3/redistribute/bgp/node.def
+++ b/templates/protocols/ospfv3/redistribute/bgp/node.def
@@ -1 +1,13 @@
help: Redistribute bgp routes
+
+end: vtysh -c "configure terminal" \
+ -c "router ospf6" \
+ -c "no redistribute bgp";
+ if [ "$COMMIT_ACTION" = "SET" -o "$COMMIT_ACTION" = "ACTIVE" ]; then
+ if [ -n "$VAR(./route-map/@)" ]; then
+ COND="route-map $VAR(./route-map/@)";
+ fi;
+ vtysh -c "configure terminal" \
+ -c "router ospf6" \
+ -c "redistribute bgp $COND";
+ fi;
diff --git a/templates/protocols/ospfv3/redistribute/connected/node.def b/templates/protocols/ospfv3/redistribute/connected/node.def
index 37a8bd6b..d9b43cb0 100644
--- a/templates/protocols/ospfv3/redistribute/connected/node.def
+++ b/templates/protocols/ospfv3/redistribute/connected/node.def
@@ -1 +1,13 @@
help: Redistribute connected routes
+
+end: vtysh -c "configure terminal" \
+ -c "router ospf6" \
+ -c "no redistribute connected";
+ if [ "$COMMIT_ACTION" = "SET" -o "$COMMIT_ACTION" = "ACTIVE" ]; then
+ if [ -n "$VAR(./route-map/@)" ]; then
+ COND="route-map $VAR(./route-map/@)";
+ fi;
+ vtysh -c "configure terminal" \
+ -c "router ospf6" \
+ -c "redistribute connected $COND";
+ fi;
diff --git a/templates/protocols/ospfv3/redistribute/kernel/node.def b/templates/protocols/ospfv3/redistribute/kernel/node.def
index 316ca3b8..78fe7d36 100644
--- a/templates/protocols/ospfv3/redistribute/kernel/node.def
+++ b/templates/protocols/ospfv3/redistribute/kernel/node.def
@@ -1,2 +1,13 @@
help: Redistribute kernel routes
+end: vtysh -c "configure terminal" \
+ -c "router ospf6" \
+ -c "no redistribute kernel";
+ if [ "$COMMIT_ACTION" = "SET" -o "$COMMIT_ACTION" = "ACTIVE" ]; then
+ if [ -n "$VAR(./route-map/@)" ]; then
+ COND="route-map $VAR(./route-map/@)";
+ fi;
+ vtysh -c "configure terminal" \
+ -c "router ospf6" \
+ -c "redistribute kernel $COND";
+ fi;
diff --git a/templates/protocols/ospfv3/redistribute/ripng/node.def b/templates/protocols/ospfv3/redistribute/ripng/node.def
index 0aba8758..f418999a 100644
--- a/templates/protocols/ospfv3/redistribute/ripng/node.def
+++ b/templates/protocols/ospfv3/redistribute/ripng/node.def
@@ -1 +1,13 @@
help: Redistribute RIPNG routes
+
+end: vtysh -c "configure terminal" \
+ -c "router ospf6" \
+ -c "no redistribute ripng";
+ if [ "$COMMIT_ACTION" = "SET" -o "$COMMIT_ACTION" = "ACTIVE" ]; then
+ if [ -n "$VAR(./route-map/@)" ]; then
+ COND="route-map $VAR(./route-map/@)";
+ fi;
+ vtysh -c "configure terminal" \
+ -c "router ospf6" \
+ -c "redistribute ripng $COND";
+ fi;
diff --git a/templates/protocols/ospfv3/redistribute/static/node.def b/templates/protocols/ospfv3/redistribute/static/node.def
index fd4c7b04..d82d5f05 100644
--- a/templates/protocols/ospfv3/redistribute/static/node.def
+++ b/templates/protocols/ospfv3/redistribute/static/node.def
@@ -1 +1,13 @@
help: Redistribute static routes
+
+end: vtysh -c "configure terminal" \
+ -c "router ospf6" \
+ -c "no redistribute static";
+ if [ "$COMMIT_ACTION" = "SET" -o "$COMMIT_ACTION" = "ACTIVE" ]; then
+ if [ -n "$VAR(./route-map/@)" ]; then
+ COND="route-map $VAR(./route-map/@)";
+ fi;
+ vtysh -c "configure terminal" \
+ -c "router ospf6" \
+ -c "redistribute static $COND";
+ fi;