summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-04-08 17:16:22 +0200
committerChristian Poessinger <christian@poessinger.com>2021-04-08 20:13:43 +0200
commit9560d26a8fb726ab100e7978a64942291e53a731 (patch)
treeb000b8cd546be2a11fae8aac0b1ac1b7ab580b83
parentee44b9ba6ed7b28f0ae05e65d193ccd95a3a3fe5 (diff)
downloadvyos-1x-9560d26a8fb726ab100e7978a64942291e53a731.tar.gz
vyos-1x-9560d26a8fb726ab100e7978a64942291e53a731.zip
xml: route-map: add missing constraints
Port over the regex used in the old node.def code-base and make this limitation also live on the new CLI interface.
-rw-r--r--interface-definitions/include/route-map.xml.i14
1 files changed, 9 insertions, 5 deletions
diff --git a/interface-definitions/include/route-map.xml.i b/interface-definitions/include/route-map.xml.i
index 5a1c137b9..edbe76892 100644
--- a/interface-definitions/include/route-map.xml.i
+++ b/interface-definitions/include/route-map.xml.i
@@ -1,14 +1,18 @@
<!-- include start from route-map.xml.i -->
<leafNode name="route-map">
<properties>
- <help>Route map reference</help>
- <valueHelp>
- <format>txt</format>
- <description>Route map reference</description>
- </valueHelp>
+ <help>Specify route-map name to use</help>
<completionHelp>
<path>policy route-map</path>
</completionHelp>
+ <valueHelp>
+ <format>txt</format>
+ <description>Route map name</description>
+ </valueHelp>
+ <constraint>
+ <regex>^[-a-zA-Z0-9.]+$</regex>
+ </constraint>
+ <constraintErrorMessage>Route-map name can only contain alpha-numeric letters and a hyphen</constraintErrorMessage>
</properties>
</leafNode>
<!-- include end -->