summaryrefslogtreecommitdiff
path: root/templates/protocols/ospfv3
diff options
context:
space:
mode:
authorOleksandr Mamenko <oleksandr.mamenko@gmail.com>2018-09-18 10:51:15 +0200
committerOleksandr Mamenko <oleksandr.mamenko@gmail.com>2018-09-18 11:41:55 +0200
commitce205e56fb2fff9bffa62a123717c5f49fc6ac8f (patch)
treef5063acf3d30bd75204f51e8769a22024fde1cd7 /templates/protocols/ospfv3
parent4e9a68f47bbf507f4d74ee08bc445f8162f40a4c (diff)
downloadvyatta-cfg-quagga-ce205e56fb2fff9bffa62a123717c5f49fc6ac8f.tar.gz
vyatta-cfg-quagga-ce205e56fb2fff9bffa62a123717c5f49fc6ac8f.zip
T851: add an option for OSPFv3 administrative distance
Diffstat (limited to 'templates/protocols/ospfv3')
-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; "