|
|
17dafa |
From af85b22b99e3b784e982e4be11b2a39d79316265 Mon Sep 17 00:00:00 2001
|
|
|
c60dcd |
From: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
c60dcd |
Date: Thu, 31 May 2018 19:37:55 +0200
|
|
|
c60dcd |
Subject: Do not write NM_CONTROLLED=no in generated interface config files
|
|
|
c60dcd |
|
|
|
c60dcd |
X-downstream-only: true
|
|
|
c60dcd |
Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
|
|
|
c60dcd |
---
|
|
|
17dafa |
cloudinit/net/sysconfig.py | 1 -
|
|
|
17dafa |
tests/unittests/test_net.py | 30 ------------------------------
|
|
|
17dafa |
2 files changed, 31 deletions(-)
|
|
|
c60dcd |
|
|
|
c60dcd |
diff --git a/cloudinit/net/sysconfig.py b/cloudinit/net/sysconfig.py
|
|
|
17dafa |
index 17293e1..ae0554e 100644
|
|
|
c60dcd |
--- a/cloudinit/net/sysconfig.py
|
|
|
c60dcd |
+++ b/cloudinit/net/sysconfig.py
|
|
|
17dafa |
@@ -250,7 +250,6 @@ class Renderer(renderer.Renderer):
|
|
|
c60dcd |
iface_defaults = tuple([
|
|
|
c60dcd |
('ONBOOT', True),
|
|
|
c60dcd |
('USERCTL', False),
|
|
|
c60dcd |
- ('NM_CONTROLLED', False),
|
|
|
c60dcd |
('BOOTPROTO', 'none'),
|
|
|
c60dcd |
])
|
|
|
c60dcd |
|
|
|
c60dcd |
diff --git a/tests/unittests/test_net.py b/tests/unittests/test_net.py
|
|
|
17dafa |
index 195f261..5f1aa3e 100644
|
|
|
c60dcd |
--- a/tests/unittests/test_net.py
|
|
|
c60dcd |
+++ b/tests/unittests/test_net.py
|
|
|
17dafa |
@@ -175,7 +175,6 @@ GATEWAY=172.19.3.254
|
|
|
c60dcd |
HWADDR=fa:16:3e:ed:9a:59
|
|
|
c60dcd |
IPADDR=172.19.1.34
|
|
|
c60dcd |
NETMASK=255.255.252.0
|
|
|
c60dcd |
-NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no
|
|
|
17dafa |
@@ -279,7 +278,6 @@ IPADDR=172.19.1.34
|
|
|
c60dcd |
IPADDR1=10.0.0.10
|
|
|
c60dcd |
NETMASK=255.255.252.0
|
|
|
c60dcd |
NETMASK1=255.255.255.0
|
|
|
c60dcd |
-NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no
|
|
|
17dafa |
@@ -407,7 +405,6 @@ IPV6ADDR_SECONDARIES="2001:DB9::10/64 2001:DB10::10/64"
|
|
|
c60dcd |
IPV6INIT=yes
|
|
|
c60dcd |
IPV6_DEFAULTGW=2001:DB8::1
|
|
|
c60dcd |
NETMASK=255.255.252.0
|
|
|
c60dcd |
-NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no
|
|
|
17dafa |
@@ -523,7 +520,6 @@ NETWORK_CONFIGS = {
|
|
|
c60dcd |
BOOTPROTO=none
|
|
|
c60dcd |
DEVICE=eth1
|
|
|
c60dcd |
HWADDR=cf:d6:af:48:e8:80
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no"""),
|
|
|
17dafa |
@@ -539,7 +535,6 @@ NETWORK_CONFIGS = {
|
|
|
c60dcd |
IPADDR=192.168.21.3
|
|
|
c60dcd |
NETMASK=255.255.255.0
|
|
|
17dafa |
METRIC=10000
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no"""),
|
|
|
17dafa |
@@ -652,7 +647,6 @@ NETWORK_CONFIGS = {
|
|
|
c60dcd |
IPV6ADDR=2001:1::1/64
|
|
|
c60dcd |
IPV6INIT=yes
|
|
|
c60dcd |
NETMASK=255.255.255.0
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no
|
|
|
17dafa |
@@ -894,14 +888,12 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
c60dcd |
DHCPV6C=yes
|
|
|
c60dcd |
IPV6INIT=yes
|
|
|
c60dcd |
MACADDR=aa:bb:cc:dd:ee:ff
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Bond
|
|
|
c60dcd |
USERCTL=no"""),
|
|
|
c60dcd |
'ifcfg-bond0.200': textwrap.dedent("""\
|
|
|
c60dcd |
BOOTPROTO=dhcp
|
|
|
c60dcd |
DEVICE=bond0.200
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
PHYSDEV=bond0
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
17dafa |
@@ -918,7 +910,6 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
c60dcd |
IPV6_DEFAULTGW=2001:4800:78ff:1b::1
|
|
|
17dafa |
MACADDR=bb:bb:bb:bb:bb:aa
|
|
|
c60dcd |
NETMASK=255.255.255.0
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
PRIO=22
|
|
|
c60dcd |
STP=no
|
|
|
17dafa |
@@ -928,7 +919,6 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
c60dcd |
BOOTPROTO=none
|
|
|
c60dcd |
DEVICE=eth0
|
|
|
c60dcd |
HWADDR=c0:d6:9f:2c:e8:80
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no"""),
|
|
|
17dafa |
@@ -945,7 +935,6 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
c60dcd |
MTU=1500
|
|
|
c60dcd |
NETMASK=255.255.255.0
|
|
|
c60dcd |
NETMASK1=255.255.255.0
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
PHYSDEV=eth0
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
17dafa |
@@ -956,7 +945,6 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
c60dcd |
DEVICE=eth1
|
|
|
c60dcd |
HWADDR=aa:d6:9f:2c:e8:80
|
|
|
c60dcd |
MASTER=bond0
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
SLAVE=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
17dafa |
@@ -966,7 +954,6 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
c60dcd |
DEVICE=eth2
|
|
|
c60dcd |
HWADDR=c0:bb:9f:2c:e8:80
|
|
|
c60dcd |
MASTER=bond0
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
SLAVE=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
17dafa |
@@ -976,7 +963,6 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
c60dcd |
BRIDGE=br0
|
|
|
c60dcd |
DEVICE=eth3
|
|
|
c60dcd |
HWADDR=66:bb:9f:2c:e8:80
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no"""),
|
|
|
17dafa |
@@ -985,7 +971,6 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
c60dcd |
BRIDGE=br0
|
|
|
c60dcd |
DEVICE=eth4
|
|
|
c60dcd |
HWADDR=98:bb:9f:2c:e8:80
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no"""),
|
|
|
17dafa |
@@ -993,7 +978,6 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
c60dcd |
BOOTPROTO=dhcp
|
|
|
c60dcd |
DEVICE=eth5
|
|
|
c60dcd |
HWADDR=98:bb:9f:2c:e8:8a
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=no
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no""")
|
|
|
17dafa |
@@ -1356,7 +1340,6 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
17dafa |
MTU=9000
|
|
|
c60dcd |
NETMASK=255.255.255.0
|
|
|
c60dcd |
NETMASK1=255.255.255.0
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Bond
|
|
|
c60dcd |
USERCTL=no
|
|
|
17dafa |
@@ -1366,7 +1349,6 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
c60dcd |
DEVICE=bond0s0
|
|
|
c60dcd |
HWADDR=aa:bb:cc:dd:e8:00
|
|
|
c60dcd |
MASTER=bond0
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
SLAVE=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
17dafa |
@@ -1388,7 +1370,6 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
c60dcd |
DEVICE=bond0s1
|
|
|
c60dcd |
HWADDR=aa:bb:cc:dd:e8:01
|
|
|
c60dcd |
MASTER=bond0
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
SLAVE=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
17dafa |
@@ -1426,7 +1407,6 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
c60dcd |
BOOTPROTO=none
|
|
|
c60dcd |
DEVICE=en0
|
|
|
c60dcd |
HWADDR=aa:bb:cc:dd:e8:00
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no"""),
|
|
|
17dafa |
@@ -1443,7 +1423,6 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
17dafa |
MTU=2222
|
|
|
c60dcd |
NETMASK=255.255.255.0
|
|
|
c60dcd |
NETMASK1=255.255.255.0
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
PHYSDEV=en0
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
17dafa |
@@ -1484,7 +1463,6 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
c60dcd |
DEVICE=br0
|
|
|
c60dcd |
IPADDR=192.168.2.2
|
|
|
c60dcd |
NETMASK=255.255.255.0
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
PRIO=22
|
|
|
c60dcd |
STP=no
|
|
|
17dafa |
@@ -1498,7 +1476,6 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
c60dcd |
HWADDR=52:54:00:12:34:00
|
|
|
c60dcd |
IPV6ADDR=2001:1::100/96
|
|
|
c60dcd |
IPV6INIT=yes
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no
|
|
|
17dafa |
@@ -1510,7 +1487,6 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
c60dcd |
HWADDR=52:54:00:12:34:01
|
|
|
c60dcd |
IPV6ADDR=2001:1::101/96
|
|
|
c60dcd |
IPV6INIT=yes
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no
|
|
|
17dafa |
@@ -1584,7 +1560,6 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
c60dcd |
HWADDR=52:54:00:12:34:00
|
|
|
c60dcd |
IPADDR=192.168.1.2
|
|
|
c60dcd |
NETMASK=255.255.255.0
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=no
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no
|
|
|
17dafa |
@@ -1594,7 +1569,6 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
c60dcd |
DEVICE=eth1
|
|
|
c60dcd |
HWADDR=52:54:00:12:34:aa
|
|
|
c60dcd |
MTU=1480
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no
|
|
|
17dafa |
@@ -1603,7 +1577,6 @@ pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 11.0.0.1 metric 3 || true
|
|
|
c60dcd |
BOOTPROTO=none
|
|
|
c60dcd |
DEVICE=eth2
|
|
|
c60dcd |
HWADDR=52:54:00:12:34:ff
|
|
|
c60dcd |
- NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=no
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no
|
|
|
17dafa |
@@ -1969,7 +1942,6 @@ class TestRhelSysConfigRendering(CiTestCase):
|
|
|
c60dcd |
BOOTPROTO=dhcp
|
|
|
c60dcd |
DEVICE=eth1000
|
|
|
c60dcd |
HWADDR=07-1C-C6-75-A4-BE
|
|
|
c60dcd |
-NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no
|
|
|
17dafa |
@@ -2090,7 +2062,6 @@ GATEWAY=10.0.2.2
|
|
|
c60dcd |
HWADDR=52:54:00:12:34:00
|
|
|
c60dcd |
IPADDR=10.0.2.15
|
|
|
c60dcd |
NETMASK=255.255.255.0
|
|
|
c60dcd |
-NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no
|
|
|
17dafa |
@@ -2111,7 +2082,6 @@ USERCTL=no
|
|
|
c60dcd |
#
|
|
|
c60dcd |
BOOTPROTO=dhcp
|
|
|
c60dcd |
DEVICE=eth0
|
|
|
c60dcd |
-NM_CONTROLLED=no
|
|
|
c60dcd |
ONBOOT=yes
|
|
|
c60dcd |
TYPE=Ethernet
|
|
|
c60dcd |
USERCTL=no
|
|
|
c60dcd |
--
|
|
|
c60dcd |
1.8.3.1
|
|
|
c60dcd |
|