From: Ondrej Lichtner <olichtne(a)redhat.com>
When I implemented the team configuration through NM I forgot about port
configuration of team slaves. This commit fixes that.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Slave/NmConfigDevice.py | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/lnst/Slave/NmConfigDevice.py b/lnst/Slave/NmConfigDevice.py
index affb0a9..4901729 100644
--- a/lnst/Slave/NmConfigDevice.py
+++ b/lnst/Slave/NmConfigDevice.py
@@ -748,6 +748,11 @@ class NmConfigDeviceTeam(NmConfigDeviceGeneric):
hw_addr = self._convert_hwaddr(netdev)
+ teamd_port_config = get_slave_option(self._netdev,
+ slave, "teamd_port_config")
+ if teamd_port_config == None:
+ teamd_port_config = ""
+
s_eth = dbus.Dictionary({
'duplex': dbus.Array('full', 's'),
'mac-address': hw_addr})
@@ -760,9 +765,13 @@ class NmConfigDeviceTeam(NmConfigDeviceGeneric):
'master': self._netdev["master_uuid"],
'slave-type': 'team'})
+ s_port_cfg = dbus.Dictionary({
+ 'config': teamd_port_config})
+
slave_con = dbus.Dictionary({
'802-3-ethernet': s_eth,
- 'connection': s_slave_con})
+ 'connection': s_slave_con,
+ 'team-port': s_port_cfg})
netdev["con_obj_path"] = self._nm_add_connection(slave_con)
--
1.8.3.1
Show replies by date