RouteResource is now rewritten using ONOS, moving to ONOS pacakge
diff --git a/src/main/java/net/floodlightcontroller/topology/web/RouteResource.java b/src/main/java/net/floodlightcontroller/topology/web/RouteResource.java
deleted file mode 100644
index e7619d0..0000000
--- a/src/main/java/net/floodlightcontroller/topology/web/RouteResource.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package net.floodlightcontroller.topology.web;
-
-import net.onrc.onos.ofcontroller.core.INetMapTopologyService.ITopoRouteService;
-import net.onrc.onos.ofcontroller.util.DataPath;
-import net.onrc.onos.ofcontroller.util.Dpid;
-import net.onrc.onos.ofcontroller.util.Port;
-import net.onrc.onos.ofcontroller.util.SwitchPort;
-
-import org.restlet.resource.Get;
-import org.restlet.resource.ServerResource;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class RouteResource extends ServerResource {
-
- protected static Logger log = LoggerFactory.getLogger(RouteResource.class);
-
- @Get("json")
- public DataPath retrieve() {
- ITopoRouteService topoRouteService =
- (ITopoRouteService)getContext().getAttributes().
- get(ITopoRouteService.class.getCanonicalName());
- if (topoRouteService == null) {
- log.debug("Topology Route Service not found");
- return null;
- }
-
- String srcDpidStr = (String) getRequestAttributes().get("src-dpid");
- String srcPortStr = (String) getRequestAttributes().get("src-port");
- String dstDpidStr = (String) getRequestAttributes().get("dst-dpid");
- String dstPortStr = (String) getRequestAttributes().get("dst-port");
-
- log.debug( srcDpidStr + "--" + srcPortStr + "--" + dstDpidStr + "--" + dstPortStr);
-
- Dpid srcDpid = new Dpid(srcDpidStr);
- Port srcPort = new Port(Short.parseShort(srcPortStr));
- Dpid dstDpid = new Dpid(dstDpidStr);
- Port dstPort = new Port(Short.parseShort(dstPortStr));
-
- DataPath result =
- topoRouteService.getShortestPath(new SwitchPort(srcDpid, srcPort),
- new SwitchPort(dstDpid, dstPort));
- if (result != null) {
- return result;
- } else {
- log.debug("ERROR! no route found");
- return null;
- }
- }
-}
diff --git a/src/main/java/net/floodlightcontroller/topology/web/TopologyWebRoutable.java b/src/main/java/net/floodlightcontroller/topology/web/TopologyWebRoutable.java
index 7989413..c45c729 100644
--- a/src/main/java/net/floodlightcontroller/topology/web/TopologyWebRoutable.java
+++ b/src/main/java/net/floodlightcontroller/topology/web/TopologyWebRoutable.java
@@ -5,6 +5,7 @@
import net.floodlightcontroller.linkdiscovery.web.LinksResource;
import net.floodlightcontroller.restserver.RestletRoutable;
+import net.onrc.onos.ofcontroller.topology.web.RouteResource;
public class TopologyWebRoutable implements RestletRoutable {
/**