From 3fbe35c8ab0e5dc5fd7af1a5fc8b39e848655d36 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Tue, 28 Feb 2023 22:24:38 +0100 Subject: T4967: xml: provide re-usable constraint for CLI host-name definitions (cherry picked from commit d14a6814acb173cdc6df13212620f7da330434ed) --- interface-definitions/container.xml.in | 2 +- interface-definitions/dns-domain-name.xml.in | 2 +- interface-definitions/include/constraint/host-name.xml.in | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 interface-definitions/include/constraint/host-name.xml.in (limited to 'interface-definitions') diff --git a/interface-definitions/container.xml.in b/interface-definitions/container.xml.in index 4614bc892..91fb4dba0 100644 --- a/interface-definitions/container.xml.in +++ b/interface-definitions/container.xml.in @@ -117,7 +117,7 @@ Container host name - [A-Za-z0-9][-.A-Za-z0-9]*[A-Za-z0-9] + #include Host-name must be alphanumeric and can contain hyphens diff --git a/interface-definitions/dns-domain-name.xml.in b/interface-definitions/dns-domain-name.xml.in index a599a75cc..d77c94898 100644 --- a/interface-definitions/dns-domain-name.xml.in +++ b/interface-definitions/dns-domain-name.xml.in @@ -33,7 +33,7 @@ System host name (default: vyos) - [A-Za-z0-9][-.A-Za-z0-9]*[A-Za-z0-9] + #include diff --git a/interface-definitions/include/constraint/host-name.xml.in b/interface-definitions/include/constraint/host-name.xml.in new file mode 100644 index 000000000..202c200f4 --- /dev/null +++ b/interface-definitions/include/constraint/host-name.xml.in @@ -0,0 +1,3 @@ + +[A-Za-z0-9][-.A-Za-z0-9]*[A-Za-z0-9] + -- cgit v1.2.3