summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--templates/protocols/ospfv3/distance/global/node.def13
-rw-r--r--templates/protocols/ospfv3/distance/node.def1
-rw-r--r--templates/protocols/ospfv3/distance/ospfv3/external/node.def4
-rw-r--r--templates/protocols/ospfv3/distance/ospfv3/inter-area/node.def4
-rw-r--r--templates/protocols/ospfv3/distance/ospfv3/intra-area/node.def4
-rw-r--r--templates/protocols/ospfv3/distance/ospfv3/node.def22
6 files changed, 48 insertions, 0 deletions
diff --git a/templates/protocols/ospfv3/distance/global/node.def b/templates/protocols/ospfv3/distance/global/node.def
new file mode 100644
index 00000000..cc44d9cc
--- /dev/null
+++ b/templates/protocols/ospfv3/distance/global/node.def
@@ -0,0 +1,13 @@
+type: u32
+help: OSPFv3 administrative distance
+val_help: u32:1-255; Administrative distance
+
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 255; "Must be between 1-255"
+
+update:expression: "vtysh -c \"configure terminal\" \
+ -c \"router ospf6\" \
+ -c \"distance $VAR(@) \"; "
+
+delete:expression: "vtysh -c \"configure terminal\" \
+ -c \"router ospf6\" \
+ -c \"no distance $VAR(@) \"; "
diff --git a/templates/protocols/ospfv3/distance/node.def b/templates/protocols/ospfv3/distance/node.def
new file mode 100644
index 00000000..97a8c1c4
--- /dev/null
+++ b/templates/protocols/ospfv3/distance/node.def
@@ -0,0 +1 @@
+help: Administrative distance
diff --git a/templates/protocols/ospfv3/distance/ospfv3/external/node.def b/templates/protocols/ospfv3/distance/ospfv3/external/node.def
new file mode 100644
index 00000000..32ba607e
--- /dev/null
+++ b/templates/protocols/ospfv3/distance/ospfv3/external/node.def
@@ -0,0 +1,4 @@
+type: u32
+help: Distance for external routes
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 255; "Must be between 1-255"
+val_help: u32: 1-255; Distance for external routes
diff --git a/templates/protocols/ospfv3/distance/ospfv3/inter-area/node.def b/templates/protocols/ospfv3/distance/ospfv3/inter-area/node.def
new file mode 100644
index 00000000..496a4cf6
--- /dev/null
+++ b/templates/protocols/ospfv3/distance/ospfv3/inter-area/node.def
@@ -0,0 +1,4 @@
+type: u32
+help: Distance for inter-area routes
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 255; "Must be between 1-255"
+val_help: u32:1-255; Distance for inter-area routes
diff --git a/templates/protocols/ospfv3/distance/ospfv3/intra-area/node.def b/templates/protocols/ospfv3/distance/ospfv3/intra-area/node.def
new file mode 100644
index 00000000..7db14c3b
--- /dev/null
+++ b/templates/protocols/ospfv3/distance/ospfv3/intra-area/node.def
@@ -0,0 +1,4 @@
+type: u32
+help: Distance for intra-area routes
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 255; "Must be between 1-255"
+val_help: u32:1-255; Distance for intra-area routes
diff --git a/templates/protocols/ospfv3/distance/ospfv3/node.def b/templates/protocols/ospfv3/distance/ospfv3/node.def
new file mode 100644
index 00000000..6b7ba9af
--- /dev/null
+++ b/templates/protocols/ospfv3/distance/ospfv3/node.def
@@ -0,0 +1,22 @@
+help: OSPFv3 administrative distance
+delete:expression: "touch /tmp/ospfv3-distance.$PPID"
+end:expression: "\
+ if [ -f \"/tmp/ospf-distance.$PPID\" ]; then \
+ vtysh -c \"configure terminal\" \
+ -c \"router ospf6\" \
+ -c \"no distance ospf6\"; \
+ rm /tmp/ospfv3-distance.$PPID; \
+ else \
+ if [ -n \"$VAR(./intra-area/@)\" ]; then \
+ PARM=\"intra-area $VAR(./intra-area/@)\"; \
+ fi; \
+ if [ -n \"$VAR(./inter-area/@)\" ]; then \
+ PARM=\"$PARM inter-area $VAR(./inter-area/@)\"; \
+ fi; \
+ if [ -n \"$VAR(./external/@)\" ]; then \
+ PARM=\"$PARM external $VAR(./external/@)\"; \
+ fi; \
+ vtysh -c \"configure terminal\" \
+ -c \"router ospf6\" \
+ -c \"no distance ospf6\" -c \"distance ospf $PARM\"; \
+ fi; "