summaryrefslogtreecommitdiff
path: root/cloudinit/net/network_state.py
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/net/network_state.py')
-rw-r--r--cloudinit/net/network_state.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/cloudinit/net/network_state.py b/cloudinit/net/network_state.py
index 0e830ee8..e9e2cf4e 100644
--- a/cloudinit/net/network_state.py
+++ b/cloudinit/net/network_state.py
@@ -746,6 +746,14 @@ def _normalize_subnet(subnet):
_normalize_net_keys(normal_subnet, address_keys=('address',)))
normal_subnet['routes'] = [_normalize_route(r)
for r in subnet.get('routes', [])]
+
+ def listify(snet, name):
+ if name in snet and not isinstance(snet[name], list):
+ snet[name] = snet[name].split()
+
+ for k in ('dns_search', 'dns_nameservers'):
+ listify(normal_subnet, k)
+
return normal_subnet