summaryrefslogtreecommitdiff
path: root/interface-definitions
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-02-14 22:34:06 +0100
committerChristian Poessinger <christian@poessinger.com>2019-02-14 22:34:06 +0100
commit3d3eccd687b45f63a9dbed6fea21ec107be7c5a3 (patch)
tree23046fe3829e7d033809078f000925695a43fdea /interface-definitions
parent80a96d620bdf47ba0b3e109f3789a9777a2eb6ba (diff)
downloadvyos-1x-3d3eccd687b45f63a9dbed6fea21ec107be7c5a3.tar.gz
vyos-1x-3d3eccd687b45f63a9dbed6fea21ec107be7c5a3.zip
T1174: migrate local hostname/DNS handling to vyos-1x
Diffstat (limited to 'interface-definitions')
-rw-r--r--interface-definitions/dns-domain-name.xml68
-rw-r--r--interface-definitions/host-name.xml26
2 files changed, 68 insertions, 26 deletions
diff --git a/interface-definitions/dns-domain-name.xml b/interface-definitions/dns-domain-name.xml
new file mode 100644
index 000000000..7b8497c09
--- /dev/null
+++ b/interface-definitions/dns-domain-name.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+<!-- host-name configuration -->
+<interfaceDefinition>
+ <node name="system">
+ <children>
+ <leafNode name="name-server">
+ <properties>
+ <help>Domain Name Server (DNS)</help>
+ <priority>400</priority>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>Domain Name Server (DNS) address</description>
+ </valueHelp>
+ <valueHelp>
+ <format>ipv6</format>
+ <description>Domain Name Server (DNS) address</description>
+ </valueHelp>
+ <multi/>
+ <constraint>
+ <validator name="ipv4-address"/>
+ <validator name="ipv6-address"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="host-name" owner="${vyos_conf_scripts_dir}/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>
+ </leafNode>
+ <leafNode name="domain-name" owner="${vyos_conf_scripts_dir}/host_name.py">
+ <properties>
+ <help>System domain name</help>
+ <constraint>
+ <regex>[A-Za-z0-9][-.A-Za-z0-9]*</regex>
+ </constraint>
+ </properties>
+ </leafNode>
+ <node name="domain-search" owner="${vyos_conf_scripts_dir}/host_name.py">
+ <properties>
+ <help>Domain Name Server (DNS) domain completion order</help>
+ <priority>400</priority>
+ </properties>
+ <children>
+ <leafNode name="domain">
+ <properties>
+ <help>DNS domain completion order</help>
+ <constraint>
+ <regex>^[-a-zA-Z0-9.]+$</regex>
+ </constraint>
+ <constraintErrorMessage>Invalid domain name</constraintErrorMessage>
+ <multi/>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+ <leafNode name="disable-dhcp-nameservers" owner="${vyos_conf_scripts_dir}/host_name.py">
+ <properties>
+ <help>Disable DHCP updates of DNS settings</help>
+ <priority>300</priority>
+ <valueless/>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/interface-definitions/host-name.xml b/interface-definitions/host-name.xml
deleted file mode 100644
index bbe679607..000000000
--- a/interface-definitions/host-name.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- host-name configuration -->
-
-<interfaceDefinition>
- <node name="system">
- <children>
- <leafNode name="host-name" owner="${vyos_conf_scripts_dir}/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>
- </leafNode>
- <leafNode name="domain-name" owner="${vyos_conf_scripts_dir}/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>