Adding NetworkGraph to PlanInstallModule
Change-Id: I8c560359bd071a4a029ef5101f7d393109498273
diff --git a/src/main/java/net/onrc/onos/intent/runtime/PlanInstallModule.java b/src/main/java/net/onrc/onos/intent/runtime/PlanInstallModule.java
index df4c762..45facb5 100644
--- a/src/main/java/net/onrc/onos/intent/runtime/PlanInstallModule.java
+++ b/src/main/java/net/onrc/onos/intent/runtime/PlanInstallModule.java
@@ -18,11 +18,12 @@
import net.onrc.onos.intent.FlowEntry;
import net.onrc.onos.intent.IntentOperationList;
import net.onrc.onos.ofcontroller.flowprogrammer.IFlowPusherService;
+import net.onrc.onos.ofcontroller.networkgraph.INetworkGraphService;
import net.onrc.onos.ofcontroller.networkgraph.NetworkGraph;
public class PlanInstallModule implements IFloodlightModule {
protected volatile IFloodlightProviderService floodlightProvider;
- protected volatile NetworkGraph networkGraph;
+ protected volatile INetworkGraphService networkGraph;
protected volatile IDatagridService datagridService;
protected volatile IFlowPusherService flowPusher;
private PlanCalcRuntime planCalc;
@@ -35,11 +36,12 @@
public void init(FloodlightModuleContext context)
throws FloodlightModuleException {
floodlightProvider = context.getServiceImpl(IFloodlightProviderService.class);
- //networkGraph = context.getServiceImpl(INetworkGraphService.class);
+ networkGraph = context.getServiceImpl(INetworkGraphService.class);
datagridService = context.getServiceImpl(IDatagridService.class);
flowPusher = context.getServiceImpl(IFlowPusherService.class);
- planCalc = new PlanCalcRuntime(networkGraph);
- planInstall = new PlanInstallRuntime(networkGraph, floodlightProvider, flowPusher);
+ NetworkGraph graph = networkGraph.getNetworkGraph();
+ planCalc = new PlanCalcRuntime(graph);
+ planInstall = new PlanInstallRuntime(graph, floodlightProvider, flowPusher);
eventListener = new EventListener();
}
@@ -95,7 +97,7 @@
Collection<Class<? extends IFloodlightService>> l =
new ArrayList<Class<? extends IFloodlightService>>();
l.add(IFloodlightProviderService.class);
-// l.add(INetworkGraphService.class);
+ l.add(INetworkGraphService.class);
l.add(IDatagridService.class);
l.add(IFlowPusherService.class);
return l;