summaryrefslogtreecommitdiff
path: root/templates/protocols/ospf/redistribute/isis
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-02-23 23:50:43 +0100
committerGitHub <noreply@github.com>2021-02-23 23:50:43 +0100
commit0d793e74cd8f31e288130417e7c325628c15b18f (patch)
tree91b72b9b1fa18cbc22d346021414c14c5acaf8cc /templates/protocols/ospf/redistribute/isis
parentfda7164c488082fe037da26823eea5f1634bd117 (diff)
parentd3578739d67dff813c8eccc1428bd40b96ed8340 (diff)
downloadvyatta-cfg-quagga-0d793e74cd8f31e288130417e7c325628c15b18f.tar.gz
vyatta-cfg-quagga-0d793e74cd8f31e288130417e7c325628c15b18f.zip
Merge pull request #70 from sever-sever/T3211_13
routing: T3211: Add redistribute protocol IS-IS to bgp ospf
Diffstat (limited to 'templates/protocols/ospf/redistribute/isis')
-rw-r--r--templates/protocols/ospf/redistribute/isis/metric-type/node.def5
-rw-r--r--templates/protocols/ospf/redistribute/isis/metric/node.def4
-rw-r--r--templates/protocols/ospf/redistribute/isis/node.def21
-rw-r--r--templates/protocols/ospf/redistribute/isis/route-map/node.def3
4 files changed, 33 insertions, 0 deletions
diff --git a/templates/protocols/ospf/redistribute/isis/metric-type/node.def b/templates/protocols/ospf/redistribute/isis/metric-type/node.def
new file mode 100644
index 00000000..e49f528c
--- /dev/null
+++ b/templates/protocols/ospf/redistribute/isis/metric-type/node.def
@@ -0,0 +1,5 @@
+type: u32
+help: OSPF metric type
+default: 2
+syntax:expression: $VAR(@) in 1, 2 ; "metric-type must be either 1 or 2"
+val_help: u32:1-2; Metric type (default 2)
diff --git a/templates/protocols/ospf/redistribute/isis/metric/node.def b/templates/protocols/ospf/redistribute/isis/metric/node.def
new file mode 100644
index 00000000..58fd80d7
--- /dev/null
+++ b/templates/protocols/ospf/redistribute/isis/metric/node.def
@@ -0,0 +1,4 @@
+type: u32
+help: Metric for redistributed routes
+syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 16777214; "metric must be between 0 and 16777214"
+val_help: u32:0-16777214; Metric for redistributed routes
diff --git a/templates/protocols/ospf/redistribute/isis/node.def b/templates/protocols/ospf/redistribute/isis/node.def
new file mode 100644
index 00000000..1eaaa0de
--- /dev/null
+++ b/templates/protocols/ospf/redistribute/isis/node.def
@@ -0,0 +1,21 @@
+help: Redistribute IS-IS routes
+delete:expression: "touch /tmp/ospf-redist-isis.$PPID"
+end: vtysh -c "configure terminal" \
+ -c "router ospf" \
+ -c "no redistribute isis";
+ if [ -f "/tmp/ospf-redist-isis.$PPID" ]; then
+ rm -f /tmp/ospf-redist-isis.$PPID;
+ else
+ if [ -n "$VAR(./metric/@)" ]; then
+ COND="metric $VAR(./metric/@)";
+ fi;
+ if [ -n "$VAR(./metric-type/@)" ]; then
+ COND="$COND metric-type $VAR(./metric-type/@)";
+ fi;
+ if [ -n "$VAR(./route-map/@)" ]; then
+ COND="$COND route-map $VAR(./route-map/@)";
+ fi;
+ vtysh -c "configure terminal" \
+ -c "router ospf" \
+ -c "redistribute isis $COND";
+ fi;
diff --git a/templates/protocols/ospf/redistribute/isis/route-map/node.def b/templates/protocols/ospf/redistribute/isis/route-map/node.def
new file mode 100644
index 00000000..f2c6f7c2
--- /dev/null
+++ b/templates/protocols/ospf/redistribute/isis/route-map/node.def
@@ -0,0 +1,3 @@
+type: txt
+help: Route map reference
+commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"route-map $VAR(@) doesn't exist"