diff options
Diffstat (limited to 'cloudinit/sources')
-rw-r--r-- | cloudinit/sources/DataSourceSmartOS.py | 8 | ||||
-rw-r--r-- | cloudinit/sources/helpers/openstack.py | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/cloudinit/sources/DataSourceSmartOS.py b/cloudinit/sources/DataSourceSmartOS.py index 08bc132b..ccc86883 100644 --- a/cloudinit/sources/DataSourceSmartOS.py +++ b/cloudinit/sources/DataSourceSmartOS.py @@ -718,8 +718,8 @@ def convert_smartos_network_data(network_data=None): config = [] for nic in network_data: - cfg = {k: v for k, v in nic.items() - if k in valid_keys['physical']} + cfg = dict((k, v) for k, v in nic.items() + if k in valid_keys['physical']) cfg.update({ 'type': 'physical', 'name': nic['interface']}) @@ -728,8 +728,8 @@ def convert_smartos_network_data(network_data=None): subnets = [] for ip, gw in zip(nic['ips'], nic['gateways']): - subnet = {k: v for k, v in nic.items() - if k in valid_keys['subnet']} + subnet = dict((k, v) for k, v in nic.items() + if k in valid_keys['subnet']) subnet.update({ 'type': 'static', 'address': ip, diff --git a/cloudinit/sources/helpers/openstack.py b/cloudinit/sources/helpers/openstack.py index d52cb56a..2e7a1d47 100644 --- a/cloudinit/sources/helpers/openstack.py +++ b/cloudinit/sources/helpers/openstack.py @@ -542,8 +542,8 @@ def convert_net_json(network_json=None, known_macs=None): config = [] for link in links: subnets = [] - cfg = {k: v for k, v in link.items() - if k in valid_keys['physical']} + cfg = dict((k, v) for k, v in link.items() + if k in valid_keys['physical']) # 'name' is not in openstack spec yet, but we will support it if it is # present. The 'id' in the spec is currently implemented as the host # nic's name, meaning something like 'tap-adfasdffd'. We do not want @@ -553,8 +553,8 @@ def convert_net_json(network_json=None, known_macs=None): for network in [n for n in networks if n['link'] == link['id']]: - subnet = {k: v for k, v in network.items() - if k in valid_keys['subnet']} + subnet = dict((k, v) for k, v in network.items() + if k in valid_keys['subnet']) if 'dhcp' in network['type']: t = 'dhcp6' if network['type'].startswith('ipv6') else 'dhcp4' subnet.update({ |