[PATCH] NetConfigDevice: set team slaves up
olichtne at redhat.com
olichtne at redhat.com
Thu Aug 23 09:21:35 UTC 2012
From: Ondrej Lichtner <olichtne at redhat.com>
In case team slaves were specified both in teamd_config and using
<slave> tags, their state was not correctly set to UP.
This commit fixes that.
Signed-off-by: Ondrej Lichtner <olichtne at redhat.com>
---
NetConfig/NetConfigDevice.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/NetConfig/NetConfigDevice.py b/NetConfig/NetConfigDevice.py
index 24799b5..2dd8d1a 100644
--- a/NetConfig/NetConfigDevice.py
+++ b/NetConfig/NetConfigDevice.py
@@ -234,6 +234,11 @@ class NetConfigDeviceTeam(NetConfigDeviceGeneric):
port_netdev = self._config[slave_id]
NetConfigDevice(port_netdev, self._config).down()
+ def _ports_up(self):
+ for slave_id in get_slaves(self._netdev):
+ port_netdev = self._config[slave_id]
+ NetConfigDevice(port_netdev, self._config).up()
+
def configure(self):
self._ports_down()
@@ -250,6 +255,7 @@ class NetConfigDeviceTeam(NetConfigDeviceGeneric):
for slave_id in get_slaves(self._netdev):
self.slave_add(slave_id)
+ self._ports_up()
def deconfigure(self):
for slave_id in get_slaves(self._netdev):
--
1.7.11.4
More information about the LNST-developers
mailing list