summaryrefslogtreecommitdiff
path: root/interface-definitions/host-name.xml
diff options
context:
space:
mode:
Diffstat (limited to 'interface-definitions/host-name.xml')
-rw-r--r--interface-definitions/host-name.xml24
1 files changed, 14 insertions, 10 deletions
diff --git a/interface-definitions/host-name.xml b/interface-definitions/host-name.xml
index 1452a956a..4ab244f6a 100644
--- a/interface-definitions/host-name.xml
+++ b/interface-definitions/host-name.xml
@@ -5,18 +5,22 @@
<interfaceDefinition>
<node name="system">
<children>
- <node name="host-name" owner="${vyos_sbindir}/vyos-config-host-name.py">
+ <leafNode name="host-name" owner="${vyos_sbindir}/vyos-config-host-name.py">
<properties>
<help>System host name (default: vyos)</help>
+ <constraint>
+ <regex>[A-Za-z0-9][-.A-Za-z0-9]*[A-Za-z0-9]</regex>
+ </constraint>
</properties>
- <children>
- <leafNode name="hostname">
- <properties>
- <help>System host name (default: vyos)</help>
- </properties>
- </leafNode>
- </children>
- </node>
+ </leafNode>
+ <leafNode name="domain-name" owner="${vyos_sbindir}/vyos-config-host-name.py">
+ <properties>
+ <help>System domain name</help>
+ <constraint>
+ <regex>[A-Za-z0-9][-.A-Za-z0-9]*</regex>
+ </constraint>
+ </properties>
+ </leafNode>
</children>
</node>
-</interfaceDefinition> \ No newline at end of file
+</interfaceDefinition>