Bug fix when changing ports from access to trunk mode
Don't attempt to add the trunk to the default VLAN; it's already going
to be there.
Change-Id: Id06ddf000eae7d6e5f9725a251dd057a150f9ca6
diff --git a/util.py b/util.py
index a35a6bb..e537256 100644
--- a/util.py
+++ b/util.py
@@ -505,7 +505,8 @@
else:
vlans = db.all_vlans()
for vlan in vlans:
- s.port_add_trunk_to_vlan(port.name, vlan.tag)
+ if vlan != state.config.vland.default_vlan_tag:
+ s.port_add_trunk_to_vlan(port.name, vlan.tag)
except IOError:
logging.error('set_port_mode failed, resetting switch to recover')