summaryrefslogtreecommitdiff
path: root/interface-definitions/dns-domain-name.xml
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2019-08-29 14:56:33 +0200
committerDaniil Baturin <daniil@baturin.org>2019-08-29 14:56:33 +0200
commitbb7f37fc8cd0ad5d1f0abdb0bd1b32645f917ca8 (patch)
treee0160bee80b14658355c95cd9e39a08eb917ddfc /interface-definitions/dns-domain-name.xml
parent76b275f00ae6eba35195a3027fb8960bd872491f (diff)
downloadvyos-1x-bb7f37fc8cd0ad5d1f0abdb0bd1b32645f917ca8.tar.gz
vyos-1x-bb7f37fc8cd0ad5d1f0abdb0bd1b32645f917ca8.zip
T1598: import the static-host-mappings CLI from current.
Diffstat (limited to 'interface-definitions/dns-domain-name.xml')
-rw-r--r--interface-definitions/dns-domain-name.xml47
1 files changed, 47 insertions, 0 deletions
diff --git a/interface-definitions/dns-domain-name.xml b/interface-definitions/dns-domain-name.xml
index 054979787..c16f0b02a 100644
--- a/interface-definitions/dns-domain-name.xml
+++ b/interface-definitions/dns-domain-name.xml
@@ -63,6 +63,53 @@
<valueless/>
</properties>
</leafNode>
+ <node name="static-host-mapping" owner="${vyos_conf_scripts_dir}/host_name.py">
+ <properties>
+ <help>Map host names to addresses</help>
+ <priority>400</priority>
+ </properties>
+ <children>
+
+ <tagNode name="host-name">
+ <properties>
+ <help>Host name for static address mapping</help>
+ <constraint>
+ <regex>^[A-Za-z0-9][-.A-Za-z0-9]*[A-Za-z0-9]$</regex>
+ </constraint>
+ <constraintErrorMessage>invalid hostname</constraintErrorMessage>
+ </properties>
+ <children>
+ <leafNode name="alias">
+ <properties>
+ <help>Alias for this address</help>
+ <constraint>
+ <regex>^.{1,63}$</regex>
+ </constraint>
+ <constraintErrorMessage>invalid alias hostname, needs to be between 1 and 63 charactes</constraintErrorMessage>
+ <multi />
+ </properties>
+ </leafNode>
+ <leafNode name="inet">
+ <properties>
+ <help>IP Address [REQUIRED]</help>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>IPv4 address</description>
+ </valueHelp>
+ <valueHelp>
+ <format>ipv6</format>
+ <description>IPv6 address</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ip-address"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ </children>
+ </tagNode>
+
+ </children>
+ </node>
</children>
</node>
</interfaceDefinition>