summaryrefslogtreecommitdiff
path: root/interface-definitions/include
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-02-07 18:40:49 +0100
committerChristian Poessinger <christian@poessinger.com>2021-02-07 18:40:49 +0100
commitf2b233e26ebb8c9755cd80625e8463025bfefbd7 (patch)
tree88d7e49b9caa206103b0e92502f4d72337e6eb37 /interface-definitions/include
parente7d5f996e1ecca228bc67def2b19a0790d8c7370 (diff)
downloadvyos-1x-f2b233e26ebb8c9755cd80625e8463025bfefbd7.tar.gz
vyos-1x-f2b233e26ebb8c9755cd80625e8463025bfefbd7.zip
ospf: T3267: add proper CLI constraints
Diffstat (limited to 'interface-definitions/include')
-rw-r--r--interface-definitions/include/ospf-authentication.xml.i11
1 files changed, 11 insertions, 0 deletions
diff --git a/interface-definitions/include/ospf-authentication.xml.i b/interface-definitions/include/ospf-authentication.xml.i
index 0963e5cc0..efb29c1f0 100644
--- a/interface-definitions/include/ospf-authentication.xml.i
+++ b/interface-definitions/include/ospf-authentication.xml.i
@@ -16,6 +16,9 @@
<format>u32:1-255</format>
<description>MD5 key id</description>
</valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-255"/>
+ </constraint>
</properties>
<children>
<leafNode name="md5-key">
@@ -25,6 +28,10 @@
<format>txt</format>
<description>MD5 Key (16 characters or less)</description>
</valueHelp>
+ <constraint>
+ <regex>^[^[:space:]]{1,16}$</regex>
+ </constraint>
+ <constraintErrorMessage>Password must be 16 characters or less</constraintErrorMessage>
</properties>
</leafNode>
</children>
@@ -38,6 +45,10 @@
<format>txt</format>
<description>Plain text password (8 characters or less)</description>
</valueHelp>
+ <constraint>
+ <regex>^[^[:space:]]{1,8}$</regex>
+ </constraint>
+ <constraintErrorMessage>Password must be 8 characters or less</constraintErrorMessage>
</properties>
</leafNode>
</children>