Merge branch 'master' of github.com:OPENNETWORKINGLAB/ONOS
Conflicts:
web/topology_rest.py
diff --git a/src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkDiscoveryManager.java b/src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkDiscoveryManager.java
index a9a2212..11643fa 100644
--- a/src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkDiscoveryManager.java
+++ b/src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkDiscoveryManager.java
@@ -82,7 +82,10 @@
import net.floodlightcontroller.topology.NodePortTuple;
import net.floodlightcontroller.util.EventHistory;
import net.floodlightcontroller.util.EventHistory.EvAction;
+
import net.onrc.onos.registry.controller.IControllerRegistryService;
+import net.onrc.onos.registry.controller.IControllerRegistryService.ControlChangeCallback;
+import net.onrc.onos.registry.controller.RegistryException;
import org.openflow.protocol.OFMessage;
import org.openflow.protocol.OFPacketIn;
@@ -127,12 +130,6 @@
IStorageSourceListener, ILinkDiscoveryService,
IFloodlightModule, IInfoProvider, IHAListener {
protected static Logger log = LoggerFactory.getLogger(LinkDiscoveryManager.class);
-
- protected enum NetworkMapOperation {
- NONE,
- INSERT,
- UPDATE
- }
// Names of table/fields for links in the storage API
private static final String LINK_TABLE_NAME = "controller_link";
@@ -1028,7 +1025,6 @@
NodePortTuple srcNpt, dstNpt;
boolean linkChanged = false;
- NetworkMapOperation operation = NetworkMapOperation.NONE;
lock.writeLock().lock();
try {
@@ -1077,8 +1073,7 @@
writeLinkToStorage(lt, newInfo);
// Write link to network map
- operation = NetworkMapOperation.INSERT;
- //linkStore.update(lt, newInfo, DM_OPERATION.INSERT);
+ linkStore.update(lt, newInfo, DM_OPERATION.INSERT);
updateOperation = UpdateOperation.LINK_UPDATED;
linkChanged = true;
@@ -1137,8 +1132,7 @@
writeLinkToStorage(lt, newInfo);
// Write link to network map
- operation = NetworkMapOperation.UPDATE;
- //linkStore.update(lt, newInfo, DM_OPERATION.UPDATE);
+ linkStore.update(lt, newInfo, DM_OPERATION.UPDATE);
if (linkChanged) {
updateOperation = getUpdateOperation(newInfo.getSrcPortState(),
@@ -1168,18 +1162,6 @@
} finally {
lock.writeLock().unlock();
}
-
- switch (operation){
- case INSERT:
- linkStore.update(lt, newInfo, DM_OPERATION.INSERT);
- break;
- case UPDATE:
- linkStore.update(lt, newInfo, DM_OPERATION.UPDATE);
- break;
- case NONE:
- default:
- break;
- }
return linkChanged;
}