Skip to content
Snippets Groups Projects
Commit d97bcb3b authored by Saurav Das's avatar Saurav Das
Browse files

Controller: disabling the deletion of old ports for now

parent efcfc513
No related branches found
No related tags found
No related merge requests found
......@@ -1714,9 +1714,9 @@ public class Controller implements IFloodlightProviderService,
IResultSet portResultSet =
storageSource.executeQuery(PORT_TABLE_NAME,
null, op, null);
Map<Short, OFPhysicalPort> oldports =
new HashMap<Short, OFPhysicalPort>();
oldports.putAll(sw.getPorts());
//Map<Short, OFPhysicalPort> oldports =
// new HashMap<Short, OFPhysicalPort>();
//oldports.putAll(sw.getPorts());
while (portResultSet.next()) {
try {
......@@ -1735,16 +1735,16 @@ public class Controller implements IFloodlightProviderService,
getLong(PORT_SUPPORTED_FEATURES));
p.setPeerFeatures((int)portResultSet.
getLong(PORT_PEER_FEATURES));
oldports.remove(Short.valueOf(p.getPortNumber()));
//oldports.remove(Short.valueOf(p.getPortNumber()));
sw.setPort(p);
} catch (NullPointerException e) {
// ignore
}
}
for (Short portNum : oldports.keySet()) {
sw.deletePort(portNum);
}
//for (Short portNum : oldports.keySet()) {
// sw.deletePort(portNum);
//}
}
protected void removePortInfo(IOFSwitch sw, short portNumber) {
......
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