summaryrefslogtreecommitdiff
path: root/cloudinit/net/eni.py
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/net/eni.py')
-rw-r--r--cloudinit/net/eni.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/cloudinit/net/eni.py b/cloudinit/net/eni.py
index b129bb62..530922b5 100644
--- a/cloudinit/net/eni.py
+++ b/cloudinit/net/eni.py
@@ -411,8 +411,13 @@ class Renderer(renderer.Renderer):
else:
ipv4_subnet_mtu = subnet.get('mtu')
iface['inet'] = subnet_inet
- if subnet['type'].startswith('dhcp'):
+ if (subnet['type'] == 'dhcp4' or subnet['type'] == 'dhcp6' or
+ subnet['type'] == 'ipv6_dhcpv6-stateful'):
+ # Configure network settings using DHCP or DHCPv6
iface['mode'] = 'dhcp'
+ elif subnet['type'] == 'ipv6_dhcpv6-stateless':
+ # Configure network settings using SLAAC from RAs
+ iface['mode'] = 'auto'
# do not emit multiple 'auto $IFACE' lines as older (precise)
# ifupdown complains