summaryrefslogtreecommitdiff
path: root/cloudinit/net
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2016-07-13 22:36:23 -0400
committerScott Moser <smoser@ubuntu.com>2016-07-13 22:36:23 -0400
commit22a93665b90fa7fba80946d690330eda890f50d4 (patch)
tree3df7b9a8f4c12529e2d87d6214316db03e62dced /cloudinit/net
parent7d58c949c2f5d7821ec664ed25167dfea92964f7 (diff)
parent333eea5105956c978043579a49d935af6d3ceff2 (diff)
downloadvyos-cloud-init-22a93665b90fa7fba80946d690330eda890f50d4.tar.gz
vyos-cloud-init-22a93665b90fa7fba80946d690330eda890f50d4.zip
merge from trunk
Diffstat (limited to 'cloudinit/net')
-rw-r--r--cloudinit/net/__init__.py3
-rw-r--r--cloudinit/net/eni.py4
2 files changed, 4 insertions, 3 deletions
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