summaryrefslogtreecommitdiff
path: root/cloudinit/net/network_state.py
diff options
context:
space:
mode:
authorzsdc <taras@vyos.io>2020-12-25 17:52:03 +0200
committerzsdc <taras@vyos.io>2020-12-25 17:52:03 +0200
commit526c2760b85ff625a10f4a1c9ba83759d8de1441 (patch)
treec7a87d78a7944dd6a9d02544d1605f3a7d77e313 /cloudinit/net/network_state.py
parent66dc53b1b3f8786f3bbb25e914c1dc8161af0494 (diff)
parent47f4229ebcef9f83df8b549bb869a2dbf6dff17c (diff)
downloadvyos-cloud-init-526c2760b85ff625a10f4a1c9ba83759d8de1441.tar.gz
vyos-cloud-init-526c2760b85ff625a10f4a1c9ba83759d8de1441.zip
T2117: Cloud-init updated to 20.4
Merged with 20.4 tag from the upstream Cloud-init repository
Diffstat (limited to 'cloudinit/net/network_state.py')
-rw-r--r--cloudinit/net/network_state.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/cloudinit/net/network_state.py b/cloudinit/net/network_state.py
index b2f7d31e..e8bf9e39 100644
--- a/cloudinit/net/network_state.py
+++ b/cloudinit/net/network_state.py
@@ -369,6 +369,9 @@ class NetworkStateInterpreter(metaclass=CommandHandlerMeta):
accept_ra = command.get('accept-ra', None)
if accept_ra is not None:
accept_ra = util.is_true(accept_ra)
+ wakeonlan = command.get('wakeonlan', None)
+ if wakeonlan is not None:
+ wakeonlan = util.is_true(wakeonlan)
iface.update({
'name': command.get('name'),
'type': command.get('type'),
@@ -379,7 +382,8 @@ class NetworkStateInterpreter(metaclass=CommandHandlerMeta):
'address': None,
'gateway': None,
'subnets': subnets,
- 'accept-ra': accept_ra
+ 'accept-ra': accept_ra,
+ 'wakeonlan': wakeonlan,
})
self._network_state['interfaces'].update({command.get('name'): iface})
self.dump_network_state()
@@ -820,7 +824,8 @@ def _normalize_subnet(subnet):
if subnet.get('type') in ('static', 'static6'):
normal_subnet.update(
- _normalize_net_keys(normal_subnet, address_keys=('address',)))
+ _normalize_net_keys(normal_subnet, address_keys=(
+ 'address', 'ip_address',)))
normal_subnet['routes'] = [_normalize_route(r)
for r in subnet.get('routes', [])]