aboutsummaryrefslogtreecommitdiff
path: root/util.py
diff options
context:
space:
mode:
authorSteve McIntyre <steve.mcintyre@linaro.org>2015-01-23 18:07:05 +0000
committerSteve McIntyre <steve.mcintyre@linaro.org>2015-01-23 18:07:05 +0000
commit97f5e87945c93bf4ce0f9b314759f98a2d9ad25c (patch)
tree4769120cd3c7798fd6ba2e7d3577192bd6c84d5e /util.py
parent5b0de003d8514b941679c1c1825c31470a38c2f6 (diff)
Don't attempt to remove the default VLAN from a trunk port
It won't work, and causes errors. Change-Id: Ie66630a825a247ecdd5f1620ce0be8fda3e2755e
Diffstat (limited to 'util.py')
-rw-r--r--util.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/util.py b/util.py
index 463b91d..3118707 100644
--- a/util.py
+++ b/util.py
@@ -462,10 +462,11 @@ class VlanUtil:
print "But it has no VLANs defined on port %s" % port.name
vlans = []
else:
- print 'Found %d vlans that need dropping on port %s' % (len(vlans), port.name)
+ print 'Found %d vlans that may need dropping on port %s' % (len(vlans), port.name)
for vlan in vlans:
- s.port_remove_trunk_from_vlan(port.name, vlan)
+ if vlan != state.config.vland.default_vlan_tag:
+ s.port_remove_trunk_from_vlan(port.name, vlan)
s.port_add_trunk_to_vlan(port.name, base_vlan_tag)
s.port_set_mode(port.name, "access")