summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2016-04-15 16:21:05 -0400
committerScott Moser <smoser@ubuntu.com>2016-04-15 16:21:05 -0400
commitb029dcefe1ed33be8ed80f2e376ca6874dfd64f7 (patch)
tree6ed7c2f73a8af96d4db8ef6702db47c573a58a56 /tests
parent53f035122dffd5b821e29fe9af9a72276d9728b4 (diff)
parent8384076e77d8fa5e0f6f3639f2dddd33c64236b9 (diff)
downloadvyos-cloud-init-b029dcefe1ed33be8ed80f2e376ca6874dfd64f7.tar.gz
vyos-cloud-init-b029dcefe1ed33be8ed80f2e376ca6874dfd64f7.zip
network: do not write interface as 'auto' from ip= on command line.
When ip= on the kernel command line defines the networking, set those network devices to be manually controlled, instead of 'auto'. The reason for this is that if they're marked as 'auto': a.) a second attempt will be made to ifup them. b.) they'll be brought down on shutdown 'b' is problematic on network root filesystem. Also this picks up 2 changes from curtin's net module: - Cleanup newline logic so we always have a clean '\n\n' between stanza - Add a unittest to validate bonding network config render, specifically when to emit auto $iface for dependent bond slaves. LP: #1568637
Diffstat (limited to 'tests')
-rw-r--r--tests/unittests/test_net.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/unittests/test_net.py b/tests/unittests/test_net.py
index dfb31710..09235c4d 100644
--- a/tests/unittests/test_net.py
+++ b/tests/unittests/test_net.py
@@ -33,6 +33,7 @@ DHCP_EXPECTED_1 = {
'name': 'eth0',
'type': 'physical',
'subnets': [{'broadcast': '192.168.122.255',
+ 'control': 'manual',
'gateway': '192.168.122.1',
'dns_search': ['foo.com'],
'type': 'dhcp',
@@ -59,7 +60,8 @@ DOMAINSEARCH='foo.com'
STATIC_EXPECTED_1 = {
'name': 'eth1',
'type': 'physical',
- 'subnets': [{'broadcast': '10.0.0.255', 'gateway': '10.0.0.1',
+ 'subnets': [{'broadcast': '10.0.0.255', 'control': 'manual',
+ 'gateway': '10.0.0.1',
'dns_search': ['foo.com'], 'type': 'static',
'netmask': '255.255.255.0',
'dns_nameservers': ['10.0.1.1']}],