aboutsummaryrefslogtreecommitdiffstats
path: root/os_net_config/tests/test_impl_ifcfg.py
diff options
context:
space:
mode:
authorDan Prince <dprince@redhat.com>2015-05-14 14:58:10 -0400
committerDan Prince <dprince@redhat.com>2015-06-03 21:42:34 -0400
commit90f15e38f1e4d80b81f4fa1444dde717917ef8ad (patch)
treed3eb59c7291e3efff2b98182d456ec55719ca2e4 /os_net_config/tests/test_impl_ifcfg.py
parent6f2f62b73b165f1fc431cff0656d70adfe97e4a0 (diff)
ifcfg: don't set VLAN=yes if is an ovs_port
When using the ifcfg provider vlans on bridges (or bonds) fail to startup correctly. This is because VLANs on an OVS bridge are configured as internal ports and these should not have the VLAN=yes or PHYSDEV ifcfg settings specified. Change-Id: Ieb743eda8f0a25cdaca43bdea767af26bf504f15 Closes-bug: #1453904
Diffstat (limited to 'os_net_config/tests/test_impl_ifcfg.py')
-rw-r--r--os_net_config/tests/test_impl_ifcfg.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/os_net_config/tests/test_impl_ifcfg.py b/os_net_config/tests/test_impl_ifcfg.py
index f43faed..4aa9f09 100644
--- a/os_net_config/tests/test_impl_ifcfg.py
+++ b/os_net_config/tests/test_impl_ifcfg.py
@@ -91,14 +91,21 @@ VLAN=yes
PHYSDEV=em1
"""
+# vlans on an OVS bridge do not set VLAN=yes or PHYSDEV
+_BASE_VLAN_OVS = """# This file is autogenerated by os-net-config
+DEVICE=vlan5
+ONBOOT=yes
+HOTPLUG=no
+NM_CONTROLLED=no
+"""
_VLAN_NO_IP = _BASE_VLAN + "BOOTPROTO=none\n"
-_VLAN_OVS = _BASE_VLAN + "DEVICETYPE=ovs\nBOOTPROTO=none\n"
+_VLAN_OVS = _BASE_VLAN_OVS + "DEVICETYPE=ovs\nBOOTPROTO=none\n"
-_VLAN_OVS_BRIDGE = _BASE_VLAN + """DEVICETYPE=ovs
+_VLAN_OVS_BRIDGE = _BASE_VLAN_OVS + """DEVICETYPE=ovs
TYPE=OVSIntPort
OVS_BRIDGE=br-ctlplane
OVS_OPTIONS="tag=5"