summaryrefslogtreecommitdiff
path: root/tests/unittests/test_distros/test_netconfig.py
diff options
context:
space:
mode:
authorAndreas Karis <akaris@redhat.com>2017-04-21 20:35:39 -0400
committerScott Moser <smoser@brickies.net>2017-05-23 15:00:10 -0400
commitf38fa41317602908139aa96e930b634f65e39555 (patch)
treebbcf5de238e9aad884b94d22d8ed1f9b3da6bad5 /tests/unittests/test_distros/test_netconfig.py
parent3507b59eaa4914ba041f9c7ae987a2cfb036d8b5 (diff)
downloadvyos-cloud-init-f38fa41317602908139aa96e930b634f65e39555.tar.gz
vyos-cloud-init-f38fa41317602908139aa96e930b634f65e39555.zip
RHEL/CentOS: Fix dual stack IPv4/IPv6 configuration.
Dual stack IPv4/IPv6 configuration via config drive is broken for RHEL7. This patch fixes several scenarios for IPv4/IPv6/dual-stack with multiple IP assignment. Removes usage of unpopular IPv4 alias files and invalid IPv6 alias files. Also fix associated unit tests. LP: #1679817 LP: #1685534 LP: #1685532
Diffstat (limited to 'tests/unittests/test_distros/test_netconfig.py')
-rw-r--r--tests/unittests/test_distros/test_netconfig.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/unittests/test_distros/test_netconfig.py b/tests/unittests/test_distros/test_netconfig.py
index 1e10a33d..fd7c051f 100644
--- a/tests/unittests/test_distros/test_netconfig.py
+++ b/tests/unittests/test_distros/test_netconfig.py
@@ -476,7 +476,7 @@ NETWORKING=yes
expected_buf = '''
# Created by cloud-init on instance boot automatically, do not edit.
#
-BOOTPROTO=static
+BOOTPROTO=none
DEVICE=eth0
IPADDR=192.168.1.5
NETMASK=255.255.255.0
@@ -533,7 +533,6 @@ NETWORKING=yes
mock.patch.object(util, 'load_file', return_value=''))
mocks.enter_context(
mock.patch.object(os.path, 'isfile', return_value=False))
-
rh_distro.apply_network(BASE_NET_CFG_IPV6, False)
self.assertEqual(len(write_bufs), 4)
@@ -626,11 +625,10 @@ IPV6_AUTOCONF=no
expected_buf = '''
# Created by cloud-init on instance boot automatically, do not edit.
#
-BOOTPROTO=static
+BOOTPROTO=none
DEVICE=eth0
-IPV6ADDR=2607:f0d0:1002:0011::2
+IPV6ADDR=2607:f0d0:1002:0011::2/64
IPV6INIT=yes
-NETMASK=64
NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet