diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-02-07 18:40:49 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-02-07 18:40:49 +0100 |
commit | f2b233e26ebb8c9755cd80625e8463025bfefbd7 (patch) | |
tree | 88d7e49b9caa206103b0e92502f4d72337e6eb37 /interface-definitions | |
parent | e7d5f996e1ecca228bc67def2b19a0790d8c7370 (diff) | |
download | vyos-1x-f2b233e26ebb8c9755cd80625e8463025bfefbd7.tar.gz vyos-1x-f2b233e26ebb8c9755cd80625e8463025bfefbd7.zip |
ospf: T3267: add proper CLI constraints
Diffstat (limited to 'interface-definitions')
-rw-r--r-- | interface-definitions/include/ospf-authentication.xml.i | 11 |
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> |