summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorbbs2web <bbs2web@hotmail.com>2020-01-20 16:33:32 +0200
committerDaniil Baturin <daniil@baturin.org>2020-01-22 15:00:13 +0100
commitea7bb52603153af6c2ba000062c429490d60cd19 (patch)
tree0188686fb1f2289f905b882d5ff7d3f9e78f1274 /templates
parent3f12791b81f498d042ddc37d2da8677742161d06 (diff)
downloadvyatta-cfg-quagga-ea7bb52603153af6c2ba000062c429490d60cd19.tar.gz
vyatta-cfg-quagga-ea7bb52603153af6c2ba000062c429490d60cd19.zip
T1974 - Allow route-map rule to set administrative distance.
Signed-off-by: bbs2web <bbs2web@hotmail.com> Signed-off-by: Daniil Baturin <daniil@baturin.org>
Diffstat (limited to 'templates')
-rw-r--r--templates/policy/route-map/node.tag/rule/node.tag/set/distance/node.def14
1 files changed, 14 insertions, 0 deletions
diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/distance/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/distance/node.def
new file mode 100644
index 00000000..edf10a4c
--- /dev/null
+++ b/templates/policy/route-map/node.tag/rule/node.tag/set/distance/node.def
@@ -0,0 +1,14 @@
+type: u32
+help: Locally significant administrative distance
+val_help: u32:0-255; Distance value
+
+syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 255; "metric must be between 0 and 255"
+commit:expression: $VAR(../../action/) != ""; "you must specify an action"
+
+update: vtysh -c "configure terminal" \
+ -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \
+ -c "set distance $VAR(@)"
+
+delete: vtysh --noerror -c "configure terminal" \
+ -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \
+ -c "no set distance "