summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbbs2web <bbs2web@hotmail.com>2020-01-20 16:26:11 +0200
committerDaniil Baturin <daniil@vyos.io>2020-07-26 14:27:04 +0300
commit174a705c23d3cd19205a57751cf49be855a3a663 (patch)
tree75e7931d383141fc27b1df9004964abd06ce1571
parent878d8b34eb6af37d0cb9e2776527eb041a88bde2 (diff)
downloadvyatta-cfg-quagga-174a705c23d3cd19205a57751cf49be855a3a663.tar.gz
vyatta-cfg-quagga-174a705c23d3cd19205a57751cf49be855a3a663.zip
T1973 - Allow route-map rule to match prefix's BGP local preference.
Signed-off-by: bbs2web <bbs2web@hotmail.com>
-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(@)"