summaryrefslogtreecommitdiff
path: root/templates/policy
diff options
context:
space:
mode:
authorbbs2web <bbs2web@hotmail.com>2020-01-20 16:26:11 +0200
committerDaniil Baturin <daniil@baturin.org>2020-01-22 14:59:14 +0100
commit3f12791b81f498d042ddc37d2da8677742161d06 (patch)
treec61116900079aa4ecd08abb12e9a297747407e00 /templates/policy
parent22ddda002e0438ded11538a508137f2ff1e78de9 (diff)
downloadvyatta-cfg-quagga-3f12791b81f498d042ddc37d2da8677742161d06.tar.gz
vyatta-cfg-quagga-3f12791b81f498d042ddc37d2da8677742161d06.zip
T1973 - Allow route-map rule to match prefix's BGP local preference.
Signed-off-by: bbs2web <bbs2web@hotmail.com>
Diffstat (limited to 'templates/policy')
-rw-r--r--templates/policy/route-map/node.tag/rule/node.tag/match/local-preference/node.def14
1 files changed, 14 insertions, 0 deletions
diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/local-preference/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/local-preference/node.def
new file mode 100644
index 00000000..b5500b06
--- /dev/null
+++ b/templates/policy/route-map/node.tag/rule/node.tag/match/local-preference/node.def
@@ -0,0 +1,14 @@
+type: u32
+help: BGP local-preference to match
+val_help: u32:0-4294967295; Local Preference
+
+syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 4294967295; "metric must be between 0 and 4294967295"
+commit:expression: $VAR(../../action/) != ""; "you must specify an action"
+
+update: vtysh -c "configure terminal" \
+ -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \
+ -c "match local-preference $VAR(@)"
+
+delete: vtysh -c "configure terminal" \
+ -c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \
+ -c "no match local-preference $VAR(@)"