From ea7bb52603153af6c2ba000062c429490d60cd19 Mon Sep 17 00:00:00 2001 From: bbs2web Date: Mon, 20 Jan 2020 16:33:32 +0200 Subject: T1974 - Allow route-map rule to set administrative distance. Signed-off-by: bbs2web Signed-off-by: Daniil Baturin --- .../route-map/node.tag/rule/node.tag/set/distance/node.def | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 templates/policy/route-map/node.tag/rule/node.tag/set/distance/node.def 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 " -- cgit v1.2.3