summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cloudinit/distros/debian.py1
-rw-r--r--cloudinit/net/__init__.py3
-rw-r--r--cloudinit/net/eni.py4
-rw-r--r--cloudinit/sources/DataSourceSmartOS.py8
-rw-r--r--cloudinit/sources/__init__.py3
-rw-r--r--cloudinit/sources/helpers/openstack.py8
-rw-r--r--packages/redhat/cloud-init.spec.in4
7 files changed, 18 insertions, 13 deletions
diff --git a/cloudinit/distros/debian.py b/cloudinit/distros/debian.py
index 4d336b5b..f9b3b92e 100644
--- a/cloudinit/distros/debian.py
+++ b/cloudinit/distros/debian.py
@@ -55,7 +55,6 @@ class Distro(distros.Distro):
hostname_conf_fn = "/etc/hostname"
locale_conf_fn = "/etc/default/locale"
network_conf_fn = "/etc/network/interfaces.d/50-cloud-init.cfg"
- links_prefix = "/etc/systemd/network/50-cloud-init-"
def __init__(self, name, cfg, paths):
distros.Distro.__init__(self, name, cfg, paths)
diff --git a/cloudinit/net/__init__.py b/cloudinit/net/__init__.py
index 63e54f91..21cc602b 100644
--- a/cloudinit/net/__init__.py
+++ b/cloudinit/net/__init__.py
@@ -252,7 +252,8 @@ def _rename_interfaces(renames, strict_present=True, strict_busy=True,
cur_bymac[mac] = cur
def update_byname(bymac):
- return {data['name']: data for data in bymac.values()}
+ return dict((data['name'], data)
+ for data in bymac.values())
def rename(cur, new):
util.subp(["ip", "link", "set", cur, "name", new], capture=True)
diff --git a/cloudinit/net/eni.py b/cloudinit/net/eni.py
index 419e7a74..0221f55d 100644
--- a/cloudinit/net/eni.py
+++ b/cloudinit/net/eni.py
@@ -61,7 +61,7 @@ def _iface_add_subnet(iface, subnet):
value = " ".join(value)
if '_' in key:
key = key.replace('_', '-')
- content += " {} {}\n".format(key, value)
+ content += " {0} {1}\n".format(key, value)
return content
@@ -86,7 +86,7 @@ def _iface_add_attrs(iface):
if value and key not in ignore_map:
if type(value) == list:
value = " ".join(value)
- content += " {} {}\n".format(key, value)
+ content += " {0} {1}\n".format(key, value)
return content
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/__init__.py b/cloudinit/sources/__init__.py
index 2a6b8d90..87b8e524 100644
--- a/cloudinit/sources/__init__.py
+++ b/cloudinit/sources/__init__.py
@@ -55,6 +55,8 @@ class DataSourceNotFoundException(Exception):
@six.add_metaclass(abc.ABCMeta)
class DataSource(object):
+ dsmode = DSMODE_NETWORK
+
def __init__(self, sys_cfg, distro, paths, ud_proc=None):
self.sys_cfg = sys_cfg
self.distro = distro
@@ -64,7 +66,6 @@ class DataSource(object):
self.userdata_raw = None
self.vendordata = None
self.vendordata_raw = None
- self.dsmode = DSMODE_NETWORK
# find the datasource config name.
# remove 'DataSource' from classname on front, and remove 'Net' on end.
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({
diff --git a/packages/redhat/cloud-init.spec.in b/packages/redhat/cloud-init.spec.in
index 81cccce5..254d209b 100644
--- a/packages/redhat/cloud-init.spec.in
+++ b/packages/redhat/cloud-init.spec.in
@@ -160,6 +160,8 @@ fi
%files
+/lib/udev/rules.d/66-azure-ephemeral.rules
+
#if $sysvinit
%attr(0755, root, root) %{_initddir}/cloud-config
%attr(0755, root, root) %{_initddir}/cloud-final
@@ -168,6 +170,8 @@ fi
#end if
#if $systemd
+/usr/lib/systemd/system-generators/cloud-init-generator
+%{_unitdir}/cloud-*
%{_unitdir}/cloud-*
#end if