aboutsummaryrefslogtreecommitdiff
path: root/util.py
diff options
context:
space:
mode:
authorSteve McIntyre <steve.mcintyre@linaro.org>2015-09-03 18:10:33 +0100
committerSteve McIntyre <steve.mcintyre@linaro.org>2015-09-03 18:10:33 +0100
commit36ae6ac2bf0006a9522b4820ac12cde87f9a27f7 (patch)
treecadeeac928e6de0bfbd5ceea4573a9c6fe30e47b /util.py
parent2a5df9776a26d233acedebbda904475fd8056982 (diff)
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
Diffstat (limited to 'util.py')
-rw-r--r--util.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/util.py b/util.py
index a35a6bb..e537256 100644
--- a/util.py
+++ b/util.py
@@ -505,7 +505,8 @@ class VlanUtil:
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')