summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorsever-sever <v.gletenko@vyos.io>2021-02-23 21:25:54 +0000
committersever-sever <v.gletenko@vyos.io>2021-02-23 21:25:54 +0000
commitd3578739d67dff813c8eccc1428bd40b96ed8340 (patch)
tree91b72b9b1fa18cbc22d346021414c14c5acaf8cc /templates
parentfda7164c488082fe037da26823eea5f1634bd117 (diff)
downloadvyatta-cfg-quagga-d3578739d67dff813c8eccc1428bd40b96ed8340.tar.gz
vyatta-cfg-quagga-d3578739d67dff813c8eccc1428bd40b96ed8340.zip
routing: T3211: Add redistribute protocol IS-IS to bgp ospf
Diffstat (limited to 'templates')
-rw-r--r--templates/protocols/bgp/node.tag/address-family/ipv4-unicast/redistribute/isis/metric/node.def2
-rw-r--r--templates/protocols/bgp/node.tag/address-family/ipv4-unicast/redistribute/isis/node.def1
-rw-r--r--templates/protocols/bgp/node.tag/address-family/ipv4-unicast/redistribute/isis/route-map/node.def6
-rw-r--r--templates/protocols/ospf/access-list/node.tag/export/node.def3
-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
8 files changed, 44 insertions, 1 deletions
diff --git a/templates/protocols/bgp/node.tag/address-family/ipv4-unicast/redistribute/isis/metric/node.def b/templates/protocols/bgp/node.tag/address-family/ipv4-unicast/redistribute/isis/metric/node.def
new file mode 100644
index 00000000..43f1ffff
--- /dev/null
+++ b/templates/protocols/bgp/node.tag/address-family/ipv4-unicast/redistribute/isis/metric/node.def
@@ -0,0 +1,2 @@
+type: u32
+help: Metric for redistributed routes
diff --git a/templates/protocols/bgp/node.tag/address-family/ipv4-unicast/redistribute/isis/node.def b/templates/protocols/bgp/node.tag/address-family/ipv4-unicast/redistribute/isis/node.def
new file mode 100644
index 00000000..de54b77b
--- /dev/null
+++ b/templates/protocols/bgp/node.tag/address-family/ipv4-unicast/redistribute/isis/node.def
@@ -0,0 +1 @@
+help: Redistribute IS-IS routes into BGP
diff --git a/templates/protocols/bgp/node.tag/address-family/ipv4-unicast/redistribute/isis/route-map/node.def b/templates/protocols/bgp/node.tag/address-family/ipv4-unicast/redistribute/isis/route-map/node.def
new file mode 100644
index 00000000..3d61955a
--- /dev/null
+++ b/templates/protocols/bgp/node.tag/address-family/ipv4-unicast/redistribute/isis/route-map/node.def
@@ -0,0 +1,6 @@
+type: txt
+help: Route map to filter redistributed routes
+allowed: local -a params
+ params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map )
+ echo -n ${params[@]##*/}
+commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"route-map $VAR(@) doesn't exist"
diff --git a/templates/protocols/ospf/access-list/node.tag/export/node.def b/templates/protocols/ospf/access-list/node.tag/export/node.def
index 50d2db49..0d8ff44a 100644
--- a/templates/protocols/ospf/access-list/node.tag/export/node.def
+++ b/templates/protocols/ospf/access-list/node.tag/export/node.def
@@ -1,10 +1,11 @@
multi:
type: txt
help: Filter for outgoing routing updates [REQUIRED]
-syntax:expression: $VAR(@) in "bgp", "connected", "kernel", "rip", "static"; "Must be (bgp, connected, kernel, rip, or static)"
+syntax:expression: $VAR(@) in "bgp", "connected", "isis", "kernel", "rip", "static"; "Must be (bgp, connected, isis, kernel, rip, or static)"
val_help: bgp Filter bgp routes;
val_help: connected Filter connected routes;
+val_help: isis Filter IS-IS routes;
val_help: kernel Filter kernel routes;
val_help: rip Filter rip routes;
val_help: static Filter static routes;
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"