diff options
author | Christian Breunig <christian@breunig.cc> | 2024-03-24 20:30:33 +0100 |
---|---|---|
committer | Christian Breunig <christian@breunig.cc> | 2024-03-24 20:30:33 +0100 |
commit | 6be463fcca574e051420ae7549bed72e74486470 (patch) | |
tree | d31c2f11e4184b52abe386398f725b5e54814729 | |
parent | afaf715194a922c92f6ff6058abc0e4b9ff570d4 (diff) | |
download | vyos-1x-6be463fcca574e051420ae7549bed72e74486470.tar.gz vyos-1x-6be463fcca574e051420ae7549bed72e74486470.zip |
xml: T5738: use common constraint include for container network
-rw-r--r-- | interface-definitions/container.xml.in | 6 | ||||
-rw-r--r-- | interface-definitions/include/constraint/container-network.xml.i | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/interface-definitions/container.xml.in b/interface-definitions/container.xml.in index f0db8a6f2..d0af0900a 100644 --- a/interface-definitions/container.xml.in +++ b/interface-definitions/container.xml.in @@ -211,6 +211,7 @@ <completionHelp> <path>container network</path> </completionHelp> + #include <include/constraint/container-network.xml.i> </properties> <children> <leafNode name="address"> @@ -426,10 +427,7 @@ <tagNode name="network"> <properties> <help>Network name</help> - <constraint> - <regex>[-_a-zA-Z0-9]{1,11}</regex> - </constraint> - <constraintErrorMessage>Network name cannot be longer than 11 characters</constraintErrorMessage> + #include <include/constraint/container-network.xml.i> </properties> <children> #include <include/generic-description.xml.i> diff --git a/interface-definitions/include/constraint/container-network.xml.i b/interface-definitions/include/constraint/container-network.xml.i new file mode 100644 index 000000000..6f0f06d6f --- /dev/null +++ b/interface-definitions/include/constraint/container-network.xml.i @@ -0,0 +1,6 @@ +<!-- include start from constraint/container-network.xml.i --> +<constraint> + <regex>[-_a-zA-Z0-9]{1,11}</regex> +</constraint> +<constraintErrorMessage>Network name cannot be longer than 11 characters</constraintErrorMessage> +<!-- include end --> |