Commit e20d093a authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

When mapping vlans to switches, be sure to include ports

already on switches, since it might be a remove/modify op.
parent 31812eae
......@@ -348,7 +348,7 @@ sub getExperimentCurrentTrunks($$) {
}
#
# Returns an an array of ports (in node:card form) that currently in
# Returns an an array of ports (in node:card form) that are currently in
# the given vlan.
#
sub getExperimentVlanPorts($) {
......@@ -1129,6 +1129,18 @@ sub mapVlansToSwitches(@)
$devices{$device} = 1;
}
#
# Add in the ports that we think are already in the vlan, since
# this might be a remove/modify operation. Can probably optimize
# this.
#
@ports = getExperimentVlanPorts($vlan_id);
%map = mapPortsToDevices(@ports);
foreach my $device (keys %map) {
$devices{$device} = 1;
}
#
# Find out every switch which might have to transit this VLAN through
# its trunks.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment