summaryrefslogtreecommitdiff
path: root/templates/protocols/ospfv3/redistribute/bgp
diff options
context:
space:
mode:
Diffstat (limited to 'templates/protocols/ospfv3/redistribute/bgp')
-rw-r--r--templates/protocols/ospfv3/redistribute/bgp/node.def13
-rw-r--r--templates/protocols/ospfv3/redistribute/bgp/route-map/node.def4
2 files changed, 17 insertions, 0 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"
+