aboutsummaryrefslogtreecommitdiff
path: root/util.py
diff options
context:
space:
mode:
authorSteve McIntyre <steve.mcintyre@linaro.org>2015-01-23 18:08:33 +0000
committerSteve McIntyre <steve.mcintyre@linaro.org>2015-01-23 18:08:33 +0000
commit574e334f41e74f29ac1d29926214e4be805d4992 (patch)
tree33a890f4ca6a4372335dea2a80d619bbdb574791 /util.py
parent97f5e87945c93bf4ce0f9b314759f98a2d9ad25c (diff)
Always set the correct mode on ports during switch import
Change-Id: I9cef69af28264d62b0c175e97cb76b769b343c1d
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 3118707..45f74fa 100644
--- a/util.py
+++ b/util.py
@@ -743,12 +743,13 @@ class VlanUtil:
print " Added port %s, got port ID %d" % (port_name, port_id)
+ db.set_port_mode(port_id, port_mode)
+
# Now, on each trunk port on the switch, we need to add all
# the VLANs already configured across our system
if not 'TrunkWildCardVlans' in s.switch_get_capabilities():
for port_id in trunk_ports:
port = db.get_port_by_id(port_id)
- db.set_port_mode(port_id, "trunk")
for vlan in db.all_vlans():
if vlan.vlan_id is not state.default_vlan_id: