summaryrefslogtreecommitdiff
path: root/interface-definitions
diff options
context:
space:
mode:
authorhagbard <vyosdev@derith.de>2019-02-21 15:55:21 -0800
committerhagbard <vyosdev@derith.de>2019-02-21 15:55:21 -0800
commitf4cbcbf2d803cdbe769ecaf8fc2651cc93f00cf8 (patch)
treeb966603e025a32d7882ce1ff08dfede7acb2898f /interface-definitions
parent2ff406e1dd9e8a85029a427b5e11a7e3645c911b (diff)
downloadvyos-1x-f4cbcbf2d803cdbe769ecaf8fc2651cc93f00cf8.tar.gz
vyos-1x-f4cbcbf2d803cdbe769ecaf8fc2651cc93f00cf8.zip
Fixes: T1257: implement 'set system static-host-mapping' in host_name.py and remove old function calls
Diffstat (limited to 'interface-definitions')
-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 7b8497c09..a2c66495f 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>