summaryrefslogtreecommitdiff
path: root/src/conf_mode/host_name.py
diff options
context:
space:
mode:
authorhagbard <vyosdev@derith.de>2019-02-22 11:48:34 -0800
committerhagbard <vyosdev@derith.de>2019-02-22 11:48:34 -0800
commit9a79d95b8a361f3e29d1d6de515ab4eaa583e317 (patch)
tree8529b7713cffb20b92d912fe95c5a739cd0b9ec8 /src/conf_mode/host_name.py
parent40eaa61ba912f1fb1b18be0b2569fd5dd429c26f (diff)
downloadvyos-1x-9a79d95b8a361f3e29d1d6de515ab4eaa583e317.tar.gz
vyos-1x-9a79d95b8a361f3e29d1d6de515ab4eaa583e317.zip
feature: static-host-mapping - made IP address (param inet) mandatory
Diffstat (limited to 'src/conf_mode/host_name.py')
-rwxr-xr-xsrc/conf_mode/host_name.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/conf_mode/host_name.py b/src/conf_mode/host_name.py
index 19c306df8..27e2d9170 100755
--- a/src/conf_mode/host_name.py
+++ b/src/conf_mode/host_name.py
@@ -164,6 +164,8 @@ def verify(config):
# static mappings alias hostname
if config['static_host_mapping']['hostnames']:
for hn in config['static_host_mapping']['hostnames']:
+ if not config['static_host_mapping']['hostnames'][hn]['ipaddr']:
+ raise ConfigError('IP address required for ' + hn)
for hn_alias in config['static_host_mapping']['hostnames'][hn]['alias'].split(' '):
if not hostname_regex.match(hn_alias) and len (hn_alias) !=0:
raise ConfigError('Invalid hostname alias ' + hn_alias)