summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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(@)"