summaryrefslogtreecommitdiff
path: root/interface-definitions
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2024-03-25 01:10:58 +0100
committerGitHub <noreply@github.com>2024-03-25 01:10:58 +0100
commit25891616fd74013241dc755166c7e3ad732849cc (patch)
tree6476be18a3287a55a50e8b4673c58a348ae5df4e /interface-definitions
parent8080adc06579d6381ac12227cb4a5bf53cc06efc (diff)
parent2a492bd9c701852e2a436a01558e02b28e7a8ed6 (diff)
downloadvyos-1x-25891616fd74013241dc755166c7e3ad732849cc.tar.gz
vyos-1x-25891616fd74013241dc755166c7e3ad732849cc.zip
Merge pull request #3183 from vyos/mergify/bp/sagitta/pr-3181
xml: T5738: use common constraint include for container network (backport #3181)
Diffstat (limited to 'interface-definitions')
-rw-r--r--interface-definitions/container.xml.in6
-rw-r--r--interface-definitions/include/constraint/container-network.xml.i6
2 files changed, 8 insertions, 4 deletions
diff --git a/interface-definitions/container.xml.in b/interface-definitions/container.xml.in
index d48ebf966..7e1f4811a 100644
--- a/interface-definitions/container.xml.in
+++ b/interface-definitions/container.xml.in
@@ -224,6 +224,7 @@
<completionHelp>
<path>container network</path>
</completionHelp>
+ #include <include/constraint/container-network.xml.i>
</properties>
<children>
<leafNode name="address">
@@ -439,10 +440,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 -->