summaryrefslogtreecommitdiffstats
path: root/os_net_config/objects.py
diff options
context:
space:
mode:
authorDan Sneddon <dsneddon@redhat.com>2016-03-08 16:35:33 -0800
committerDan Sneddon <dsneddon@redhat.com>2016-03-11 10:22:36 -0800
commitb0b09a65b68fa0297538bfbcc40c15655617721e (patch)
tree527f51d477c1cb08f2ae972e589ae7927c5409fe /os_net_config/objects.py
parent63659fe4a60dfb18bbc8cc835d6d1c4fe7317a60 (diff)
Fix hierarchy for Linux Bonds and Linux Bridges
This change cleans up some of the Linux Bond and Linux Bridge logic that processes member interfaces and VLANs. One bug is fixed, where a VLAN might be assigned as a slave interface on a bond. Changes were made so that if VLANs are placed under a Linux Bond, the PHYSDEV is set to the bond, so the device: does not need to be specified in the config. This change ensures that if a bridge has a bond and VLANs as members, that the VLAN will be a member of the bridge and not the bond. Change-Id: Id329737f0032e781b111741086ded83f378297a7
Diffstat (limited to 'os_net_config/objects.py')
-rw-r--r--os_net_config/objects.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/os_net_config/objects.py b/os_net_config/objects.py
index 2b6d4bf..4f3e0d5 100644
--- a/os_net_config/objects.py
+++ b/os_net_config/objects.py
@@ -171,6 +171,7 @@ class _BaseOpts(object):
self.bridge_name = None # internal
self.linux_bridge_name = None # internal
self.ivs_bridge_name = None # internal
+ self.linux_bond_name = None # internal
self.ovs_port = False # internal
self.primary_interface_name = None # internal
@@ -515,6 +516,7 @@ class LinuxBond(_BaseOpts):
self.members = members
self.bonding_options = bonding_options
for member in self.members:
+ member.linux_bond_name = name
if member.primary:
if self.primary_interface_name:
msg = 'Only one primary interface allowed per bond.'