summaryrefslogtreecommitdiff
path: root/cloudinit/sources
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@gmail.com>2016-05-19 14:13:07 -0700
committerJoshua Harlow <harlowja@gmail.com>2016-05-19 14:13:07 -0700
commit880d9fc2f9c62abf19b1506595aa81e5417dea45 (patch)
tree6a53a8a5ac8ea1c53284aa610f98ddaab89c7f9f /cloudinit/sources
parentabb3c00fadefea8056c300faf141260e124a5064 (diff)
downloadvyos-cloud-init-880d9fc2f9c62abf19b1506595aa81e5417dea45.tar.gz
vyos-cloud-init-880d9fc2f9c62abf19b1506595aa81e5417dea45.zip
Adjust net module to be more isolated
This allows it to be used outside of cloudinit more easily in the future.
Diffstat (limited to 'cloudinit/sources')
-rw-r--r--cloudinit/sources/helpers/openstack.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/cloudinit/sources/helpers/openstack.py b/cloudinit/sources/helpers/openstack.py
index b2acc648..f85fd864 100644
--- a/cloudinit/sources/helpers/openstack.py
+++ b/cloudinit/sources/helpers/openstack.py
@@ -551,6 +551,10 @@ def convert_net_json(network_json):
'type': 'static',
'address': network.get('ip_address'),
})
+ if network['type'] == 'ipv6':
+ subnet['ipv6'] = True
+ else:
+ subnet['ipv4'] = True
subnets.append(subnet)
cfg.update({'subnets': subnets})
if link['type'] in ['ethernet', 'vif', 'ovs', 'phy']: