5b08af
From e6c32d9e6c01e46a91699954b88543cce4d325bb 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
---
738010
 cloudinit/net/sysconfig.py  |  1 -
738010
 tests/unittests/test_net.py | 30 ------------------------------
738010
 2 files changed, 31 deletions(-)
c60dcd
c60dcd
diff --git a/cloudinit/net/sysconfig.py b/cloudinit/net/sysconfig.py
5b08af
index 310cdf0..8bd7e88 100644
c60dcd
--- a/cloudinit/net/sysconfig.py
c60dcd
+++ b/cloudinit/net/sysconfig.py
5b08af
@@ -272,7 +272,6 @@ class Renderer(renderer.Renderer):
c60dcd
     iface_defaults = tuple([
c60dcd
         ('ONBOOT', True),
c60dcd
         ('USERCTL', False),
c60dcd
-        ('NM_CONTROLLED', False),
c60dcd
         ('BOOTPROTO', 'none'),
5b08af
         ('STARTMODE', 'auto'),
c60dcd
     ])
c60dcd
diff --git a/tests/unittests/test_net.py b/tests/unittests/test_net.py
5b08af
index 01119e0..a931a3e 100644
c60dcd
--- a/tests/unittests/test_net.py
c60dcd
+++ b/tests/unittests/test_net.py
5b08af
@@ -530,7 +530,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
5b08af
 STARTMODE=auto
c60dcd
 TYPE=Ethernet
5b08af
@@ -636,7 +635,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
5b08af
 STARTMODE=auto
c60dcd
 TYPE=Ethernet
5b08af
@@ -772,7 +770,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
5b08af
 STARTMODE=auto
c60dcd
 TYPE=Ethernet
5b08af
@@ -889,7 +886,6 @@ NETWORK_CONFIGS = {
c60dcd
                 BOOTPROTO=none
c60dcd
                 DEVICE=eth1
c60dcd
                 HWADDR=cf:d6:af:48:e8:80
c60dcd
-                NM_CONTROLLED=no
c60dcd
                 ONBOOT=yes
5b08af
                 STARTMODE=auto
c60dcd
                 TYPE=Ethernet
5b08af
@@ -907,7 +903,6 @@ NETWORK_CONFIGS = {
c60dcd
                 IPADDR=192.168.21.3
c60dcd
                 NETMASK=255.255.255.0
738010
                 METRIC=10000
c60dcd
-                NM_CONTROLLED=no
c60dcd
                 ONBOOT=yes
5b08af
                 STARTMODE=auto
c60dcd
                 TYPE=Ethernet
5b08af
@@ -1022,7 +1017,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
5b08af
                 STARTMODE=auto
c60dcd
                 TYPE=Ethernet
5b08af
@@ -1491,7 +1485,6 @@ pre-down route del -net 10.0.0.0/8 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
5b08af
                 STARTMODE=auto
c60dcd
                 TYPE=Bond
5b08af
@@ -1500,7 +1493,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true
c60dcd
                 BOOTPROTO=dhcp
c60dcd
                 DEVICE=bond0.200
5b08af
                 DHCLIENT_SET_DEFAULT_ROUTE=no
c60dcd
-                NM_CONTROLLED=no
c60dcd
                 ONBOOT=yes
c60dcd
                 PHYSDEV=bond0
5b08af
                 STARTMODE=auto
5b08af
@@ -1519,7 +1511,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true
c60dcd
                 IPV6_DEFAULTGW=2001:4800:78ff:1b::1
738010
                 MACADDR=bb:bb:bb:bb:bb:aa
c60dcd
                 NETMASK=255.255.255.0
c60dcd
-                NM_CONTROLLED=no
c60dcd
                 ONBOOT=yes
c60dcd
                 PRIO=22
5b08af
                 STARTMODE=auto
5b08af
@@ -1530,7 +1521,6 @@ pre-down route del -net 10.0.0.0/8 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
5b08af
                 STARTMODE=auto
c60dcd
                 TYPE=Ethernet
5b08af
@@ -1548,7 +1538,6 @@ pre-down route del -net 10.0.0.0/8 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
5b08af
                 STARTMODE=auto
5b08af
@@ -1560,7 +1549,6 @@ pre-down route del -net 10.0.0.0/8 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
5b08af
                 STARTMODE=auto
c60dcd
                 SLAVE=yes
5b08af
@@ -1571,7 +1559,6 @@ pre-down route del -net 10.0.0.0/8 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
5b08af
                 STARTMODE=auto
c60dcd
                 SLAVE=yes
5b08af
@@ -1582,7 +1569,6 @@ pre-down route del -net 10.0.0.0/8 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
5b08af
                 STARTMODE=auto
c60dcd
                 TYPE=Ethernet
5b08af
@@ -1592,7 +1578,6 @@ pre-down route del -net 10.0.0.0/8 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
5b08af
                 STARTMODE=auto
c60dcd
                 TYPE=Ethernet
5b08af
@@ -1602,7 +1587,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true
c60dcd
                 DEVICE=eth5
5b08af
                 DHCLIENT_SET_DEFAULT_ROUTE=no
c60dcd
                 HWADDR=98:bb:9f:2c:e8:8a
c60dcd
-                NM_CONTROLLED=no
c60dcd
                 ONBOOT=no
5b08af
                 STARTMODE=manual
c60dcd
                 TYPE=Ethernet
5b08af
@@ -2088,7 +2072,6 @@ iface bond0 inet6 static
738010
         MTU=9000
c60dcd
         NETMASK=255.255.255.0
c60dcd
         NETMASK1=255.255.255.0
c60dcd
-        NM_CONTROLLED=no
c60dcd
         ONBOOT=yes
5b08af
         STARTMODE=auto
c60dcd
         TYPE=Bond
5b08af
@@ -2099,7 +2082,6 @@ iface bond0 inet6 static
c60dcd
         DEVICE=bond0s0
c60dcd
         HWADDR=aa:bb:cc:dd:e8:00
c60dcd
         MASTER=bond0
c60dcd
-        NM_CONTROLLED=no
c60dcd
         ONBOOT=yes
c60dcd
         SLAVE=yes
5b08af
         STARTMODE=auto
5b08af
@@ -2122,7 +2104,6 @@ iface bond0 inet6 static
c60dcd
         DEVICE=bond0s1
c60dcd
         HWADDR=aa:bb:cc:dd:e8:01
c60dcd
         MASTER=bond0
c60dcd
-        NM_CONTROLLED=no
c60dcd
         ONBOOT=yes
c60dcd
         SLAVE=yes
5b08af
         STARTMODE=auto
5b08af
@@ -2161,7 +2142,6 @@ iface bond0 inet6 static
c60dcd
                 BOOTPROTO=none
c60dcd
                 DEVICE=en0
c60dcd
                 HWADDR=aa:bb:cc:dd:e8:00
c60dcd
-                NM_CONTROLLED=no
c60dcd
                 ONBOOT=yes
5b08af
                 STARTMODE=auto
c60dcd
                 TYPE=Ethernet
5b08af
@@ -2180,7 +2160,6 @@ iface bond0 inet6 static
738010
                 MTU=2222
c60dcd
                 NETMASK=255.255.255.0
c60dcd
                 NETMASK1=255.255.255.0
c60dcd
-                NM_CONTROLLED=no
c60dcd
                 ONBOOT=yes
c60dcd
                 PHYSDEV=en0
5b08af
                 STARTMODE=auto
5b08af
@@ -2222,7 +2201,6 @@ iface bond0 inet6 static
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
5b08af
                 STARTMODE=auto
5b08af
@@ -2238,7 +2216,6 @@ iface bond0 inet6 static
5b08af
                 IPADDR6=2001:1::100/96
c60dcd
                 IPV6ADDR=2001:1::100/96
c60dcd
                 IPV6INIT=yes
c60dcd
-                NM_CONTROLLED=no
c60dcd
                 ONBOOT=yes
5b08af
                 STARTMODE=auto
c60dcd
                 TYPE=Ethernet
5b08af
@@ -2252,7 +2229,6 @@ iface bond0 inet6 static
5b08af
                 IPADDR6=2001:1::101/96
c60dcd
                 IPV6ADDR=2001:1::101/96
c60dcd
                 IPV6INIT=yes
c60dcd
-                NM_CONTROLLED=no
c60dcd
                 ONBOOT=yes
5b08af
                 STARTMODE=auto
c60dcd
                 TYPE=Ethernet
5b08af
@@ -2327,7 +2303,6 @@ iface bond0 inet6 static
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
5b08af
                 STARTMODE=manual
c60dcd
                 TYPE=Ethernet
5b08af
@@ -2338,7 +2313,6 @@ iface bond0 inet6 static
c60dcd
                 DEVICE=eth1
c60dcd
                 HWADDR=52:54:00:12:34:aa
c60dcd
                 MTU=1480
c60dcd
-                NM_CONTROLLED=no
c60dcd
                 ONBOOT=yes
5b08af
                 STARTMODE=auto
c60dcd
                 TYPE=Ethernet
5b08af
@@ -2348,7 +2322,6 @@ iface bond0 inet6 static
c60dcd
                 BOOTPROTO=none
c60dcd
                 DEVICE=eth2
c60dcd
                 HWADDR=52:54:00:12:34:ff
c60dcd
-                NM_CONTROLLED=no
c60dcd
                 ONBOOT=no
5b08af
                 STARTMODE=manual
c60dcd
                 TYPE=Ethernet
5b08af
@@ -2766,7 +2739,6 @@ class TestRhelSysConfigRendering(CiTestCase):
c60dcd
 BOOTPROTO=dhcp
c60dcd
 DEVICE=eth1000
5b08af
 HWADDR=07-1c-c6-75-a4-be
c60dcd
-NM_CONTROLLED=no
c60dcd
 ONBOOT=yes
5b08af
 STARTMODE=auto
c60dcd
 TYPE=Ethernet
5b08af
@@ -2888,7 +2860,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
5b08af
 STARTMODE=auto
c60dcd
 TYPE=Ethernet
5b08af
@@ -2961,7 +2932,6 @@ USERCTL=no
c60dcd
 #
c60dcd
 BOOTPROTO=dhcp
c60dcd
 DEVICE=eth0
c60dcd
-NM_CONTROLLED=no
c60dcd
 ONBOOT=yes
5b08af
 STARTMODE=auto
c60dcd
 TYPE=Ethernet
c60dcd
-- 
c60dcd
1.8.3.1
c60dcd