Organize intent packages
- Removed unused Intent classes
- Changed package of PersistIntent class from intent.persist to intent.runtime
Change-Id: I5dc72b272e6ad47c41f4ee0493e4a8a7e783fc61
diff --git a/src/main/java/net/onrc/onos/intent/runtime/IntentRuntime.java b/src/main/java/net/onrc/onos/intent/runtime/IntentRuntime.java
deleted file mode 100644
index 567986e..0000000
--- a/src/main/java/net/onrc/onos/intent/runtime/IntentRuntime.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package net.onrc.onos.intent.runtime;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Map;
-
-import net.floodlightcontroller.core.IFloodlightProviderService;
-import net.floodlightcontroller.core.module.FloodlightModuleContext;
-import net.floodlightcontroller.core.module.FloodlightModuleException;
-import net.floodlightcontroller.core.module.IFloodlightModule;
-import net.floodlightcontroller.core.module.IFloodlightService;
-import net.floodlightcontroller.restserver.IRestApiService;
-import net.onrc.onos.ofcontroller.networkgraph.INetworkGraphService;
-
-public class IntentRuntime implements IFloodlightModule {
- protected volatile IFloodlightProviderService floodlightProvider;
- protected volatile INetworkGraphService networkGraph;
- protected volatile IRestApiService restApi;
-
- @Override
- public void init(FloodlightModuleContext context)
- throws FloodlightModuleException {
- floodlightProvider = context.getServiceImpl(IFloodlightProviderService.class);
- networkGraph = context.getServiceImpl(INetworkGraphService.class);
- restApi = context.getServiceImpl(IRestApiService.class);
- }
-
- @Override
- public void startUp(FloodlightModuleContext context) {
- restApi.addRestletRoutable(new IntentWebRoutable());
- }
-
- @Override
- public Collection<Class<? extends IFloodlightService>> getModuleDependencies() {
- Collection<Class<? extends IFloodlightService>> l =
- new ArrayList<Class<? extends IFloodlightService>>();
- l.add(IFloodlightProviderService.class);
- l.add(INetworkGraphService.class);
- l.add(IRestApiService.class);
- return l;
- }
-
- @Override
- public Collection<Class<? extends IFloodlightService>> getModuleServices() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public Map<Class<? extends IFloodlightService>, IFloodlightService> getServiceImpls() {
- // TODO Auto-generated method stub
- return null;
- }
-
-}
diff --git a/src/main/java/net/onrc/onos/intent/runtime/IntentWebRoutable.java b/src/main/java/net/onrc/onos/intent/runtime/IntentWebRoutable.java
deleted file mode 100644
index 533b55b..0000000
--- a/src/main/java/net/onrc/onos/intent/runtime/IntentWebRoutable.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package net.onrc.onos.intent.runtime;
-
-import org.restlet.Context;
-import org.restlet.Restlet;
-import org.restlet.routing.Router;
-
-import net.floodlightcontroller.restserver.RestletRoutable;
-
-public class IntentWebRoutable implements RestletRoutable {
-
- @Override
- public Restlet getRestlet(Context context) {
- Router router = new Router(context);
- // TODO: add routes
- return router;
- }
-
- @Override
- public String basePath() {
- return "/wm/onos/intent";
- }
-
-}
diff --git a/src/main/java/net/onrc/onos/intent/runtime/PathCalcRuntimeModule.java b/src/main/java/net/onrc/onos/intent/runtime/PathCalcRuntimeModule.java
index f93e4ae..e5fded0 100755
--- a/src/main/java/net/onrc/onos/intent/runtime/PathCalcRuntimeModule.java
+++ b/src/main/java/net/onrc/onos/intent/runtime/PathCalcRuntimeModule.java
@@ -29,7 +29,6 @@
import net.onrc.onos.intent.PathIntent;
import net.onrc.onos.intent.PathIntentMap;
import net.onrc.onos.intent.ShortestPathIntent;
-import net.onrc.onos.intent.persist.PersistIntent;
import net.onrc.onos.ofcontroller.networkgraph.DeviceEvent;
import net.onrc.onos.ofcontroller.networkgraph.INetworkGraphListener;
import net.onrc.onos.ofcontroller.networkgraph.INetworkGraphService;
diff --git a/src/main/java/net/onrc/onos/intent/persist/PersistIntent.java b/src/main/java/net/onrc/onos/intent/runtime/PersistIntent.java
similarity index 98%
rename from src/main/java/net/onrc/onos/intent/persist/PersistIntent.java
rename to src/main/java/net/onrc/onos/intent/runtime/PersistIntent.java
index a5af79b..16e6ea4 100755
--- a/src/main/java/net/onrc/onos/intent/persist/PersistIntent.java
+++ b/src/main/java/net/onrc/onos/intent/runtime/PersistIntent.java
@@ -2,7 +2,7 @@
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
-package net.onrc.onos.intent.persist;
+package net.onrc.onos.intent.runtime;
import com.esotericsoftware.kryo.Kryo;
import com.esotericsoftware.kryo.io.Output;
diff --git a/src/test/java/net/onrc/onos/intent/runtime/PathCalcRuntimeModuleTest.java b/src/test/java/net/onrc/onos/intent/runtime/PathCalcRuntimeModuleTest.java
index 972da69..6b146ca 100644
--- a/src/test/java/net/onrc/onos/intent/runtime/PathCalcRuntimeModuleTest.java
+++ b/src/test/java/net/onrc/onos/intent/runtime/PathCalcRuntimeModuleTest.java
@@ -8,7 +8,6 @@
import net.onrc.onos.intent.*;
import net.onrc.onos.intent.Intent.IntentState;
import net.onrc.onos.intent.IntentOperation.Operator;
-import net.onrc.onos.intent.persist.PersistIntent;
import net.onrc.onos.ofcontroller.networkgraph.INetworkGraphListener;
import net.onrc.onos.ofcontroller.networkgraph.INetworkGraphService;
import net.onrc.onos.registry.controller.IControllerRegistryService;
diff --git a/src/test/java/net/onrc/onos/intent/runtime/UseCaseTest.java b/src/test/java/net/onrc/onos/intent/runtime/UseCaseTest.java
index 5ac6027..c746811 100755
--- a/src/test/java/net/onrc/onos/intent/runtime/UseCaseTest.java
+++ b/src/test/java/net/onrc/onos/intent/runtime/UseCaseTest.java
@@ -21,7 +21,6 @@
import net.onrc.onos.intent.PathIntent;
import net.onrc.onos.intent.PathIntentMap;
import net.onrc.onos.intent.ShortestPathIntent;
-import net.onrc.onos.intent.persist.PersistIntent;
import net.onrc.onos.ofcontroller.networkgraph.DeviceEvent;
import net.onrc.onos.ofcontroller.networkgraph.INetworkGraphListener;
import net.onrc.onos.ofcontroller.networkgraph.INetworkGraphService;