Merged registry code into master
diff --git a/src/main/java/net/floodlightcontroller/core/FloodlightProvider.java b/src/main/java/net/floodlightcontroller/core/FloodlightProvider.java
index 5c847b7..cd15927 100644
--- a/src/main/java/net/floodlightcontroller/core/FloodlightProvider.java
+++ b/src/main/java/net/floodlightcontroller/core/FloodlightProvider.java
@@ -13,11 +13,11 @@
import net.floodlightcontroller.core.INetMapTopologyService.ITopoRouteService;
import net.floodlightcontroller.counter.ICounterStoreService;
import net.floodlightcontroller.flowcache.IFlowService;
-import net.floodlightcontroller.mastership.IMastershipService;
import net.floodlightcontroller.perfmon.IPktInProcessingTimeService;
import net.floodlightcontroller.restserver.IRestApiService;
import net.floodlightcontroller.storage.IStorageSourceService;
import net.floodlightcontroller.threadpool.IThreadPoolService;
+import net.onrc.onos.registry.controller.IControllerRegistryService;
public class FloodlightProvider implements IFloodlightModule {
Controller controller;
@@ -52,9 +52,10 @@
dependencies.add(IRestApiService.class);
dependencies.add(ICounterStoreService.class);
dependencies.add(IThreadPoolService.class);
- dependencies.add(IMastershipService.class);
dependencies.add(IFlowService.class);
dependencies.add(ITopoRouteService.class);
+ dependencies.add(IControllerRegistryService.class);
+
return dependencies;
}
@@ -70,9 +71,11 @@
context.getServiceImpl(IRestApiService.class));
controller.setThreadPoolService(
context.getServiceImpl(IThreadPoolService.class));
- controller.setMastershipService(context.getServiceImpl(IMastershipService.class));
controller.setFlowService(context.getServiceImpl(IFlowService.class));
controller.setTopoRouteService(context.getServiceImpl(ITopoRouteService.class));
+ controller.setMastershipService(
+ context.getServiceImpl(IControllerRegistryService.class));
+
controller.init(context.getConfigParams(this));
}
diff --git a/src/main/java/net/floodlightcontroller/core/internal/Controller.java b/src/main/java/net/floodlightcontroller/core/internal/Controller.java
index cbcd9a0..78b93ed 100644
--- a/src/main/java/net/floodlightcontroller/core/internal/Controller.java
+++ b/src/main/java/net/floodlightcontroller/core/internal/Controller.java
@@ -67,7 +67,6 @@
import net.floodlightcontroller.core.web.CoreWebRoutable;
import net.floodlightcontroller.counter.ICounterStoreService;
import net.floodlightcontroller.flowcache.IFlowService;
-import net.floodlightcontroller.mastership.IMastershipService;
import net.floodlightcontroller.packet.Ethernet;
import net.floodlightcontroller.perfmon.IPktInProcessingTimeService;
import net.floodlightcontroller.restserver.IRestApiService;
@@ -77,6 +76,7 @@
import net.floodlightcontroller.storage.OperatorPredicate;
import net.floodlightcontroller.storage.StorageException;
import net.floodlightcontroller.threadpool.IThreadPoolService;
+import net.onrc.onos.registry.controller.IControllerRegistryService;
import org.jboss.netty.bootstrap.ServerBootstrap;
import org.jboss.netty.buffer.ChannelBuffer;
@@ -191,9 +191,9 @@
protected IStorageSourceService storageSource;
protected IPktInProcessingTimeService pktinProcTime;
protected IThreadPoolService threadPool;
- protected IMastershipService masterHelper;
protected IFlowService flowService;
protected ITopoRouteService topoRouteService;
+ protected IControllerRegistryService masterHelper;
// Configuration options
protected int openFlowPort = 6633;
@@ -396,10 +396,6 @@
this.threadPool = tp;
}
- public void setMastershipService(IMastershipService serviceImpl) {
- this.masterHelper = serviceImpl;
- }
-
public void setFlowService(IFlowService serviceImpl) {
this.flowService = serviceImpl;
}
@@ -407,6 +403,10 @@
public void setTopoRouteService(ITopoRouteService serviceImpl) {
this.topoRouteService = serviceImpl;
}
+
+ public void setMastershipService(IControllerRegistryService serviceImpl) {
+ this.masterHelper = serviceImpl;
+ }
@Override
public Role getRole() {