commit 1174ba74009d4ead271d8cde51dd4f708fe2d643
Author: Jan Tluka <jtluka(a)redhat.com>
Date: Tue Jan 14 11:05:08 2014 +0100
Fix empty team port bug
Team daemon refuses to update port configuration with empty string. This
patch fixes this issue and passes the config only if it has been
specified in the recipe.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
lnst/Slave/NmConfigDevice.py | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/lnst/Slave/NmConfigDevice.py b/lnst/Slave/NmConfigDevice.py
index bf488cb..396dea8 100644
--- a/lnst/Slave/NmConfigDevice.py
+++ b/lnst/Slave/NmConfigDevice.py
@@ -750,8 +750,6 @@ class NmConfigDeviceTeam(NmConfigDeviceGeneric):
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'),
@@ -765,13 +763,14 @@ 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,
- 'team-port': s_port_cfg})
+ 'connection': s_slave_con})
+
+ if teamd_port_config != None:
+ s_port_cfg = dbus.Dictionary({
+ 'config': teamd_port_config})
+ slave_con['team-port'] = s_port_cfg
netdev["con_obj_path"] = self._nm_add_connection(slave_con)
Show replies by date