|
|
ef3f20 |
From 0dab936fd1332749f905a20a44003f441eb76783 Mon Sep 17 00:00:00 2001
|
|
|
ef3f20 |
From: Lars Kellogg-Stedman <lars@redhat.com>
|
|
|
ef3f20 |
Date: Thu, 16 Feb 2017 15:09:51 -0500
|
|
|
ef3f20 |
Subject: [PATCH] correct errors in cloudinit/net/sysconfig.py
|
|
|
ef3f20 |
|
|
|
ef3f20 |
There were some logic errors in sysconfig.py that appear to be the
|
|
|
ef3f20 |
result of accidentally typing "iface" where it should have been
|
|
|
ef3f20 |
"iface_cfg". This patch corrects those problems so that the module
|
|
|
ef3f20 |
can run successfully.
|
|
|
ef3f20 |
|
|
|
ef3f20 |
LP: #1665441
|
|
|
ef3f20 |
Resolves: rhbz#1389530
|
|
|
ef3f20 |
(cherry picked from commit 07ef7f29c5ce9a97939eb32ca80fc1d8c2609216)
|
|
|
ef3f20 |
---
|
|
|
ef3f20 |
cloudinit/net/sysconfig.py | 4 ++--
|
|
|
ef3f20 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
ef3f20 |
|
|
|
ef3f20 |
diff --git a/cloudinit/net/sysconfig.py b/cloudinit/net/sysconfig.py
|
|
|
ef3f20 |
index 3c9f2d2..0b5f13c 100644
|
|
|
ef3f20 |
--- a/cloudinit/net/sysconfig.py
|
|
|
ef3f20 |
+++ b/cloudinit/net/sysconfig.py
|
|
|
ef3f20 |
@@ -282,10 +282,10 @@ class Renderer(renderer.Renderer):
|
|
|
ef3f20 |
cls._render_subnet(iface_cfg, route_cfg, iface_subnets[0])
|
|
|
ef3f20 |
elif len(iface_subnets) > 1:
|
|
|
ef3f20 |
for i, iface_subnet in enumerate(iface_subnets,
|
|
|
ef3f20 |
- start=len(iface.children)):
|
|
|
ef3f20 |
+ start=len(iface_cfg.children)):
|
|
|
ef3f20 |
iface_sub_cfg = iface_cfg.copy()
|
|
|
ef3f20 |
iface_sub_cfg.name = "%s:%s" % (iface_name, i)
|
|
|
ef3f20 |
- iface.children.append(iface_sub_cfg)
|
|
|
ef3f20 |
+ iface_cfg.children.append(iface_sub_cfg)
|
|
|
ef3f20 |
cls._render_subnet(iface_sub_cfg, route_cfg, iface_subnet)
|
|
|
ef3f20 |
|
|
|
ef3f20 |
@classmethod
|