diff options
author | Viacheslav <v.gletenko@vyos.io> | 2021-10-22 11:55:17 +0000 |
---|---|---|
committer | Viacheslav <v.gletenko@vyos.io> | 2021-10-22 11:55:17 +0000 |
commit | b1db3de80b8b5f4e2dcbc6d687d342986345c4b2 (patch) | |
tree | 077e8f0e5d06bf93f3b36508c17b74c84db5ccb0 /src | |
parent | 594c57d9b16cac5810f796f15ad7458bd0877435 (diff) | |
download | vyos-1x-b1db3de80b8b5f4e2dcbc6d687d342986345c4b2.tar.gz vyos-1x-b1db3de80b8b5f4e2dcbc6d687d342986345c4b2.zip |
hosts: T2683: Allow multiple entries for static-host-mapping
Diffstat (limited to 'src')
-rwxr-xr-x | src/conf_mode/host_name.py | 2 | ||||
-rwxr-xr-x | src/services/vyos-hostsd | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/conf_mode/host_name.py b/src/conf_mode/host_name.py index a7135911d..87bad0dc6 100755 --- a/src/conf_mode/host_name.py +++ b/src/conf_mode/host_name.py @@ -79,7 +79,7 @@ def get_config(config=None): # system static-host-mapping for hn in conf.list_nodes(['system', 'static-host-mapping', 'host-name']): hosts['static_host_mapping'][hn] = {} - hosts['static_host_mapping'][hn]['address'] = conf.return_value(['system', 'static-host-mapping', 'host-name', hn, 'inet']) + hosts['static_host_mapping'][hn]['address'] = conf.return_values(['system', 'static-host-mapping', 'host-name', hn, 'inet']) hosts['static_host_mapping'][hn]['aliases'] = conf.return_values(['system', 'static-host-mapping', 'host-name', hn, 'alias']) return hosts diff --git a/src/services/vyos-hostsd b/src/services/vyos-hostsd index 4c4bb036e..f4b1d0fc2 100755 --- a/src/services/vyos-hostsd +++ b/src/services/vyos-hostsd @@ -317,7 +317,7 @@ hosts_add_schema = op_type_schema.extend({ 'data': { str: { str: { - 'address': str, + 'address': [str], 'aliases': [str] } } |