summaryrefslogtreecommitdiff
path: root/templates/protocols/ospfv3
diff options
context:
space:
mode:
Diffstat (limited to 'templates/protocols/ospfv3')
-rw-r--r--templates/protocols/ospfv3/node.def15
-rw-r--r--templates/protocols/ospfv3/parameters/node.def1
-rw-r--r--templates/protocols/ospfv3/parameters/router-id/node.def3
3 files changed, 13 insertions, 6 deletions
diff --git a/templates/protocols/ospfv3/node.def b/templates/protocols/ospfv3/node.def
index 72e1886f..56655199 100644
--- a/templates/protocols/ospfv3/node.def
+++ b/templates/protocols/ospfv3/node.def
@@ -1,4 +1,15 @@
priority: 640
help: IPv6 Open Shortest Path First protocol (OSPFv3) parameters
-create: vtysh -c "configure terminal" -c "router ospf6"
-delete: vtysh -c "configure terminal" -c "no router ospf6"
+begin: if [ "$COMMIT_ACTION" != DELETE ]; then
+ if [ -n "$VAR(parameters/router-id/@)" ]; then
+ vtysh -c "configure terminal" -c "router ospf6" \
+ -c "router-id $VAR(parameters/router-id/@)"
+ else
+ vtysh -c "configure terminal" -c "router ospf6" \
+ -c "no router-id"
+ fi
+ fi
+end: if [ "$COMMIT_ACTION" == DELETE ]; then
+ vtysh -c "configure terminal" -c "router ospf6" -c "no router-id"
+ vtysh -c "configure terminal" -c "no router ospf6"
+ fi
diff --git a/templates/protocols/ospfv3/parameters/node.def b/templates/protocols/ospfv3/parameters/node.def
index 8f16d09d..11fda8f8 100644
--- a/templates/protocols/ospfv3/parameters/node.def
+++ b/templates/protocols/ospfv3/parameters/node.def
@@ -1,2 +1 @@
-priority: 630
help: OSPFv3 specific parameters
diff --git a/templates/protocols/ospfv3/parameters/router-id/node.def b/templates/protocols/ospfv3/parameters/router-id/node.def
index f0a02436..659cccf1 100644
--- a/templates/protocols/ospfv3/parameters/router-id/node.def
+++ b/templates/protocols/ospfv3/parameters/router-id/node.def
@@ -1,5 +1,2 @@
type: ipv4
help: Router identifier
-update:expression: "vtysh -c \"configure terminal\" \
- -c \"router ospf6\" \
- -c \"router-id $VAR(@)\" "