diff options
author | sskaje <sskaje@gmail.com> | 2025-03-11 21:33:46 +0800 |
---|---|---|
committer | sskaje <sskaje@gmail.com> | 2025-03-11 22:14:53 +0800 |
commit | a8e0f015ea91859163ac9befad8a6e8ac68dec9a (patch) | |
tree | 9a951975c3a6f1265d9c973fcb6290adf5dadfd8 /interface-definitions | |
parent | 77b53f1ab2c280f864f56b90dd841d060e2f2b32 (diff) | |
download | vyos-1x-a8e0f015ea91859163ac9befad8a6e8ac68dec9a.tar.gz vyos-1x-a8e0f015ea91859163ac9befad8a6e8ac68dec9a.zip |
T7092: Change validators: regex to host-name|address + port + path
Diffstat (limited to 'interface-definitions')
-rw-r--r-- | interface-definitions/container.xml.in | 46 |
1 files changed, 40 insertions, 6 deletions
diff --git a/interface-definitions/container.xml.in b/interface-definitions/container.xml.in index c8d4bbdd1..a17777af0 100644 --- a/interface-definitions/container.xml.in +++ b/interface-definitions/container.xml.in @@ -544,14 +544,48 @@ <valueless/> </properties> </leafNode> - <leafNode name="mirror"> + <node name="mirror"> <properties> - <help>Registry mirror, use host[:port][/path]</help> - <constraint> - <regex>^(?:[[:alnum:]-]+(?:\.[[:alnum:]-]+)*|(?:[[:digit:]]{1,3}\.){3}[[:digit:]]{1,3}|\[[[:xdigit:]:]+])(?::[[:digit:]]{1,5})?(?:\/[^[:space:]?#]*)?$</regex> - </constraint> + <help>Registry mirror, use host-name|address[:port][/path]</help> </properties> - </leafNode> + <children> + <leafNode name="address"> + <properties> + <help>IP address of container registry mirror</help> + <valueHelp> + <format>ipv4</format> + <description>IPv4 address of container registry mirror</description> + </valueHelp> + <valueHelp> + <format>ipv6</format> + <description>IPv6 address of container registry mirror</description> + </valueHelp> + <constraint> + <validator name="ip-address"/> + <validator name="ipv6-link-local"/> + </constraint> + </properties> + </leafNode> + <leafNode name="host-name"> + <properties> + <help>Hostname of container registry mirror</help> + <valueHelp> + <format>hostname</format> + <description>FQDN of container registry mirror</description> + </valueHelp> + <constraint> + <validator name="fqdn"/> + </constraint> + </properties> + </leafNode> + #include <include/port-number.xml.i> + <leafNode name="path"> + <properties> + <help>Path of container registry mirror, optional, must be start with '/' if not empty</help> + </properties> + </leafNode> + </children> + </node> </children> </tagNode> </children> |