summaryrefslogtreecommitdiff
path: root/templates/protocols/ospfv3/redistribute
diff options
context:
space:
mode:
Diffstat (limited to 'templates/protocols/ospfv3/redistribute')
-rw-r--r--templates/protocols/ospfv3/redistribute/bgp/node.def13
-rw-r--r--templates/protocols/ospfv3/redistribute/bgp/route-map/node.def4
-rw-r--r--templates/protocols/ospfv3/redistribute/connected/node.def13
-rw-r--r--templates/protocols/ospfv3/redistribute/connected/route-map/node.def3
-rw-r--r--templates/protocols/ospfv3/redistribute/kernel/node.def13
-rw-r--r--templates/protocols/ospfv3/redistribute/kernel/route-map/node.def3
-rw-r--r--templates/protocols/ospfv3/redistribute/node.def11
-rw-r--r--templates/protocols/ospfv3/redistribute/ripng/node.def13
-rw-r--r--templates/protocols/ospfv3/redistribute/ripng/route-map/node.def3
-rw-r--r--templates/protocols/ospfv3/redistribute/static/node.def13
-rw-r--r--templates/protocols/ospfv3/redistribute/static/route-map/node.def3
11 files changed, 82 insertions, 10 deletions
diff --git a/templates/protocols/ospfv3/redistribute/bgp/node.def b/templates/protocols/ospfv3/redistribute/bgp/node.def
new file mode 100644
index 00000000..72ea520e
--- /dev/null
+++ b/templates/protocols/ospfv3/redistribute/bgp/node.def
@@ -0,0 +1,13 @@
+help: Set to 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/bgp/route-map/node.def b/templates/protocols/ospfv3/redistribute/bgp/route-map/node.def
new file mode 100644
index 00000000..cf70580f
--- /dev/null
+++ b/templates/protocols/ospfv3/redistribute/bgp/route-map/node.def
@@ -0,0 +1,4 @@
+type: txt
+help: Set route map reference
+commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"route-map $VAR(@) doesn't exist"
+
diff --git a/templates/protocols/ospfv3/redistribute/connected/node.def b/templates/protocols/ospfv3/redistribute/connected/node.def
new file mode 100644
index 00000000..ee7cd585
--- /dev/null
+++ b/templates/protocols/ospfv3/redistribute/connected/node.def
@@ -0,0 +1,13 @@
+help: Set to 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/connected/route-map/node.def b/templates/protocols/ospfv3/redistribute/connected/route-map/node.def
new file mode 100644
index 00000000..3f570311
--- /dev/null
+++ b/templates/protocols/ospfv3/redistribute/connected/route-map/node.def
@@ -0,0 +1,3 @@
+type: txt
+help: Set route map reference
+commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"route-map $VAR(@) doesn't exist"
diff --git a/templates/protocols/ospfv3/redistribute/kernel/node.def b/templates/protocols/ospfv3/redistribute/kernel/node.def
new file mode 100644
index 00000000..f61cb564
--- /dev/null
+++ b/templates/protocols/ospfv3/redistribute/kernel/node.def
@@ -0,0 +1,13 @@
+help: Set to 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/kernel/route-map/node.def b/templates/protocols/ospfv3/redistribute/kernel/route-map/node.def
new file mode 100644
index 00000000..3f570311
--- /dev/null
+++ b/templates/protocols/ospfv3/redistribute/kernel/route-map/node.def
@@ -0,0 +1,3 @@
+type: txt
+help: Set route map reference
+commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"route-map $VAR(@) doesn't exist"
diff --git a/templates/protocols/ospfv3/redistribute/node.def b/templates/protocols/ospfv3/redistribute/node.def
index c33bd557..0f60ac58 100644
--- a/templates/protocols/ospfv3/redistribute/node.def
+++ b/templates/protocols/ospfv3/redistribute/node.def
@@ -1,10 +1 @@
-multi:
-type: txt
-help: Set route type to redistribute
-allowed: echo "static kernel connected ripng bgp"
-create:expression: "vtysh -c \"configure terminal\" \
- -c \"router ospf6 \" \
- -c \"redistribute $VAR(@) \"; "
-delete:expression: "vtysh -c \"configure terminal\" \
- -c \"router ospf6 \" \
- -c \"no redistribute $VAR(@) \"; "
+help: Set to redistribute information from another routing protocol
diff --git a/templates/protocols/ospfv3/redistribute/ripng/node.def b/templates/protocols/ospfv3/redistribute/ripng/node.def
new file mode 100644
index 00000000..6732c9da
--- /dev/null
+++ b/templates/protocols/ospfv3/redistribute/ripng/node.def
@@ -0,0 +1,13 @@
+help: Set to 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/ripng/route-map/node.def b/templates/protocols/ospfv3/redistribute/ripng/route-map/node.def
new file mode 100644
index 00000000..3f570311
--- /dev/null
+++ b/templates/protocols/ospfv3/redistribute/ripng/route-map/node.def
@@ -0,0 +1,3 @@
+type: txt
+help: Set route map reference
+commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"route-map $VAR(@) doesn't exist"
diff --git a/templates/protocols/ospfv3/redistribute/static/node.def b/templates/protocols/ospfv3/redistribute/static/node.def
new file mode 100644
index 00000000..df31b1b1
--- /dev/null
+++ b/templates/protocols/ospfv3/redistribute/static/node.def
@@ -0,0 +1,13 @@
+help: Set to 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;
diff --git a/templates/protocols/ospfv3/redistribute/static/route-map/node.def b/templates/protocols/ospfv3/redistribute/static/route-map/node.def
new file mode 100644
index 00000000..3f570311
--- /dev/null
+++ b/templates/protocols/ospfv3/redistribute/static/route-map/node.def
@@ -0,0 +1,3 @@
+type: txt
+help: Set route map reference
+commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"route-map $VAR(@) doesn't exist"