Skip to content
Snippets Groups Projects
Commit e1b829b6 authored by Srinivasan Ramasubramanian's avatar Srinivasan Ramasubramanian
Browse files

TopologyManager should not process switch removed and port down messages...

TopologyManager should not process switch removed and port down messages explicitly as they are processed by link discovery module and generate corresponding link removed events.
parent 8c5a4bd3
No related branches found
No related tags found
No related merge requests found
......@@ -837,12 +837,18 @@ public class TopologyManager implements
return Command.STOP;
}
/**
* Updates concerning switch disconnect and port down are not processed.
* LinkDiscoveryManager is expected to process those messages and send
* multiple link removed messages. However, all the updates from
* LinkDiscoveryManager would be propagated to the listeners of topology.
*/
@LogMessageDoc(level="ERROR",
message="Error reading link discovery update.",
explanation="Unable to process link discovery update",
recommendation=LogMessageDoc.REPORT_CONTROLLER_BUG)
public void applyUpdates() {
appliedUpdates.clear();
LDUpdate update = null;
while (ldUpdates.peek() != null) {
......@@ -861,12 +867,7 @@ public class TopologyManager implements
} else if (update.getOperation() == UpdateOperation.LINK_REMOVED){
removeLink(update.getSrc(), update.getSrcPort(),
update.getDst(), update.getDstPort());
} else if (update.getOperation() == UpdateOperation.SWITCH_REMOVED) {
removeSwitch(update.getSrc());
} else if (update.getOperation() == UpdateOperation.PORT_DOWN) {
removeSwitchPort(update.getSrc(), update.getSrcPort());
}
// Add to the list of applied updates.
appliedUpdates.add(update);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment