Add TopoRouteService to the list of modules to be loaded on startup.
diff --git a/src/main/java/net/floodlightcontroller/core/FloodlightProvider.java b/src/main/java/net/floodlightcontroller/core/FloodlightProvider.java
index ec5e7e3..5c847b7 100644
--- a/src/main/java/net/floodlightcontroller/core/FloodlightProvider.java
+++ b/src/main/java/net/floodlightcontroller/core/FloodlightProvider.java
@@ -10,6 +10,7 @@
import net.floodlightcontroller.core.module.FloodlightModuleException;
import net.floodlightcontroller.core.module.IFloodlightModule;
import net.floodlightcontroller.core.module.IFloodlightService;
+import net.floodlightcontroller.core.INetMapTopologyService.ITopoRouteService;
import net.floodlightcontroller.counter.ICounterStoreService;
import net.floodlightcontroller.flowcache.IFlowService;
import net.floodlightcontroller.mastership.IMastershipService;
@@ -53,6 +54,7 @@
dependencies.add(IThreadPoolService.class);
dependencies.add(IMastershipService.class);
dependencies.add(IFlowService.class);
+ dependencies.add(ITopoRouteService.class);
return dependencies;
}
@@ -70,6 +72,7 @@
context.getServiceImpl(IThreadPoolService.class));
controller.setMastershipService(context.getServiceImpl(IMastershipService.class));
controller.setFlowService(context.getServiceImpl(IFlowService.class));
+ controller.setTopoRouteService(context.getServiceImpl(ITopoRouteService.class));
controller.init(context.getConfigParams(this));
}
diff --git a/src/main/java/net/floodlightcontroller/core/INetMapTopologyService.java b/src/main/java/net/floodlightcontroller/core/INetMapTopologyService.java
index 937c551..a3eb830 100644
--- a/src/main/java/net/floodlightcontroller/core/INetMapTopologyService.java
+++ b/src/main/java/net/floodlightcontroller/core/INetMapTopologyService.java
@@ -2,6 +2,7 @@
import java.util.List;
+import net.floodlightcontroller.core.module.IFloodlightService;
import net.floodlightcontroller.core.INetMapTopologyObjects.IDeviceObject;
import net.floodlightcontroller.core.INetMapTopologyObjects.IPortObject;
import net.floodlightcontroller.core.INetMapTopologyObjects.ISwitchObject;
@@ -29,7 +30,7 @@
Iterable<IDeviceObject> getDevicesOnSwitch(String dpid, short port_num);
}
- public interface ITopoRouteService {
+ public interface ITopoRouteService extends IFloodlightService {
List<NodePortTuple> getShortestPath(NodePortTuple src, NodePortTuple dest);
Boolean routeExists(NodePortTuple src, NodePortTuple dest);
}
diff --git a/src/main/java/net/floodlightcontroller/core/internal/Controller.java b/src/main/java/net/floodlightcontroller/core/internal/Controller.java
index 74e5fcf..cbcd9a0 100644
--- a/src/main/java/net/floodlightcontroller/core/internal/Controller.java
+++ b/src/main/java/net/floodlightcontroller/core/internal/Controller.java
@@ -58,6 +58,7 @@
import net.floodlightcontroller.core.IOFSwitch;
import net.floodlightcontroller.core.IOFSwitchFilter;
import net.floodlightcontroller.core.IOFSwitchListener;
+import net.floodlightcontroller.core.INetMapTopologyService.ITopoRouteService;
import net.floodlightcontroller.core.ISwitchStorage.SwitchState;
import net.floodlightcontroller.core.annotations.LogMessageDoc;
import net.floodlightcontroller.core.annotations.LogMessageDocs;
@@ -192,6 +193,7 @@
protected IThreadPoolService threadPool;
protected IMastershipService masterHelper;
protected IFlowService flowService;
+ protected ITopoRouteService topoRouteService;
// Configuration options
protected int openFlowPort = 6633;
@@ -401,6 +403,10 @@
public void setFlowService(IFlowService serviceImpl) {
this.flowService = serviceImpl;
}
+
+ public void setTopoRouteService(ITopoRouteService serviceImpl) {
+ this.topoRouteService = serviceImpl;
+ }
@Override
public Role getRole() {