summaryrefslogtreecommitdiff
path: root/interface-definitions
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-02-14 22:34:06 +0100
committerDaniil Baturin <daniil@baturin.org>2019-05-20 06:09:54 +0200
commitb657528166b30cb8030396172128fff39ef82fd1 (patch)
tree3c2a7ab54ef735d157fe11f73bb3abf758de7c05 /interface-definitions
parentd77a3e3cf82f2a11601d93a9c6856cb52031ba37 (diff)
downloadvyos-1x-b657528166b30cb8030396172128fff39ef82fd1.tar.gz
vyos-1x-b657528166b30cb8030396172128fff39ef82fd1.zip
T1174: migrate local hostname/DNS handling to vyos-1x
Conflicts: src/conf_mode/host_name.py
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>