Merge branch 'master' into fw
diff --git a/conf/checkstyle/sun_checks.xml b/conf/checkstyle/sun_checks.xml
new file mode 100644
index 0000000..51a7f8c
--- /dev/null
+++ b/conf/checkstyle/sun_checks.xml
@@ -0,0 +1,177 @@
+<?xml version="1.0"?>

+<!DOCTYPE module PUBLIC

+          "-//Puppy Crawl//DTD Check Configuration 1.3//EN"

+          "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">

+

+<!--

+

+  Checkstyle configuration that checks the sun coding conventions from:

+

+    - the Java Language Specification at

+      http://java.sun.com/docs/books/jls/second_edition/html/index.html

+

+    - the Sun Code Conventions at http://java.sun.com/docs/codeconv/

+

+    - the Javadoc guidelines at

+      http://java.sun.com/j2se/javadoc/writingdoccomments/index.html

+

+    - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html

+

+    - some best practices

+

+  Checkstyle is very configurable. Be sure to read the documentation at

+  http://checkstyle.sf.net (or in your downloaded distribution).

+

+  Most Checks are configurable, be sure to consult the documentation.

+

+  To completely disable a check, just comment it out or delete it from the file.

+

+  Finally, it is worth reading the documentation.

+

+-->

+

+<module name="Checker">

+    <!--

+        If you set the basedir property below, then all reported file

+        names will be relative to the specified directory. See

+        http://checkstyle.sourceforge.net/5.x/config.html#Checker

+

+        <property name="basedir" value="${basedir}"/>

+    -->

+

+    <!-- Checks that a package-info.java file exists for each package.     -->

+    <!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage -->

+    <module name="JavadocPackage"/>

+

+    <!-- Checks whether files end with a new line.                        -->

+    <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->

+    <module name="NewlineAtEndOfFile"/>

+

+    <!-- Checks that property files contain the same keys.         -->

+    <!-- See http://checkstyle.sf.net/config_misc.html#Translation -->

+    <module name="Translation"/>

+    

+    <!-- Checks for Size Violations.                    -->

+    <!-- See http://checkstyle.sf.net/config_sizes.html -->

+    <module name="FileLength"/>

+    

+    <!-- Checks for whitespace                               -->

+    <!-- See http://checkstyle.sf.net/config_whitespace.html -->

+    <module name="FileTabCharacter"/>

+

+    <!-- Miscellaneous other checks.                   -->

+    <!-- See http://checkstyle.sf.net/config_misc.html -->

+    <module name="RegexpSingleline">

+       <property name="format" value="\s+$"/>

+       <property name="minimum" value="0"/>

+       <property name="maximum" value="0"/>

+       <property name="message" value="Line has trailing spaces."/>

+    </module>

+

+    <!-- Checks for Headers                                -->

+    <!-- See http://checkstyle.sf.net/config_header.html   -->

+    <!-- <module name="Header"> -->

+    <!--   <property name="headerFile" value="${checkstyle.header.file}"/> -->

+    <!--   <property name="fileExtensions" value="java"/> -->

+    <!-- </module> -->

+

+    <module name="TreeWalker">

+

+        <!-- Checks for Javadoc comments.                     -->

+        <!-- See http://checkstyle.sf.net/config_javadoc.html -->

+        <module name="JavadocMethod"/>

+        <module name="JavadocType"/>

+        <module name="JavadocVariable"/>

+        <module name="JavadocStyle"/>

+

+

+        <!-- Checks for Naming Conventions.                  -->

+        <!-- See http://checkstyle.sf.net/config_naming.html -->

+        <module name="ConstantName"/>

+        <module name="LocalFinalVariableName"/>

+        <module name="LocalVariableName"/>

+        <module name="MemberName"/>

+        <module name="MethodName"/>

+        <module name="PackageName"/>

+        <module name="ParameterName"/>

+        <module name="StaticVariableName"/>

+        <module name="TypeName"/>

+

+

+        <!-- Checks for imports                              -->

+        <!-- See http://checkstyle.sf.net/config_import.html -->

+        <module name="AvoidStarImport"/>

+        <module name="IllegalImport"/> <!-- defaults to sun.* packages -->

+        <module name="RedundantImport"/>

+        <module name="UnusedImports"/>

+

+

+        <!-- Checks for Size Violations.                    -->

+        <!-- See http://checkstyle.sf.net/config_sizes.html -->

+        <module name="LineLength"/>

+        <module name="MethodLength"/>

+        <module name="ParameterNumber"/>

+

+

+        <!-- Checks for whitespace                               -->

+        <!-- See http://checkstyle.sf.net/config_whitespace.html -->

+        <module name="EmptyForIteratorPad"/>

+        <module name="GenericWhitespace"/>

+        <module name="MethodParamPad"/>

+        <module name="NoWhitespaceAfter"/>

+        <module name="NoWhitespaceBefore"/>

+        <module name="OperatorWrap"/>

+        <module name="ParenPad"/>

+        <module name="TypecastParenPad"/>

+        <module name="WhitespaceAfter"/>

+        <module name="WhitespaceAround"/>

+

+

+        <!-- Modifier Checks                                    -->

+        <!-- See http://checkstyle.sf.net/config_modifiers.html -->

+        <module name="ModifierOrder"/>

+        <module name="RedundantModifier"/>

+

+

+        <!-- Checks for blocks. You know, those {}'s         -->

+        <!-- See http://checkstyle.sf.net/config_blocks.html -->

+        <module name="AvoidNestedBlocks"/>

+        <module name="EmptyBlock"/>

+        <module name="LeftCurly"/>

+        <module name="NeedBraces"/>

+        <module name="RightCurly"/>

+

+

+        <!-- Checks for common coding problems               -->

+        <!-- See http://checkstyle.sf.net/config_coding.html -->

+        <module name="AvoidInlineConditionals"/>

+        <module name="EmptyStatement"/>

+        <module name="EqualsHashCode"/>

+        <module name="HiddenField"/>

+        <module name="IllegalInstantiation"/>

+        <module name="InnerAssignment"/>

+        <module name="MagicNumber"/>

+        <module name="MissingSwitchDefault"/>

+        <module name="RedundantThrows"/>

+        <module name="SimplifyBooleanExpression"/>

+        <module name="SimplifyBooleanReturn"/>

+

+        <!-- Checks for class design                         -->

+        <!-- See http://checkstyle.sf.net/config_design.html -->

+        <module name="DesignForExtension"/>

+        <module name="FinalClass"/>

+        <module name="HideUtilityClassConstructor"/>

+        <module name="InterfaceIsType"/>

+        <module name="VisibilityModifier"/>

+

+

+        <!-- Miscellaneous other checks.                   -->

+        <!-- See http://checkstyle.sf.net/config_misc.html -->

+        <module name="ArrayTypeStyle"/>

+        <module name="FinalParameters"/>

+        <module name="TodoComment"/>

+        <module name="UpperEll"/>

+

+    </module>

+

+</module>

diff --git a/pom.xml b/pom.xml
index ebed868..5b8df0c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -32,11 +32,20 @@
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <powermock.version>1.5.1</powermock.version>
     <restlet.version>2.1.4</restlet.version>
-    <github.global.server>github</github.global.server>
+    <!-- <github.global.server>github</github.global.server> -->
   </properties>
   <build>
     <plugins>
       <plugin>
+	<!-- Note: the checkstyle configuration is also in the reporting section -->
+	<groupId>org.apache.maven.plugins</groupId>
+	<artifactId>maven-checkstyle-plugin</artifactId>
+	<version>2.11</version>
+	<configuration>
+	  <configLocation>conf/checkstyle/sun_checks.xml</configLocation>
+	</configuration>
+      </plugin>
+      <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-install-plugin</artifactId>
         <version>2.3.1</version>
@@ -145,6 +154,7 @@
           </execution>
         </executions>
       </plugin>
+      <!--
       <plugin>
         <groupId>com.github.github</groupId>
         <artifactId>site-maven-plugin</artifactId>
@@ -164,6 +174,7 @@
           </execution>
         </executions>
       </plugin>
+      -->
       <plugin>
 	<artifactId>maven-assembly-plugin</artifactId>
 	<configuration>
@@ -213,6 +224,27 @@
           <locale>en</locale>
         </configuration>
       </plugin>
+      <plugin>
+	<!-- Note: the checkstyle configuration is also in the build section -->
+	<groupId>org.apache.maven.plugins</groupId>
+	<artifactId>maven-checkstyle-plugin</artifactId>
+	<version>2.11</version>
+	<configuration>
+	  <configLocation>conf/checkstyle/sun_checks.xml</configLocation>
+	</configuration>
+	<reportSets>
+	  <reportSet>
+	    <reports>
+	      <report>checkstyle</report>
+	    </reports>
+	  </reportSet>
+	</reportSets>
+      </plugin>
+      <plugin>
+	<groupId>org.apache.maven.plugins</groupId>
+	<artifactId>maven-jxr-plugin</artifactId>
+	<version>2.3</version>
+    </plugin>
     </plugins>
   </reporting>
   <dependencies>
diff --git a/src/main/java/net/floodlightcontroller/core/internal/Controller.java b/src/main/java/net/floodlightcontroller/core/internal/Controller.java
index 39bdf3c..42fb3c6 100644
--- a/src/main/java/net/floodlightcontroller/core/internal/Controller.java
+++ b/src/main/java/net/floodlightcontroller/core/internal/Controller.java
@@ -61,6 +61,7 @@
 import net.floodlightcontroller.restserver.IRestApiService;
 import net.floodlightcontroller.threadpool.IThreadPoolService;
 import net.onrc.onos.ofcontroller.core.IOFSwitchPortListener;
+import net.onrc.onos.ofcontroller.core.web.OnosInternalWebRoutable;
 import net.onrc.onos.ofcontroller.linkdiscovery.ILinkDiscoveryService;
 import net.onrc.onos.registry.controller.IControllerRegistryService;
 import net.onrc.onos.registry.controller.IControllerRegistryService.ControlChangeCallback;
@@ -1831,6 +1832,7 @@
        
         // Add our REST API
         restApi.addRestletRoutable(new CoreWebRoutable());
+        restApi.addRestletRoutable(new OnosInternalWebRoutable());
     }
     
     @Override
diff --git a/src/main/java/net/floodlightcontroller/core/web/CoreWebRoutable.java b/src/main/java/net/floodlightcontroller/core/web/CoreWebRoutable.java
index 9b22617..0e48975 100644
--- a/src/main/java/net/floodlightcontroller/core/web/CoreWebRoutable.java
+++ b/src/main/java/net/floodlightcontroller/core/web/CoreWebRoutable.java
@@ -19,10 +19,6 @@
 
 import net.floodlightcontroller.core.module.ModuleLoaderResource;
 import net.floodlightcontroller.restserver.RestletRoutable;
-import net.onrc.onos.ofcontroller.core.web.ClearFlowTableResource;
-import net.onrc.onos.ofcontroller.core.web.TopoLinksResource;
-import net.onrc.onos.ofcontroller.core.web.TopoSwitchesResource;
-import net.onrc.onos.ofcontroller.devicemanager.web.TopoDevicesResource;
 
 import org.restlet.Context;
 import org.restlet.Restlet;
@@ -35,7 +31,7 @@
 public class CoreWebRoutable implements RestletRoutable {
     @Override
     public String basePath() {
-        return "/wm/core";
+        return "/wm/floodlight/core";
     }
 
     @Override
@@ -57,11 +53,6 @@
                 EventHistoryTopologyClusterResource.class);
         router.attach("/health/json", HealthCheckResource.class);
         router.attach("/system/uptime/json", SystemUptimeResource.class);
-        // Following added by ONOS
-        router.attach("/topology/switches/{filter}/json", TopoSwitchesResource.class);
-        router.attach("/topology/links/json", TopoLinksResource.class);
-        router.attach("/topology/devices/json", TopoDevicesResource.class);
-        router.attach("/clearflowtable/json", ClearFlowTableResource.class);
         return router;
     }
 }
diff --git a/src/main/java/net/floodlightcontroller/devicemanager/web/DeviceRoutable.java b/src/main/java/net/floodlightcontroller/devicemanager/web/DeviceRoutable.java
index 9a76505..3648569 100644
--- a/src/main/java/net/floodlightcontroller/devicemanager/web/DeviceRoutable.java
+++ b/src/main/java/net/floodlightcontroller/devicemanager/web/DeviceRoutable.java
@@ -30,7 +30,7 @@
 
     @Override
     public String basePath() {
-        return "/wm/device";
+        return "/wm/floodlight/device";
     }
     
     @Override
diff --git a/src/main/java/net/floodlightcontroller/topology/web/TopologyWebRoutable.java b/src/main/java/net/floodlightcontroller/topology/web/TopologyWebRoutable.java
index 4f844b2..363a194 100644
--- a/src/main/java/net/floodlightcontroller/topology/web/TopologyWebRoutable.java
+++ b/src/main/java/net/floodlightcontroller/topology/web/TopologyWebRoutable.java
@@ -4,8 +4,6 @@
 import org.restlet.routing.Router;
 
 import net.floodlightcontroller.restserver.RestletRoutable;
-import net.onrc.onos.ofcontroller.linkdiscovery.web.LinksResource;
-import net.onrc.onos.ofcontroller.topology.web.RouteResource;
 
 public class TopologyWebRoutable implements RestletRoutable {
     /**
@@ -14,13 +12,11 @@
     @Override
     public Router getRestlet(Context context) {
         Router router = new Router(context);
-        router.attach("/links/json", LinksResource.class);
         router.attach("/tunnellinks/json", TunnelLinksResource.class);
         router.attach("/switchclusters/json", SwitchClustersResource.class);
         router.attach("/broadcastdomainports/json", BroadcastDomainPortsResource.class);
         router.attach("/enabledports/json", EnabledPortsResource.class);
         router.attach("/blockedports/json", BlockedPortsResource.class);
-        router.attach("/route/{src-dpid}/{src-port}/{dst-dpid}/{dst-port}/json", RouteResource.class);
         return router;
     }
 
@@ -29,6 +25,6 @@
      */
     @Override
     public String basePath() {
-        return "/wm/topology";
+        return "/wm/floodlight/topology";
     }
 }
diff --git a/src/main/java/net/floodlightcontroller/ui/web/StaticWebRoutable.java b/src/main/java/net/floodlightcontroller/ui/web/StaticWebRoutable.java
index c1d5b5f..e89f0be 100644
--- a/src/main/java/net/floodlightcontroller/ui/web/StaticWebRoutable.java
+++ b/src/main/java/net/floodlightcontroller/ui/web/StaticWebRoutable.java
@@ -64,7 +64,7 @@
 
 	@Override
 	public String basePath() {
-		return "/ui/";
+		return "/wm/floodlight/ui/";
 	}
 
 }
diff --git a/src/main/java/net/onrc/onos/datagrid/web/DatagridWebRoutable.java b/src/main/java/net/onrc/onos/datagrid/web/DatagridWebRoutable.java
index 2c99ece..1d3afe7 100644
--- a/src/main/java/net/onrc/onos/datagrid/web/DatagridWebRoutable.java
+++ b/src/main/java/net/onrc/onos/datagrid/web/DatagridWebRoutable.java
@@ -25,6 +25,6 @@
      */
     @Override
     public String basePath() {
-        return "/wm/datagrid";
+        return "/wm/onos/datagrid";
     }
 }
diff --git a/src/main/java/net/onrc/onos/graph/GraphDBOperation.java b/src/main/java/net/onrc/onos/graph/GraphDBOperation.java
index 03b4c96..ab775b9 100644
--- a/src/main/java/net/onrc/onos/graph/GraphDBOperation.java
+++ b/src/main/java/net/onrc/onos/graph/GraphDBOperation.java
@@ -44,8 +44,9 @@
 	 * Create a new switch and return the created switch object.
 	 * @param dpid DPID of the switch
 	 */
+	@Override
 	public ISwitchObject newSwitch(String dpid) {
-		FramedGraph<TitanGraph> fg = conn.getFramedGraph();	
+		FramedGraph<TitanGraph> fg = conn.getFramedGraph();
 		ISwitchObject obj = fg.addVertex(null,ISwitchObject.class);
 		if (obj != null) {
 			obj.setType("switch");
@@ -56,23 +57,25 @@
 
 	/**
 	 * Search and get a switch object with DPID.
-	 * @param dpid DPID of the switch 
+	 * @param dpid DPID of the switch
 	 */
+	@Override
 	public ISwitchObject searchSwitch(String dpid) {
 
 		FramedGraph<TitanGraph> fg = conn.getFramedGraph();
-		
-		return (fg != null && fg.getVertices("dpid",dpid).iterator().hasNext()) ? 
-				fg.getVertices("dpid",dpid,ISwitchObject.class).iterator().next() : null;
-				
+		if ( fg == null ) return null;
+		Iterator<ISwitchObject> it = fg.getVertices("dpid",dpid,ISwitchObject.class).iterator();
+		return (it.hasNext()) ? it.next() : null;
+
 	}
 
 	/**
 	 * Search and get an active switch object with DPID.
-	 * @param dpid DPID of the switch 
+	 * @param dpid DPID of the switch
 	 */
+	@Override
 	public ISwitchObject searchActiveSwitch(String dpid) {
-	
+
 	    ISwitchObject sw = searchSwitch(dpid);
 	    if ((sw != null) &&
 	        sw.getState().equals(SwitchState.ACTIVE.toString())) {
@@ -84,6 +87,7 @@
 	/**
 	 * Get all switch objects.
 	 */
+	@Override
 	public Iterable<ISwitchObject> getAllSwitches() {
 		FramedGraph<TitanGraph> fg = conn.getFramedGraph();
 		Iterable<ISwitchObject> switches =  fg.getVertices("type","switch",ISwitchObject.class);
@@ -93,11 +97,12 @@
 	/**
 	 * Get all active switch objects.
 	 */
+	@Override
 	public Iterable<ISwitchObject> getActiveSwitches() {
 		FramedGraph<TitanGraph> fg = conn.getFramedGraph();
 		Iterable<ISwitchObject> switches =  fg.getVertices("type","switch",ISwitchObject.class);
 		List<ISwitchObject> activeSwitches = new ArrayList<ISwitchObject>();
-	
+
 		for (ISwitchObject sw: switches) {
 			if(sw.getState().equals(SwitchState.ACTIVE.toString())) {
 				activeSwitches.add(sw);
@@ -109,11 +114,12 @@
 	/**
 	 * Get all inactive switch objects.
 	 */
+	@Override
 	public Iterable<ISwitchObject> getInactiveSwitches() {
 		FramedGraph<TitanGraph> fg = conn.getFramedGraph();
 		Iterable<ISwitchObject> switches =  fg.getVertices("type","switch",ISwitchObject.class);
 		List<ISwitchObject> inactiveSwitches = new ArrayList<ISwitchObject>();
-	
+
 		for (ISwitchObject sw: switches) {
 			if(sw.getState().equals(SwitchState.INACTIVE.toString())) {
 				inactiveSwitches.add(sw);
@@ -125,6 +131,7 @@
 	/**
 	 * Get all flow entries' objects where their switches are not updated.
 	 */
+	@Override
 	public Iterable<IFlowEntry> getAllSwitchNotUpdatedFlowEntries() {
 		FramedGraph<TitanGraph> fg = conn.getFramedGraph();
 		//TODO: Should use an enum for flow_switch_state
@@ -135,14 +142,15 @@
 	 * Remove specified switch.
 	 * @param sw switch object to remove
 	 */
+	@Override
 	public void removeSwitch(ISwitchObject sw) {
-		FramedGraph<TitanGraph> fg = conn.getFramedGraph();	
-		fg.removeVertex(sw.asVertex());		
+		FramedGraph<TitanGraph> fg = conn.getFramedGraph();
+		fg.removeVertex(sw.asVertex());
 	}
-	
+
 	@Override
 	public IPortObject newPort(String dpid, Short portNumber) {
-		FramedGraph<TitanGraph> fg = conn.getFramedGraph();	
+		FramedGraph<TitanGraph> fg = conn.getFramedGraph();
 		IPortObject obj = fg.addVertex(null,IPortObject.class);
 		if (obj != null) {
 			obj.setType("port");
@@ -150,17 +158,18 @@
 			obj.setPortId(id);
 			obj.setNumber(portNumber);
 		}
-		return obj;	
-		
+		return obj;
+
 	}
 
 	/**
 	 * Create a port having specified port number.
 	 * @param portNumber port number
 	 */
+	@Override
 	@Deprecated
 	public IPortObject newPort(Short portNumber) {
-		FramedGraph<TitanGraph> fg = conn.getFramedGraph();	
+		FramedGraph<TitanGraph> fg = conn.getFramedGraph();
 		IPortObject obj = fg.addVertex(null,IPortObject.class);
 		if (obj != null) {
 			obj.setType("port");
@@ -174,6 +183,7 @@
 	 * @param dpid DPID of a switch
 	 * @param number port number of the switch's port
 	 */
+	@Override
 	public IPortObject searchPort(String dpid, Short number) {
 		FramedGraph<TitanGraph> fg = conn.getFramedGraph();
 		if ( fg == null ) return null;
@@ -190,17 +200,19 @@
 	 * Remove the specified switch port.
 	 * @param port switch port object to remove
 	 */
+	@Override
 	public void removePort(IPortObject port) {
-		FramedGraph<TitanGraph> fg = conn.getFramedGraph();	
+		FramedGraph<TitanGraph> fg = conn.getFramedGraph();
 //		EventGraph<TitanGraph> eg = conn.getEventGraph();
-		if (fg != null) fg.removeVertex(port.asVertex());		
+		if (fg != null) fg.removeVertex(port.asVertex());
 	}
 
 	/**
 	 * Create and return a device object.
 	 */
+	@Override
 	public IDeviceObject newDevice() {
-		FramedGraph<TitanGraph> fg = conn.getFramedGraph();	
+		FramedGraph<TitanGraph> fg = conn.getFramedGraph();
 		IDeviceObject obj = fg.addVertex(null,IDeviceObject.class);
 		if (obj != null) obj.setType("device");
 		return obj;
@@ -210,6 +222,7 @@
 	 * Search and get a device object having specified MAC address.
 	 * @param macAddr MAC address to search and get
 	 */
+	@Override
 	public IDeviceObject searchDevice(String macAddr) {
 		FramedGraph<TitanGraph> fg = conn.getFramedGraph();
 		if ( fg == null ) return null;
@@ -224,8 +237,9 @@
 	/**
 	 * Get all devices.
 	 */
+	@Override
 	public Iterable<IDeviceObject> getDevices() {
-		FramedGraph<TitanGraph> fg = conn.getFramedGraph();	
+		FramedGraph<TitanGraph> fg = conn.getFramedGraph();
 		return fg != null ? fg.getVertices("type","device",IDeviceObject.class) : null;
 	}
 
@@ -233,15 +247,16 @@
 	 * Remove the specified device.
 	 * @param dev a device object to remove
 	 */
+	@Override
 	public void removeDevice(IDeviceObject dev) {
-		FramedGraph<TitanGraph> fg = conn.getFramedGraph();	
-		if (fg != null) fg.removeVertex(dev.asVertex());		
+		FramedGraph<TitanGraph> fg = conn.getFramedGraph();
+		if (fg != null) fg.removeVertex(dev.asVertex());
 	}
-	
+
 	public IIpv4Address newIpv4Address() {
 		return newVertex("ipv4Address", IIpv4Address.class);
 	}
-	
+
 	private <T extends IBaseObject> T newVertex(String type, Class<T> vertexType) {
 		FramedGraph<TitanGraph> fg = conn.getFramedGraph();
 		T newVertex = fg.addVertex(null, vertexType);
@@ -250,15 +265,15 @@
 		}
 		return newVertex;
 	}
-	
+
 	public IIpv4Address searchIpv4Address(int intIpv4Address) {
 		return searchForVertex("ipv4_address", intIpv4Address, IIpv4Address.class);
 	}
-	
+
 	private <T> T searchForVertex(String propertyName, Object propertyValue, Class<T> vertexType) {
 		FramedGraph<TitanGraph> fg = conn.getFramedGraph();
 		if (fg != null) {
-			Iterator<T> it = 
+			Iterator<T> it =
 					fg.getVertices(propertyName, propertyValue, vertexType).iterator();
 			if (it.hasNext()) {
 				return it.next();
@@ -266,7 +281,7 @@
 		}
 		return null;
 	}
-	
+
 	public IIpv4Address ensureIpv4Address(int intIpv4Address) {
 		IIpv4Address ipv4Vertex = searchIpv4Address(intIpv4Address);
 		if (ipv4Vertex == null) {
@@ -275,7 +290,7 @@
 		}
 		return ipv4Vertex;
 	}
-	
+
 	public void removeIpv4Address(IIpv4Address ipv4Address) {
 		FramedGraph<TitanGraph> fg = conn.getFramedGraph();
 		fg.removeVertex(ipv4Address.asVertex());
@@ -284,8 +299,9 @@
 	/**
 	 * Create and return a flow path object.
 	 */
+	@Override
 	public IFlowPath newFlowPath() {
-		FramedGraph<TitanGraph> fg = conn.getFramedGraph();	
+		FramedGraph<TitanGraph> fg = conn.getFramedGraph();
 		IFlowPath flowPath = fg.addVertex(null, IFlowPath.class);
 		if (flowPath != null) flowPath.setType("flow");
 		return flowPath;
@@ -295,6 +311,7 @@
 	 * Search and get a flow path object with specified flow ID.
 	 * @param flowId flow ID to search
 	 */
+	@Override
 	public IFlowPath searchFlowPath(FlowId flowId) {
 		FramedGraph<TitanGraph> fg = conn.getFramedGraph();
 		if ( fg == null ) return null;
@@ -310,21 +327,23 @@
 	 * Get a flow path object with a flow entry.
 	 * @param flowEntry flow entry object
 	 */
+	@Override
 	public IFlowPath getFlowPathByFlowEntry(IFlowEntry flowEntry) {
 		GremlinPipeline<Vertex, Vertex> pipe = new GremlinPipeline<Vertex, Vertex>();
 		pipe.start(flowEntry.asVertex()).out("flow");
 		FramedVertexIterable<IFlowPath> r = new FramedVertexIterable<IFlowPath>(conn.getFramedGraph(),
-				(Iterable<Vertex>) pipe, IFlowPath.class);
+				pipe, IFlowPath.class);
 		return r.iterator().hasNext() ? r.iterator().next() : null;
 	}
 
 	/**
 	 * Get all flow path objects.
 	 */
-    public Iterable<IFlowPath> getAllFlowPaths() {
+	@Override
+	public Iterable<IFlowPath> getAllFlowPaths() {
 		FramedGraph<TitanGraph> fg = conn.getFramedGraph();
 		Iterable<IFlowPath> flowPaths = fg.getVertices("type", "flow", IFlowPath.class);
-		
+
 		List<IFlowPath> nonNullFlows = new ArrayList<IFlowPath>();
 
 		for (IFlowPath fp: flowPaths) {
@@ -339,6 +358,7 @@
      * Remove the specified flow path.
      * @param flowPath flow path object to remove
      */
+	@Override
 	public void removeFlowPath(IFlowPath flowPath) {
 		FramedGraph<TitanGraph> fg = conn.getFramedGraph();
 		fg.removeVertex(flowPath.asVertex());
@@ -347,8 +367,9 @@
 	/**
 	 * Create and return a flow entry object.
 	 */
+	@Override
 	public IFlowEntry newFlowEntry() {
-		FramedGraph<TitanGraph> fg = conn.getFramedGraph();	
+		FramedGraph<TitanGraph> fg = conn.getFramedGraph();
 		IFlowEntry flowEntry = fg.addVertex(null, IFlowEntry.class);
 		if (flowEntry != null) flowEntry.setType("flow_entry");
 		return flowEntry;
@@ -358,6 +379,7 @@
 	 * Search and get a flow entry object with flow entry ID.
 	 * @param flowEntryId flow entry ID to search
 	 */
+	@Override
 	public IFlowEntry searchFlowEntry(FlowEntryId flowEntryId) {
 		FramedGraph<TitanGraph> fg = conn.getFramedGraph();
 		if ( fg == null ) return null;
@@ -372,9 +394,10 @@
 	/**
 	 * Get all flow entry objects.
 	 */
+	@Override
 	public Iterable<IFlowEntry> getAllFlowEntries() {
 		FramedGraph<TitanGraph> fg = conn.getFramedGraph();
-		
+
 		return fg.getVertices("type", "flow_entry", IFlowEntry.class);
 	}
 
@@ -382,21 +405,24 @@
 	 * Remove the specified flow entry.
 	 * @param flowEntry flow entry object to remove
 	 */
+	@Override
 	public void removeFlowEntry(IFlowEntry flowEntry) {
 		FramedGraph<TitanGraph> fg = conn.getFramedGraph();
 		fg.removeVertex(flowEntry.asVertex());
 	}
-	
+
 	/**
 	 * Get the instance of GraphDBConnection assigned to this class.
 	 */
+	@Override
 	public IDBConnection getDBConnection() {
 		return conn;
 	}
-	
+
 	/**
 	 * Commit changes for the graph.
 	 */
+	@Override
 	public void commit() {
 		conn.commit();
 	}
@@ -404,6 +430,7 @@
 	/**
 	 * Rollback changes for the graph.
 	 */
+	@Override
 	public void rollback() {
 		conn.rollback();
 	}
@@ -411,6 +438,7 @@
 	/**
 	 * Close the connection of the assigned GraphDBConnection.
 	 */
+	@Override
 	public void close() {
 		conn.close();
 	}
diff --git a/src/main/java/net/onrc/onos/ofcontroller/devicemanager/web/TopoDevicesResource.java b/src/main/java/net/onrc/onos/graph/web/TopoDevicesResource.java
similarity index 88%
rename from src/main/java/net/onrc/onos/ofcontroller/devicemanager/web/TopoDevicesResource.java
rename to src/main/java/net/onrc/onos/graph/web/TopoDevicesResource.java
index ac9409f..18c1069 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/devicemanager/web/TopoDevicesResource.java
+++ b/src/main/java/net/onrc/onos/graph/web/TopoDevicesResource.java
@@ -1,4 +1,4 @@
-package net.onrc.onos.ofcontroller.devicemanager.web;
+package net.onrc.onos.graph.web;
 
 import java.util.Iterator;
 
diff --git a/src/main/java/net/onrc/onos/ofcontroller/core/INetMapTopologyObjects.java b/src/main/java/net/onrc/onos/ofcontroller/core/INetMapTopologyObjects.java
index 29c4377..65750e2 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/core/INetMapTopologyObjects.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/core/INetMapTopologyObjects.java
@@ -213,7 +213,8 @@
 		public void setIpv4Address(int ipv4Address);
 		
 		@JsonIgnore
-		@GremlinGroovy("it.in('hasAddress')")
+		//@GremlinGroovy("it.in('hasAddress')")
+		@Adjacency(label = "hasAddress", direction = Direction.IN)
 		public IDeviceObject getDevice();
 	}
 	
diff --git a/src/main/java/net/onrc/onos/ofcontroller/core/web/OnosInternalWebRoutable.java b/src/main/java/net/onrc/onos/ofcontroller/core/web/OnosInternalWebRoutable.java
new file mode 100644
index 0000000..78bb02b
--- /dev/null
+++ b/src/main/java/net/onrc/onos/ofcontroller/core/web/OnosInternalWebRoutable.java
@@ -0,0 +1,22 @@
+package net.onrc.onos.ofcontroller.core.web;
+
+import org.restlet.Context;
+import org.restlet.Restlet;
+import org.restlet.routing.Router;
+
+import net.floodlightcontroller.restserver.RestletRoutable;
+
+public class OnosInternalWebRoutable implements RestletRoutable {
+    @Override
+    public String basePath() {
+        return "/wm/onos/internal";
+    }
+
+    @Override
+    public Restlet getRestlet(Context context) {
+        Router router = new Router(context);
+        // Following added by ONOS
+        router.attach("/clearflowtable/json", ClearFlowTableResource.class);
+        return router;
+    }
+}
diff --git a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowDatabaseOperation.java b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowDatabaseOperation.java
index 2d5fe5c..9969cfc 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowDatabaseOperation.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowDatabaseOperation.java
@@ -622,6 +622,12 @@
      * @return the extracted Flow Entry State.
      */
     public static FlowEntry extractFlowEntry(IFlowEntry flowEntryObj) {
+	IFlowPath flowObj = flowEntryObj.getFlow();
+	if (flowObj == null)
+	    return null;
+
+	String flowIdStr = flowObj.getFlowId();
+	//
 	String flowEntryIdStr = flowEntryObj.getFlowEntryId();
 	Integer idleTimeout = flowEntryObj.getIdleTimeout();
 	Integer hardTimeout = flowEntryObj.getHardTimeout();
@@ -629,7 +635,8 @@
 	String userState = flowEntryObj.getUserState();
 	String switchState = flowEntryObj.getSwitchState();
 
-	if ((flowEntryIdStr == null) ||
+	if ((flowIdStr == null) ||
+	    (flowEntryIdStr == null) ||
 	    (idleTimeout == null) ||
 	    (hardTimeout == null) ||
 	    (switchDpidStr == null) ||
@@ -641,6 +648,7 @@
 
 	FlowEntry flowEntry = new FlowEntry();
 	flowEntry.setFlowEntryId(new FlowEntryId(flowEntryIdStr));
+	flowEntry.setFlowId(new FlowId(flowIdStr));
 	flowEntry.setDpid(new Dpid(switchDpidStr));
 	flowEntry.setIdleTimeout(idleTimeout);
 	flowEntry.setHardTimeout(hardTimeout);
diff --git a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/web/AddShortestPathFlowResource.java b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/web/AddShortestPathFlowResource.java
deleted file mode 100644
index 4d03623..0000000
--- a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/web/AddShortestPathFlowResource.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package net.onrc.onos.ofcontroller.flowmanager.web;
-
-import java.io.IOException;
-
-import net.onrc.onos.ofcontroller.flowmanager.IFlowService;
-import net.onrc.onos.ofcontroller.util.FlowId;
-import net.onrc.onos.ofcontroller.util.FlowPath;
-
-import org.codehaus.jackson.JsonGenerationException;
-import org.codehaus.jackson.map.JsonMappingException;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.restlet.resource.Post;
-import org.restlet.resource.ServerResource;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Flow Manager REST API implementation: Add a Flow by delegating
- * the Shortest Path computation to ONOS:
- *
- *   POST /wm/flow/add-shortest-path/json
- */
-public class AddShortestPathFlowResource extends ServerResource {
-
-    protected final static Logger log = LoggerFactory.getLogger(AddShortestPathFlowResource.class);
-
-    /**
-     * Implement the API.
-     *
-     * @param flowJson a string with the JSON representation of the Flow to
-     * add.
-     * @return the Flow ID of the added flow.
-     */
-    @Post("json")
-    public FlowId store(String flowJson) {
-	FlowId result = new FlowId();
-
-        IFlowService flowService =
-                (IFlowService)getContext().getAttributes().
-                get(IFlowService.class.getCanonicalName());
-
-        if (flowService == null) {
-	    log.debug("ONOS Flow Service not found");
-            return result;
-	}
-
-	//
-	// Extract the arguments
-	// NOTE: The "flow" is specified in JSON format.
-	//
-	ObjectMapper mapper = new ObjectMapper();
-	String flowPathStr = flowJson;
-	FlowPath flowPath = null;
-	log.debug("Add Shortest Path Flow Path: " + flowPathStr);
-	try {
-	    flowPath = mapper.readValue(flowPathStr, FlowPath.class);
-	} catch (JsonGenerationException e) {
-	    e.printStackTrace();
-	} catch (JsonMappingException e) {
-	    e.printStackTrace();
-	} catch (IOException e) {
-	    e.printStackTrace();
-	}
-
-	// Process the request
-	if (flowPath != null) {
-	    FlowId addedFlowId = flowService.addFlow(flowPath);
-	    if (addedFlowId != null)
-		result = addedFlowId;
-	}
-
-        return result;
-    }
-}
diff --git a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/web/FlowWebRoutable.java b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/web/FlowWebRoutable.java
index c358263..73a3936 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/web/FlowWebRoutable.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/web/FlowWebRoutable.java
@@ -17,7 +17,6 @@
     public Restlet getRestlet(Context context) {
         Router router = new Router(context);
         router.attach("/add/json", AddFlowResource.class);
-        router.attach("/add-shortest-path/json", AddShortestPathFlowResource.class);
         router.attach("/delete/{flow-id}/json", DeleteFlowResource.class);
         router.attach("/get/{flow-id}/json", GetFlowByIdResource.class);
         router.attach("/getall/json", GetAllFlowsResource.class);
@@ -30,6 +29,6 @@
      */
     @Override
     public String basePath() {
-        return "/wm/flow";
+        return "/wm/onos/flows";
     }
 }
diff --git a/src/main/java/net/onrc/onos/ofcontroller/flowprogrammer/web/FlowProgrammerWebRoutable.java b/src/main/java/net/onrc/onos/ofcontroller/flowprogrammer/web/FlowProgrammerWebRoutable.java
index 22450f7..9325a00 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/flowprogrammer/web/FlowProgrammerWebRoutable.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/flowprogrammer/web/FlowProgrammerWebRoutable.java
@@ -22,7 +22,7 @@
 
 	@Override
 	public String basePath() {
-		return "/wm/fprog";
+		return "/wm/onos/flowprogrammer";
 	}
 
 }
diff --git a/src/main/java/net/onrc/onos/ofcontroller/linkdiscovery/web/LinkDiscoveryWebRoutable.java b/src/main/java/net/onrc/onos/ofcontroller/linkdiscovery/web/LinkDiscoveryWebRoutable.java
index 8eae558..4350ba6 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/linkdiscovery/web/LinkDiscoveryWebRoutable.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/linkdiscovery/web/LinkDiscoveryWebRoutable.java
@@ -12,6 +12,7 @@
     @Override
     public Router getRestlet(Context context) {
         Router router = new Router(context);
+        router.attach("/links/json", LinksResource.class);
         router.attach("/autoportfast/{state}/json", AutoPortFast.class); // enable/true or disable/false
         return router;
     }
@@ -21,6 +22,6 @@
      */
     @Override
     public String basePath() {
-        return "/wm/linkdiscovery";
+        return "/wm/onos/linkdiscovery";
     }
 }
\ No newline at end of file
diff --git a/src/main/java/net/onrc/onos/ofcontroller/proxyarp/ProxyArpManager.java b/src/main/java/net/onrc/onos/ofcontroller/proxyarp/ProxyArpManager.java
index 23ee9ce..a63d2a8 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/proxyarp/ProxyArpManager.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/proxyarp/ProxyArpManager.java
@@ -378,14 +378,11 @@
 						log.debug("outPort:{} ", outPort);
 					}   
 
-					Iterable<ISwitchObject>  outSwitches= targetDevice.getSwitch(); 
-
-					for (ISwitchObject outswitch : outSwitches) {
-
-						outSwitch= HexString.toLong(outswitch.getDPID());
-						log.debug("outSwitch.DPID:{}; outPort: {}", outswitch.getDPID(), outPort );
-						sendToOtherNodes( eth, pi, outSwitch, outPort);
-					}
+					ISwitchObject outSwitchObject = portObject.getSwitch();
+					outSwitch= HexString.toLong(outSwitchObject.getDPID());
+					log.debug("outSwitch.DPID:{}; outPort: {}", outSwitchObject.getDPID(), outPort );
+					sendToOtherNodes( eth, pi, outSwitch, outPort);
+					
 				}
 			}
 
diff --git a/src/main/java/net/onrc/onos/ofcontroller/topology/ShortestPath.java b/src/main/java/net/onrc/onos/ofcontroller/topology/ShortestPath.java
index f187c27..9a8345c 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/topology/ShortestPath.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/topology/ShortestPath.java
@@ -69,8 +69,11 @@
 	//
 	// Test whether we are computing a path from/to the same DPID.
 	// If "yes", then just add a single flow entry in the return result.
+	// However, if the "in" and "out" ports are same, return null.
 	//
 	if (dpid_src.equals(dpid_dest)) {
+	    if (src.port().value() == dest.port().value())
+		return null;		// "In" and "Out" ports are same
 	    FlowEntry flowEntry = new FlowEntry();
 	    flowEntry.setDpid(src.dpid());
 	    flowEntry.setInPort(src.port());
diff --git a/src/main/java/net/onrc/onos/ofcontroller/topology/TopologyManager.java b/src/main/java/net/onrc/onos/ofcontroller/topology/TopologyManager.java
index 02e0ffb..be207c6 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/topology/TopologyManager.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/topology/TopologyManager.java
@@ -10,10 +10,11 @@
 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.datagrid.IDatagridService;
 import net.onrc.onos.graph.GraphDBOperation;
 import net.onrc.onos.ofcontroller.floodlightlistener.INetworkGraphService;
+import net.onrc.onos.ofcontroller.topology.web.OnosTopologyWebRoutable;
 import net.onrc.onos.ofcontroller.util.DataPath;
 import net.onrc.onos.ofcontroller.util.FlowEntry;
 import net.onrc.onos.ofcontroller.util.FlowPath;
@@ -35,6 +36,7 @@
     protected IFloodlightProviderService floodlightProvider;
 
     protected GraphDBOperation dbHandler;
+    protected IRestApiService restApi;
 
 
     /**
@@ -145,6 +147,7 @@
     public void init(FloodlightModuleContext context)
 	throws FloodlightModuleException {
 	floodlightProvider = context.getServiceImpl(IFloodlightProviderService.class);
+	restApi = context.getServiceImpl(IRestApiService.class);
 
 	String conf = "";
 	this.init(conf);
@@ -157,6 +160,7 @@
      */
     @Override
     public void startUp(FloodlightModuleContext context) {
+    	restApi.addRestletRoutable(new OnosTopologyWebRoutable());
 
     }
 
diff --git a/src/main/java/net/onrc/onos/ofcontroller/topology/web/OnosTopologyWebRoutable.java b/src/main/java/net/onrc/onos/ofcontroller/topology/web/OnosTopologyWebRoutable.java
new file mode 100644
index 0000000..90eed9a
--- /dev/null
+++ b/src/main/java/net/onrc/onos/ofcontroller/topology/web/OnosTopologyWebRoutable.java
@@ -0,0 +1,29 @@
+package net.onrc.onos.ofcontroller.topology.web;
+
+import org.restlet.Context;
+import org.restlet.Restlet;
+import org.restlet.routing.Router;
+
+import net.floodlightcontroller.restserver.RestletRoutable;
+import net.onrc.onos.graph.web.TopoDevicesResource;
+import net.onrc.onos.ofcontroller.core.web.TopoLinksResource;
+import net.onrc.onos.ofcontroller.core.web.TopoSwitchesResource;
+
+public class OnosTopologyWebRoutable implements RestletRoutable {
+
+	@Override
+	public Restlet getRestlet(Context context) {
+        Router router = new Router(context);
+        router.attach("/route/{src-dpid}/{src-port}/{dst-dpid}/{dst-port}/json", RouteResource.class);
+        router.attach("/switches/{filter}/json", TopoSwitchesResource.class);
+        router.attach("/links/json", TopoLinksResource.class);
+        router.attach("/devices/json", TopoDevicesResource.class);
+		return router;
+	}
+
+	@Override
+	public String basePath() {
+        return "/wm/onos/topology";
+	}
+
+}
diff --git a/src/main/java/net/onrc/onos/registry/controller/StandaloneRegistry.java b/src/main/java/net/onrc/onos/registry/controller/StandaloneRegistry.java
index b6d980a..82af20c 100644
--- a/src/main/java/net/onrc/onos/registry/controller/StandaloneRegistry.java
+++ b/src/main/java/net/onrc/onos/registry/controller/StandaloneRegistry.java
@@ -11,6 +11,7 @@
 import net.floodlightcontroller.core.module.IFloodlightModule;
 import net.floodlightcontroller.core.module.IFloodlightService;
 import net.floodlightcontroller.restserver.IRestApiService;
+import net.onrc.onos.registry.controller.web.RegistryWebRoutable;
 
 import org.openflow.util.HexString;
 import org.slf4j.Logger;
diff --git a/src/main/java/net/onrc/onos/registry/controller/ZookeeperRegistry.java b/src/main/java/net/onrc/onos/registry/controller/ZookeeperRegistry.java
index 50ee137..b03aea2 100644
--- a/src/main/java/net/onrc/onos/registry/controller/ZookeeperRegistry.java
+++ b/src/main/java/net/onrc/onos/registry/controller/ZookeeperRegistry.java
@@ -15,6 +15,7 @@
 import net.floodlightcontroller.core.module.IFloodlightModule;
 import net.floodlightcontroller.core.module.IFloodlightService;
 import net.floodlightcontroller.restserver.IRestApiService;
+import net.onrc.onos.registry.controller.web.RegistryWebRoutable;
 
 import org.openflow.util.HexString;
 import org.slf4j.Logger;
diff --git a/src/main/java/net/onrc/onos/registry/controller/ControllerRegistryResource.java b/src/main/java/net/onrc/onos/registry/controller/web/ControllerRegistryResource.java
similarity index 83%
rename from src/main/java/net/onrc/onos/registry/controller/ControllerRegistryResource.java
rename to src/main/java/net/onrc/onos/registry/controller/web/ControllerRegistryResource.java
index 8660688..676bcb3 100644
--- a/src/main/java/net/onrc/onos/registry/controller/ControllerRegistryResource.java
+++ b/src/main/java/net/onrc/onos/registry/controller/web/ControllerRegistryResource.java
@@ -1,8 +1,11 @@
-package net.onrc.onos.registry.controller;
+package net.onrc.onos.registry.controller.web;
 
 import java.util.ArrayList;
 import java.util.Collection;
 
+import net.onrc.onos.registry.controller.IControllerRegistryService;
+import net.onrc.onos.registry.controller.RegistryException;
+
 import org.restlet.resource.Get;
 import org.restlet.resource.ServerResource;
 import org.slf4j.Logger;
diff --git a/src/main/java/net/onrc/onos/registry/controller/RegistryWebRoutable.java b/src/main/java/net/onrc/onos/registry/controller/web/RegistryWebRoutable.java
similarity index 86%
rename from src/main/java/net/onrc/onos/registry/controller/RegistryWebRoutable.java
rename to src/main/java/net/onrc/onos/registry/controller/web/RegistryWebRoutable.java
index 74dede4..77dd72d 100644
--- a/src/main/java/net/onrc/onos/registry/controller/RegistryWebRoutable.java
+++ b/src/main/java/net/onrc/onos/registry/controller/web/RegistryWebRoutable.java
@@ -1,4 +1,4 @@
-package net.onrc.onos.registry.controller;
+package net.onrc.onos.registry.controller.web;
 
 import net.floodlightcontroller.restserver.RestletRoutable;
 
@@ -18,7 +18,7 @@
 
 	@Override
 	public String basePath() {
-		return "/wm/registry";
+		return "/wm/onos/registry";
 	}
 
 }
diff --git a/src/main/java/net/onrc/onos/registry/controller/SwitchRegistryResource.java b/src/main/java/net/onrc/onos/registry/controller/web/SwitchRegistryResource.java
similarity index 79%
rename from src/main/java/net/onrc/onos/registry/controller/SwitchRegistryResource.java
rename to src/main/java/net/onrc/onos/registry/controller/web/SwitchRegistryResource.java
index 599a1af..21b0c09 100644
--- a/src/main/java/net/onrc/onos/registry/controller/SwitchRegistryResource.java
+++ b/src/main/java/net/onrc/onos/registry/controller/web/SwitchRegistryResource.java
@@ -1,9 +1,12 @@
-package net.onrc.onos.registry.controller;
+package net.onrc.onos.registry.controller.web;
 
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import net.onrc.onos.registry.controller.ControllerRegistryEntry;
+import net.onrc.onos.registry.controller.IControllerRegistryService;
+
 import org.restlet.resource.Get;
 import org.restlet.resource.ServerResource;
 
diff --git a/web/add_flow.py b/web/add_flow.py
index 9690024..6ff250a 100755
--- a/web/add_flow.py
+++ b/web/add_flow.py
@@ -14,7 +14,7 @@
 from flask import Flask, json, Response, render_template, make_response, request
 
 #
-# curl http://127.0.0.1:8080/wm/topology/route/00:00:00:00:00:00:0a:01/1/00:00:00:00:00:00:0a:04/1/json
+# curl http://127.0.0.1:8080/wm/onos/topology/route/00:00:00:00:00:00:0a:01/1/00:00:00:00:00:00:0a:04/1/json
 #
 
 ## Global Var ##
@@ -37,14 +37,14 @@
   if DEBUG:
     print '%s' % (txt)
 
-# @app.route("/wm/topology/route/<srcdpid>/<srcport>/<destdpid>/<destport>/json")
+# @app.route("/wm/onos/topology/route/<srcdpid>/<srcport>/<destdpid>/<destport>/json")
 #
 # Sample output:
 # {'dstPort': {'port': {'value': 0}, 'dpid': {'value': '00:00:00:00:00:00:00:02'}}, 'srcPort': {'port': {'value': 0}, 'dpid': {'value': '00:00:00:00:00:00:00:01'}}, 'flowEntries': [{'outPort': {'value': 1}, 'flowEntryErrorState': None, 'flowEntryMatch': None, 'flowEntryActions': None, 'inPort': {'value': 0}, 'flowEntryId': None, 'flowEntryUserState': 'FE_USER_UNKNOWN', 'dpid': {'value': '00:00:00:00:00:00:00:01'}, 'flowEntrySwitchState': 'FE_SWITCH_UNKNOWN'}, {'outPort': {'value': 0}, 'flowEntryErrorState': None, 'flowEntryMatch': None, 'flowEntryActions': None, 'inPort': {'value': 9}, 'flowEntryId': None, 'flowEntryUserState': 'FE_USER_UNKNOWN', 'dpid': {'value': '00:00:00:00:00:00:00:02'}, 'flowEntrySwitchState': 'FE_SWITCH_UNKNOWN'}]}
 #
 def shortest_path(v1, p1, v2, p2):
   try:
-    command = "curl -s http://%s:%s/wm/topology/route/%s/%s/%s/%s/json" % (ControllerIP, ControllerPort, v1, p1, v2, p2)
+    command = "curl -s http://%s:%s/wm/onos/topology/route/%s/%s/%s/%s/json" % (ControllerIP, ControllerPort, v1, p1, v2, p2)
     debug("shortest_path %s" % command)
     parsedResult = []
 
@@ -82,7 +82,7 @@
   flow_path_json = json.dumps(flow_path)
 
   try:
-    command = "curl -s -H 'Content-Type: application/json' -d '%s' http://%s:%s/wm/flow/add/json" % (flow_path_json, ControllerIP, ControllerPort)
+    command = "curl -s -H 'Content-Type: application/json' -d '%s' http://%s:%s/wm/onos/flows/add/json" % (flow_path_json, ControllerIP, ControllerPort)
     debug("add_flow_path %s" % command)
     result = os.popen(command).read()
     debug("result %s" % result)
@@ -96,7 +96,7 @@
   flow_path_json = json.dumps(flow_path)
 
   try:
-    command = "curl -s -H 'Content-Type: application/json' -d '%s' http://%s:%s/wm/flow/add-shortest-path/json" % (flow_path_json, ControllerIP, ControllerPort)
+    command = "curl -s -H 'Content-Type: application/json' -d '%s' http://%s:%s/wm/onos/flows/add/json" % (flow_path_json, ControllerIP, ControllerPort)
     debug("add_shortest_path_flow %s" % command)
     result = os.popen(command).read()
     debug("result %s" % result)
@@ -107,7 +107,7 @@
     exit(1)
 
 def delete_flow_path(flow_id):
-  command = "curl -s \"http://%s:%s/wm/flow/delete/%s/json\"" % (ControllerIP, ControllerPort, flow_id)
+  command = "curl -s \"http://%s:%s/wm/onos/flows/delete/%s/json\"" % (ControllerIP, ControllerPort, flow_id)
   debug("delete_flow_path %s" % command)
   result = os.popen(command).read()
   debug("result %s" % result)
diff --git a/web/clear_core.py b/web/clear_core.py
index ea3e964..36eadd6 100755
--- a/web/clear_core.py
+++ b/web/clear_core.py
@@ -23,7 +23,7 @@
 
   try:
     sw_list = json.dumps(core_switches)
-    command = "curl -s -H 'Content-Type: application/json' -d '%s' http://%s:%s/wm/core/clearflowtable/json" % (sw_list, controllers[0], onos_rest_port)
+    command = "curl -s -H 'Content-Type: application/json' -d '%s' http://%s:%s/wm/onos/internal/clearflowtable/json" % (sw_list, controllers[0], onos_rest_port)
 
     print command
     result = os.popen(command).read()
diff --git a/web/delete_flow.py b/web/delete_flow.py
index fff9319..d38e915 100755
--- a/web/delete_flow.py
+++ b/web/delete_flow.py
@@ -14,7 +14,7 @@
 
 #
 # TODO: remove this! We don't use JSON argument here!
-# curl http://127.0.0.1:8080/wm/flow/delete/{"value":"0xf"}/json'
+# curl http://127.0.0.1:8080/wm/onos/flows/delete/{"value":"0xf"}/json'
 #
 
 ## Global Var ##
@@ -34,9 +34,9 @@
   if DEBUG:
     print '%s' % (txt)
 
-# @app.route("/wm/flow/delete/<flow-id>/json")
+# @app.route("/wm/onos/flows/delete/<flow-id>/json")
 def delete_flow_path(flow_id):
-  command = "curl -s \"http://%s:%s/wm/flow/delete/%s/json\"" % (ControllerIP, ControllerPort, flow_id)
+  command = "curl -s \"http://%s:%s/wm/onos/flows/delete/%s/json\"" % (ControllerIP, ControllerPort, flow_id)
   debug("delete_flow_path %s" % command)
   result = os.popen(command).read()
   debug("result %s" % result)
diff --git a/web/css/bootstrap.css b/web/floodlight/css/bootstrap.css
similarity index 100%
rename from web/css/bootstrap.css
rename to web/floodlight/css/bootstrap.css
diff --git a/web/css/styles.css b/web/floodlight/css/styles.css
similarity index 100%
rename from web/css/styles.css
rename to web/floodlight/css/styles.css
diff --git a/web/img/floodlight.png b/web/floodlight/img/floodlight.png
similarity index 100%
rename from web/img/floodlight.png
rename to web/floodlight/img/floodlight.png
Binary files differ
diff --git a/web/img/glyphicons-halflings-white.png b/web/floodlight/img/glyphicons-halflings-white.png
similarity index 100%
rename from web/img/glyphicons-halflings-white.png
rename to web/floodlight/img/glyphicons-halflings-white.png
Binary files differ
diff --git a/web/img/glyphicons-halflings.png b/web/floodlight/img/glyphicons-halflings.png
similarity index 100%
rename from web/img/glyphicons-halflings.png
rename to web/floodlight/img/glyphicons-halflings.png
Binary files differ
diff --git a/web/img/logo.jpg b/web/floodlight/img/logo.jpg
similarity index 100%
rename from web/img/logo.jpg
rename to web/floodlight/img/logo.jpg
Binary files differ
diff --git a/web/img/openflow-logo-40px.png b/web/floodlight/img/openflow-logo-40px.png
similarity index 100%
rename from web/img/openflow-logo-40px.png
rename to web/floodlight/img/openflow-logo-40px.png
Binary files differ
diff --git a/web/img/server.png b/web/floodlight/img/server.png
similarity index 100%
rename from web/img/server.png
rename to web/floodlight/img/server.png
Binary files differ
diff --git a/web/img/switch.png b/web/floodlight/img/switch.png
similarity index 100%
rename from web/img/switch.png
rename to web/floodlight/img/switch.png
Binary files differ
diff --git a/web/index.html b/web/floodlight/index.html
similarity index 100%
rename from web/index.html
rename to web/floodlight/index.html
diff --git a/web/js/controller-status.js b/web/floodlight/js/controller-status.js
similarity index 100%
rename from web/js/controller-status.js
rename to web/floodlight/js/controller-status.js
diff --git a/web/js/jquery-1.7.2.min.js b/web/floodlight/js/jquery-1.7.2.min.js
similarity index 100%
rename from web/js/jquery-1.7.2.min.js
rename to web/floodlight/js/jquery-1.7.2.min.js
diff --git a/web/js/main.js b/web/floodlight/js/main.js
similarity index 100%
rename from web/js/main.js
rename to web/floodlight/js/main.js
diff --git a/web/js/models/flowmodel.js b/web/floodlight/js/models/flowmodel.js
similarity index 100%
rename from web/js/models/flowmodel.js
rename to web/floodlight/js/models/flowmodel.js
diff --git a/web/js/models/hostmodel.js b/web/floodlight/js/models/hostmodel.js
similarity index 97%
rename from web/js/models/hostmodel.js
rename to web/floodlight/js/models/hostmodel.js
index 8de3dd6..1caff6c 100644
--- a/web/js/models/hostmodel.js
+++ b/web/floodlight/js/models/hostmodel.js
@@ -35,7 +35,7 @@
         var self = this;
         //console.log("fetching host list")
         $.ajax({
-            url:hackBase + "/wm/device/",
+            url:hackBase + "/wm/floodlight/device/",
             dataType:"json",
             success:function (data) {
                 //console.log("fetched  host list: " + data.length);
diff --git a/web/js/models/portmodel.js b/web/floodlight/js/models/portmodel.js
similarity index 100%
rename from web/js/models/portmodel.js
rename to web/floodlight/js/models/portmodel.js
diff --git a/web/js/models/statusmodel.js b/web/floodlight/js/models/statusmodel.js
similarity index 89%
rename from web/js/models/statusmodel.js
rename to web/floodlight/js/models/statusmodel.js
index b7cdebd..5cbb526 100644
--- a/web/js/models/statusmodel.js
+++ b/web/floodlight/js/models/statusmodel.js
@@ -30,7 +30,7 @@
         var self = this;
         console.log("fetching controller status");
         $.ajax({
-            url:hackBase + "/wm/core/health/json",
+            url:hackBase + "/wm/floodlight/core/health/json",
             dataType:"json",
             success:function (data) {
                 console.log("fetched controller status: health");
@@ -39,7 +39,7 @@
             }
         });
         $.ajax({
-            url:hackBase + "/wm/core/system/uptime/json",
+            url:hackBase + "/wm/floodlight/core/system/uptime/json",
             dataType:"json",
             success:function (data) {
                 console.log("fetched controller status: uptime");
@@ -48,7 +48,7 @@
             }
         });
         $.ajax({
-            url:hackBase + "/wm/core/memory/json",
+            url:hackBase + "/wm/floodlight/core/memory/json",
             dataType:"json",
             success:function (data) {
                 console.log("fetched controller status: memory");
@@ -57,7 +57,7 @@
             }
         });
         $.ajax({
-            url:hackBase + "/wm/core/module/loaded/json",
+            url:hackBase + "/wm/floodlight/core/module/loaded/json",
             dataType:"json",
             success:function (data) {
                 console.log("fetched controller status: modules loaded");
diff --git a/web/js/models/switchmodel.js b/web/floodlight/js/models/switchmodel.js
similarity index 95%
rename from web/js/models/switchmodel.js
rename to web/floodlight/js/models/switchmodel.js
index 4104dd0..700a1cf 100644
--- a/web/js/models/switchmodel.js
+++ b/web/floodlight/js/models/switchmodel.js
@@ -16,7 +16,7 @@
 
 window.Switch = Backbone.Model.extend({
 
-    urlRoot:"/wm/core/switch/",
+    urlRoot:"/wm/floodlight/core/switch/",
     
     defaults: {
         datapathDescription: '',
@@ -34,7 +34,7 @@
 
         //console.log("fetching switch " + this.id + " desc")
         $.ajax({
-            url:hackBase + "/wm/core/switch/" + self.id + '/desc/json',
+            url:hackBase + "/wm/floodlight/core/switch/" + self.id + '/desc/json',
             dataType:"json",
             success:function (data) {
                 //console.log("fetched  switch " + self.id + " desc");
@@ -45,7 +45,7 @@
 
         //console.log("fetching switch " + this.id + " aggregate")
         $.ajax({
-            url:hackBase + "/wm/core/switch/" + self.id + '/aggregate/json',
+            url:hackBase + "/wm/floodlight/core/switch/" + self.id + '/aggregate/json',
             dataType:"json",
             success:function (data) {
                 //console.log("fetched  switch " + self.id + " aggregate");
@@ -69,7 +69,7 @@
         //console.log("fetching switch " + this.id + " ports")
         //console.log("fetching switch " + this.id + " features")
         $.when($.ajax({
-            url:hackBase + "/wm/core/switch/" + self.id + '/port/json',
+            url:hackBase + "/wm/floodlight/core/switch/" + self.id + '/port/json',
             dataType:"json",
             success:function (data) {
                 //console.log("fetched  switch " + self.id + " ports");
@@ -106,7 +106,7 @@
             }
         }),
         $.ajax({
-            url:hackBase + "/wm/core/switch/" + self.id + '/features/json',
+            url:hackBase + "/wm/floodlight/core/switch/" + self.id + '/features/json',
             dataType:"json",
             success:function (data) {
                 //console.log("fetched  switch " + self.id + " features");
@@ -163,7 +163,7 @@
         var self = this;
         //console.log("fetching switch " + this.id + " flows")
         $.ajax({
-            url:hackBase + "/wm/core/switch/" + self.id + '/flow/json',
+            url:hackBase + "/wm/floodlight/core/switch/" + self.id + '/flow/json',
             dataType:"json",
             success:function (data) {
                 //console.log("fetched  switch " + self.id + " flows");
@@ -269,7 +269,7 @@
         var self = this;
         //console.log("fetching switch list")
         $.ajax({
-            url:hackBase + "/wm/core/controller/switches/json",
+            url:hackBase + "/wm/floodlight/core/controller/switches/json",
             dataType:"json",
             success:function (data) {
                 //console.log("fetched  switch list: " + data.length);
diff --git a/web/js/models/topologymodel.js b/web/floodlight/js/models/topologymodel.js
similarity index 97%
rename from web/js/models/topologymodel.js
rename to web/floodlight/js/models/topologymodel.js
index c5d8f9b..bcac141 100644
--- a/web/js/models/topologymodel.js
+++ b/web/floodlight/js/models/topologymodel.js
@@ -16,7 +16,7 @@
 
 window.Topology = Backbone.Model.extend({
 
-    url:"/wm/topology/links/json",
+    url:"/wm/onos/linkdiscovery/links/json",
     
     defaults:{
         nodes: [],
diff --git a/web/js/onos-topology-route.js b/web/floodlight/js/onos-topology-route.js
similarity index 100%
rename from web/js/onos-topology-route.js
rename to web/floodlight/js/onos-topology-route.js
diff --git a/web/js/onos-topology.js b/web/floodlight/js/onos-topology.js
similarity index 100%
rename from web/js/onos-topology.js
rename to web/floodlight/js/onos-topology.js
diff --git a/web/js/utils.js b/web/floodlight/js/utils.js
similarity index 100%
rename from web/js/utils.js
rename to web/floodlight/js/utils.js
diff --git a/web/js/views/flow.js b/web/floodlight/js/views/flow.js
similarity index 100%
rename from web/js/views/flow.js
rename to web/floodlight/js/views/flow.js
diff --git a/web/js/views/header.js b/web/floodlight/js/views/header.js
similarity index 100%
rename from web/js/views/header.js
rename to web/floodlight/js/views/header.js
diff --git a/web/js/views/home.js b/web/floodlight/js/views/home.js
similarity index 100%
rename from web/js/views/home.js
rename to web/floodlight/js/views/home.js
diff --git a/web/js/views/host.js b/web/floodlight/js/views/host.js
similarity index 100%
rename from web/js/views/host.js
rename to web/floodlight/js/views/host.js
diff --git a/web/js/views/port.js b/web/floodlight/js/views/port.js
similarity index 100%
rename from web/js/views/port.js
rename to web/floodlight/js/views/port.js
diff --git a/web/js/views/status.js b/web/floodlight/js/views/status.js
similarity index 100%
rename from web/js/views/status.js
rename to web/floodlight/js/views/status.js
diff --git a/web/js/views/switch.js b/web/floodlight/js/views/switch.js
similarity index 100%
rename from web/js/views/switch.js
rename to web/floodlight/js/views/switch.js
diff --git a/web/js/views/topology.js b/web/floodlight/js/views/topology.js
similarity index 100%
rename from web/js/views/topology.js
rename to web/floodlight/js/views/topology.js
diff --git a/web/lib/backbone-min.js b/web/floodlight/lib/backbone-min.js
similarity index 100%
rename from web/lib/backbone-min.js
rename to web/floodlight/lib/backbone-min.js
diff --git a/web/lib/bootstrap-alert.js b/web/floodlight/lib/bootstrap-alert.js
similarity index 100%
rename from web/lib/bootstrap-alert.js
rename to web/floodlight/lib/bootstrap-alert.js
diff --git a/web/lib/bootstrap-dropdown.js b/web/floodlight/lib/bootstrap-dropdown.js
similarity index 100%
rename from web/lib/bootstrap-dropdown.js
rename to web/floodlight/lib/bootstrap-dropdown.js
diff --git a/web/lib/d3.v2.min.js b/web/floodlight/lib/d3.v2.min.js
similarity index 100%
rename from web/lib/d3.v2.min.js
rename to web/floodlight/lib/d3.v2.min.js
diff --git a/web/lib/jquery.min.js b/web/floodlight/lib/jquery.min.js
similarity index 100%
rename from web/lib/jquery.min.js
rename to web/floodlight/lib/jquery.min.js
diff --git a/web/lib/underscore-min.js b/web/floodlight/lib/underscore-min.js
similarity index 100%
rename from web/lib/underscore-min.js
rename to web/floodlight/lib/underscore-min.js
diff --git a/web/tpl/flow-list-item.html b/web/floodlight/tpl/flow-list-item.html
similarity index 100%
rename from web/tpl/flow-list-item.html
rename to web/floodlight/tpl/flow-list-item.html
diff --git a/web/tpl/flow-list.html b/web/floodlight/tpl/flow-list.html
similarity index 100%
rename from web/tpl/flow-list.html
rename to web/floodlight/tpl/flow-list.html
diff --git a/web/tpl/header.html b/web/floodlight/tpl/header.html
similarity index 100%
rename from web/tpl/header.html
rename to web/floodlight/tpl/header.html
diff --git a/web/tpl/home.html b/web/floodlight/tpl/home.html
similarity index 100%
rename from web/tpl/home.html
rename to web/floodlight/tpl/home.html
diff --git a/web/tpl/host-list-item.html b/web/floodlight/tpl/host-list-item.html
similarity index 100%
rename from web/tpl/host-list-item.html
rename to web/floodlight/tpl/host-list-item.html
diff --git a/web/tpl/host-list.html b/web/floodlight/tpl/host-list.html
similarity index 100%
rename from web/tpl/host-list.html
rename to web/floodlight/tpl/host-list.html
diff --git a/web/tpl/host.html b/web/floodlight/tpl/host.html
similarity index 100%
rename from web/tpl/host.html
rename to web/floodlight/tpl/host.html
diff --git a/web/tpl/port-list-item.html b/web/floodlight/tpl/port-list-item.html
similarity index 100%
rename from web/tpl/port-list-item.html
rename to web/floodlight/tpl/port-list-item.html
diff --git a/web/tpl/port-list.html b/web/floodlight/tpl/port-list.html
similarity index 100%
rename from web/tpl/port-list.html
rename to web/floodlight/tpl/port-list.html
diff --git a/web/tpl/status.html b/web/floodlight/tpl/status.html
similarity index 100%
rename from web/tpl/status.html
rename to web/floodlight/tpl/status.html
diff --git a/web/tpl/switch-list-item.html b/web/floodlight/tpl/switch-list-item.html
similarity index 100%
rename from web/tpl/switch-list-item.html
rename to web/floodlight/tpl/switch-list-item.html
diff --git a/web/tpl/switch-list.html b/web/floodlight/tpl/switch-list.html
similarity index 100%
rename from web/tpl/switch-list.html
rename to web/floodlight/tpl/switch-list.html
diff --git a/web/tpl/switch.html b/web/floodlight/tpl/switch.html
similarity index 100%
rename from web/tpl/switch.html
rename to web/floodlight/tpl/switch.html
diff --git a/web/tpl/topology.html b/web/floodlight/tpl/topology.html
similarity index 100%
rename from web/tpl/topology.html
rename to web/floodlight/tpl/topology.html
diff --git a/web/tpl/vlan-list-item.html b/web/floodlight/tpl/vlan-list-item.html
similarity index 100%
rename from web/tpl/vlan-list-item.html
rename to web/floodlight/tpl/vlan-list-item.html
diff --git a/web/tpl/vlan.html b/web/floodlight/tpl/vlan.html
similarity index 100%
rename from web/tpl/vlan.html
rename to web/floodlight/tpl/vlan.html
diff --git a/web/flowsync.py b/web/flowsync.py
index 51399d5..ef1d9bd 100755
--- a/web/flowsync.py
+++ b/web/flowsync.py
@@ -29,12 +29,12 @@
   if DEBUG:
     print '%s' % (txt)
 
-# @app.route("/wm/fprog/synchronizer/sync/<dpid>/json")
+# @app.route("/wm/onos/flowprogrammer/synchronizer/sync/<dpid>/json")
 # Sample output:
 #  "true"
 def synchronize(dpid):
   try:
-    command = "curl -s \"http://%s:%s/wm/fprog/synchronizer/sync/%s/json\"" % (ControllerIP, ControllerPort, dpid)
+    command = "curl -s \"http://%s:%s/wm/onos/flowprogrammer/synchronizer/sync/%s/json\"" % (ControllerIP, ControllerPort, dpid)
     debug("synchronize %s" % command)
      
     result = os.popen(command).read()
@@ -48,12 +48,12 @@
   
   print "Synchronization of switch %s has successfully began" % (dpid)
 
-# @app.route("/wm/fprog/synchronizer/interrupt/<dpid>/json")
+# @app.route("/wm/onos/flowprogrammer/synchronizer/interrupt/<dpid>/json")
 # Sample output:
 #  "true"
 def interrupt(dpid):
   try:
-    command = "curl -s \"http://%s:%s/wm/fprog/synchronizer/interrupt/%s/json\"" % (ControllerIP, ControllerPort, dpid)
+    command = "curl -s \"http://%s:%s/wm/onos/flowprogrammer/synchronizer/interrupt/%s/json\"" % (ControllerIP, ControllerPort, dpid)
     debug("interrupt %s" % command)
      
     result = os.popen(command).read()
diff --git a/web/get_datagrid.py b/web/get_datagrid.py
index 2d26846..43ab04f 100755
--- a/web/get_datagrid.py
+++ b/web/get_datagrid.py
@@ -29,7 +29,7 @@
   if DEBUG:
     print '%s' % (txt)
 
-# @app.route("/wm/datagrid/get/map/<map-name>/json ")
+# @app.route("/wm/onos/datagrid/get/map/<map-name>/json ")
 # Sample output:
 
 def print_datagrid_map(parsedResult):
@@ -37,7 +37,7 @@
 
 def get_datagrid_map(map_name):
   try:
-    command = "curl -s \"http://%s:%s/wm/datagrid/get/map/%s/json\"" % (ControllerIP, ControllerPort, map_name)
+    command = "curl -s \"http://%s:%s/wm/onos/datagrid/get/map/%s/json\"" % (ControllerIP, ControllerPort, map_name)
     debug("get_datagrid_map %s" % command)
 
     result = os.popen(command).read()
diff --git a/web/get_flow.py b/web/get_flow.py
index 94b9a61..382238f 100755
--- a/web/get_flow.py
+++ b/web/get_flow.py
@@ -29,7 +29,7 @@
   if DEBUG:
     print '%s' % (txt)
 
-# @app.route("/wm/flow/get/<flow-id>/json")
+# @app.route("/wm/onos/flows/get/<flow-id>/json")
 # Sample output:
 # {"flowId":{"value":"0x5"},"installerId":{"value":"FOOBAR"},"dataPath":{"srcPort":{"dpid":{"value":"00:00:00:00:00:00:00:01"},"port":{"value":0}},"dstPort":{"dpid":{"value":"00:00:00:00:00:00:00:02"},"port":{"value":0}},"flowEntries":[{"flowEntryId":"0x1389","flowEntryMatch":null,"flowEntryActions":null,"dpid":{"value":"00:00:00:00:00:00:00:01"},"inPort":{"value":0},"outPort":{"value":1},"flowEntryUserState":"FE_USER_DELETE","flowEntrySwitchState":"FE_SWITCH_NOT_UPDATED","flowEntryErrorState":null},{"flowEntryId":"0x138a","flowEntryMatch":null,"flowEntryActions":null,"dpid":{"value":"00:00:00:00:00:00:00:02"},"inPort":{"value":9},"outPort":{"value":0},"flowEntryUserState":"FE_USER_DELETE","flowEntrySwitchState":"FE_SWITCH_NOT_UPDATED","flowEntryErrorState":null}]}}
 
@@ -236,7 +236,7 @@
 
 def get_flow_path(flow_id):
   try:
-    command = "curl -s \"http://%s:%s/wm/flow/get/%s/json\"" % (ControllerIP, ControllerPort, flow_id)
+    command = "curl -s \"http://%s:%s/wm/onos/flows/get/%s/json\"" % (ControllerIP, ControllerPort, flow_id)
     debug("get_flow_path %s" % command)
 
     result = os.popen(command).read()
@@ -256,7 +256,7 @@
 
 def get_all_flow_paths():
   try:
-    command = "curl -s \"http://%s:%s/wm/flow/getall/json\"" % (ControllerIP, ControllerPort)
+    command = "curl -s \"http://%s:%s/wm/onos/flows/getall/json\"" % (ControllerIP, ControllerPort)
     debug("get_all_flow_paths %s" % command)
 
     result = os.popen(command).read()
diff --git a/web/onos-topology-route.html b/web/onos-topology-route.html
index 6c167c7..cbda5e9 100644
--- a/web/onos-topology-route.html
+++ b/web/onos-topology-route.html
@@ -42,7 +42,7 @@
     </marker>
   </defs>
 <script type="text/javascript">
-gui("http://onosnat.onlab.us:8080/wm/topology/toporoute/00:00:00:0d:00:d1/2/00:00:00:0d:00:d3/3/json");
+gui("http://onosnat.onlab.us:8080/wm/floodlight/topology/toporoute/00:00:00:0d:00:d1/2/00:00:00:0d:00:d3/3/json");
 </script>
 </svg>
 </body>
diff --git a/web/ons-demo/js/model.js b/web/ons-demo/js/model.js
index df4a751..bb1aaea 100644
--- a/web/ons-demo/js/model.js
+++ b/web/ons-demo/js/model.js
@@ -61,12 +61,12 @@
 }
 
 var urls = {
-	links: '/wm/core/topology/links/json',
-	switches: '/wm/core/topology/switches/all/json',
-	flows: '/wm/flow/getsummary/0/0/json?proxy',
-	activeControllers: '/wm/registry/controllers/json',
+	links: '/wm/onos/topology/links/json',
+	switches: '/wm/onos/topology/switches/all/json',
+	flows: '/wm/onos/flows/getsummary/0/0/json?proxy',
+	activeControllers: '/wm/onos/registry/controllers/json',
 	controllers: 'data/controllers.json',
-	mapping: '/wm/registry/switches/json',
+	mapping: '/wm/onos/registry/switches/json',
 	configuration: 'data/configuration.json'
 }
 
@@ -81,12 +81,12 @@
 }
 
 var proxyURLs = {
-	links: '/wm/core/topology/links/json?proxy',
-	switches: '/wm/core/topology/switches/all/json?proxy',
-	flows: '/wm/flow/getsummary/0/0/json?proxy',
-	activeControllers: '/wm/registry/controllers/json?proxy',
+	links: '/wm/onos/topology/links/json?proxy',
+	switches: '/wm/onos/topology/switches/all/json?proxy',
+	flows: '/wm/onos/flows/getsummary/0/0/json?proxy',
+	activeControllers: '/wm/onos/registry/controllers/json?proxy',
 	controllers: 'data/controllers.json',
-	mapping: '/wm/registry/switches/json?proxy',
+	mapping: '/wm/onos/registry/switches/json?proxy',
 	configuration: 'data/configuration.json'
 }
 
diff --git a/web/pusher.py b/web/pusher.py
index 2a3528b..dbbe7f9 100755
--- a/web/pusher.py
+++ b/web/pusher.py
@@ -29,12 +29,12 @@
   if DEBUG:
     print '%s' % (txt)
 
-# @app.route("/wm/fprog/pusher/setrate/<dpid>/<rate>/json")
+# @app.route("/wm/onos/flowprogrammer/pusher/setrate/<dpid>/<rate>/json")
 # Sample output:
 #  "true"
 def set_rate(dpid,rate):
   try:
-    command = "curl -s \"http://%s:%s/wm/fprog/pusher/setrate/%s/%s/json\"" % (ControllerIP, ControllerPort, dpid, rate)
+    command = "curl -s \"http://%s:%s/wm/onos/flowprogrammer/pusher/setrate/%s/%s/json\"" % (ControllerIP, ControllerPort, dpid, rate)
     debug("set_rate %s" % command)
      
     result = os.popen(command).read()
@@ -48,12 +48,12 @@
   
   print "Sending rate to %s is successfully set to %s" % (dpid, rate)
 
-# @app.route("/wm/fprog/pusher/suspend/<dpid>/json")
+# @app.route("/wm/onos/flowprogrammer/pusher/suspend/<dpid>/json")
 # Sample output:
 #  "true"
 def suspend(dpid):
   try:
-    command = "curl -s \"http://%s:%s/wm/fprog/pusher/suspend/%s/json\"" % (ControllerIP, ControllerPort, dpid)
+    command = "curl -s \"http://%s:%s/wm/onos/flowprogrammer/pusher/suspend/%s/json\"" % (ControllerIP, ControllerPort, dpid)
     debug("suspend %s" % command)
      
     result = os.popen(command).read()
@@ -67,12 +67,12 @@
   
   print "DPID %s is successfully suspended" % dpid
 
-# @app.route("/wm/fprog/pusher/resume/<dpid>/json")
+# @app.route("/wm/onos/flowprogrammer/pusher/resume/<dpid>/json")
 # Sample output:
 #  "true"
 def resume(dpid):
   try:
-    command = "curl -s \"http://%s:%s/wm/fprog/pusher/resume/%s/json\"" % (ControllerIP, ControllerPort, dpid)
+    command = "curl -s \"http://%s:%s/wm/onos/flowprogrammer/pusher/resume/%s/json\"" % (ControllerIP, ControllerPort, dpid)
     debug("resume %s" % command)
      
     result = os.popen(command).read()
@@ -86,12 +86,12 @@
   
   print "DPID %s is successfully resumed" % dpid
 
-# @app.route("/wm/fprog/pusher/barrier/<dpid>/json")
+# @app.route("/wm/onos/flowprogrammer/pusher/barrier/<dpid>/json")
 # Sample output:
 #  "{"version":1,"type":"BARRIER_REPLY","length":8,"xid":4,"lengthU":8}"
 def barrier(dpid):
   try:
-    command = "curl -s \"http://%s:%s/wm/fprog/pusher/barrier/%s/json\"" % (ControllerIP, ControllerPort, dpid)
+    command = "curl -s \"http://%s:%s/wm/onos/flowprogrammer/pusher/barrier/%s/json\"" % (ControllerIP, ControllerPort, dpid)
     debug("barrier %s" % command)
      
     result = os.popen(command).read()
diff --git a/web/rest-test.sh b/web/rest-test.sh
index 2551f12..c6c870b 100755
--- a/web/rest-test.sh
+++ b/web/rest-test.sh
@@ -2,7 +2,7 @@
 rm -f rest.json
 touch rest.json
 
-urls="http://localhost:8080/wm/core/topology/switches/all/json http://localhost:8080/wm/core/topology/links/json http://localhost:8080/wm/registry/controllers/json http://localhost:8080/wm/registry/switches/json"
+urls="http://localhost:8080/wm/onos/topology/switches/all/json http://localhost:8080/wm/onos/linkdiscovery/links/json http://localhost:8080/wm/onos/registry/controllers/json http://localhost:8080/wm/onos/registry/switches/json"
 
 for url in $urls; do
   echo "---REST CALL---" >> rest.json
diff --git a/web/restapi.py b/web/restapi.py
index a3bd51c..fd99ac6 100755
--- a/web/restapi.py
+++ b/web/restapi.py
@@ -54,21 +54,21 @@
   return response
 
 ## REST API ##
-#@app.route("/wm/topology/links/json")
+#@app.route("/wm/onos/linkdiscovery/links/json")
 #def links():
 #    global links_
 #    js = json.dumps(links_)
 #    resp = Response(js, status=200, mimetype='application/json')
 #    return resp
 
-#@app.route("/wm/core/controller/switches/json")
+#@app.route("/wm/floodlight/core/controller/switches/json")
 #def switches():
 #    global switches_
 #    js = json.dumps(switches_)
 #    resp = Response(js, status=200, mimetype='application/json')
 #    return resp
 
-@app.route("/wm/device/")
+@app.route("/wm/floodlight/device/")
 def devices():
   ret = []
   js = json.dumps(ret)
@@ -76,7 +76,7 @@
   return resp
 
 ## return fake stat for now
-@app.route("/wm/core/switch/<switchId>/<statType>/json")
+@app.route("/wm/floodlight/core/switch/<switchId>/<statType>/json")
 def switch_stat(switchId, statType):
     if statType == "desc":
         desc=[{"length":1056,"serialNumber":"None","manufacturerDescription":"Nicira Networks, Inc.","hardwareDescription":"Open vSwitch","softwareDescription":"1.4.0+build0","datapathDescription":"None"}]
@@ -93,7 +93,7 @@
     resp = Response(js, status=200, mimetype='application/json')
     return resp
 
-@app.route("/wm/core/controller/switches/json")
+@app.route("/wm/floodlight/core/controller/switches/json")
 def query_switch():
   try:
     command = "curl -s http://%s:%s/graphs/%s/vertices" % (RestIP, RestPort, DBName)
@@ -116,7 +116,7 @@
   resp = Response(js, status=200, mimetype='application/json')
   return resp
 
-@app.route("/wm/topology/links/json")
+@app.route("/wm/onos/linkdiscovery/links/json")
 def query_links():
   try:
     command = "curl -s http://%s:%s/graphs/%s/edges" % (RestIP, RestPort, DBName)
diff --git a/web/restapi2.py b/web/restapi2.py
index c9952ac..050d8a4 100755
--- a/web/restapi2.py
+++ b/web/restapi2.py
@@ -57,7 +57,7 @@
 ONOS_GUI3_HOST="http://gui3.onlab.us:8080"
 ONOS_LOCAL_HOST="http://localhost:8080" ;# for Amazon EC2
 
-@app.route("/wm/core/topology/switches/all/json")
+@app.route("/wm/onos/topology/switches/all/json")
 def switches():
   if request.args.get('proxy') == None:
     host = ONOS_LOCAL_HOST
@@ -65,7 +65,7 @@
     host = ONOS_GUI3_HOST
 
   try:
-    command = "curl -s %s/wm/core/topology/switches/all/json" % (host)
+    command = "curl -s %s/wm/onos/topology/switches/all/json" % (host)
     print command
     result = os.popen(command).read()
   except:
@@ -75,7 +75,7 @@
   resp = Response(result, status=200, mimetype='application/json')
   return resp
 
-@app.route("/wm/core/topology/links/json")
+@app.route("/wm/onos/topology/links/json")
 def links():
   if request.args.get('proxy') == None:
     host = ONOS_LOCAL_HOST
@@ -83,7 +83,7 @@
     host = ONOS_GUI3_HOST
 
   try:
-    command = "curl -s %s/wm/core/topology/links/json" % (host)
+    command = "curl -s %s/wm/onos/topology/links/json" % (host)
     print command
     result = os.popen(command).read()
   except:
@@ -93,7 +93,7 @@
   resp = Response(result, status=200, mimetype='application/json')
   return resp
 
-@app.route("/wm/flow/getall/json")
+@app.route("/wm/onos/flows/getall/json")
 def flows():
   if request.args.get('proxy') == None:
     host = ONOS_LOCAL_HOST
@@ -101,7 +101,7 @@
     host = ONOS_GUI3_HOST
 
   try:
-    command = "curl -s %s/wm/flow/getall/json" % (host)
+    command = "curl -s %s/wm/onos/flows/getall/json" % (host)
     print command
     result = os.popen(command).read()
   except:
@@ -111,7 +111,7 @@
   resp = Response(result, status=200, mimetype='application/json')
   return resp
 
-@app.route("/wm/registry/controllers/json")
+@app.route("/wm/onos/registry/controllers/json")
 def registry_controllers():
   if request.args.get('proxy') == None:
     host = ONOS_LOCAL_HOST
@@ -119,7 +119,7 @@
     host = ONOS_GUI3_HOST
 
   try:
-    command = "curl -s %s/wm/registry/controllers/json" % (host)
+    command = "curl -s %s/wm/onos/registry/controllers/json" % (host)
     print command
     result = os.popen(command).read()
   except:
@@ -129,7 +129,7 @@
   resp = Response(result, status=200, mimetype='application/json')
   return resp
 
-@app.route("/wm/registry/switches/json")
+@app.route("/wm/onos/registry/switches/json")
 def registry_switches():
   if request.args.get('proxy') == None:
     host = ONOS_LOCAL_HOST
@@ -137,7 +137,7 @@
     host = ONOS_GUI3_HOST
 
   try:
-    command = "curl -s %s/wm/registry/switches/json" % (host)
+    command = "curl -s %s/wm/onos/registry/switches/json" % (host)
     print command
     result = os.popen(command).read()
   except:
@@ -151,21 +151,21 @@
 
 
 ## REST API ##
-#@app.route("/wm/topology/links/json")
+#@app.route("/wm/onos/linkdiscovery/links/json")
 #def links():
 #    global links_
 #    js = json.dumps(links_)
 #    resp = Response(js, status=200, mimetype='application/json')
 #    return resp
 
-#@app.route("/wm/core/controller/switches/json")
+#@app.route("/wm/floodlight/core/controller/switches/json")
 #def switches():
 #    global switches_
 #    js = json.dumps(switches_)
 #    resp = Response(js, status=200, mimetype='application/json')
 #    return resp
 
-@app.route("/wm/device/")
+@app.route("/wm/floodlight/device/")
 def devices():
   try:
     command = "curl -s http://%s:%s/graphs/%s/vertices?key=type\&value=device" % (RestIP, RestPort, DBName)
@@ -218,7 +218,7 @@
 #{"entityClass":"DefaultEntityClass","mac":["7c:d1:c3:e0:8c:a3"],"ipv4":["192.168.2.102","10.1.10.35"],"vlan":[],"attachmentPoint":[{"port":13,"switchDPID":"00:01:00:12:e2:78:32:44","errorStatus":null}],"lastSeen":1357333593496}
 
 ## return fake stat for now
-@app.route("/wm/core/switch/<switchId>/<statType>/json")
+@app.route("/wm/floodlight/core/switch/<switchId>/<statType>/json")
 def switch_stat(switchId, statType):
     if statType == "desc":
         desc=[{"length":1056,"serialNumber":"None","manufacturerDescription":"Nicira Networks, Inc.","hardwareDescription":"Open vSwitch","softwareDescription":"1.4.0+build0","datapathDescription":"None"}]
@@ -235,7 +235,7 @@
     resp = Response(js, status=200, mimetype='application/json')
     return resp
 
-@app.route("/wm/core/controller/switches/json")
+@app.route("/wm/floodlight/core/controller/switches/json")
 def query_switch():
   try:
     command = "curl -s http://%s:%s/graphs/%s/vertices?key=type\&value=switch" % (RestIP, RestPort, DBName)
@@ -258,7 +258,7 @@
   resp = Response(js, status=200, mimetype='application/json')
   return resp
 
-@app.route("/wm/topology/links/json")
+@app.route("/wm/onos/linkdiscovery/links/json")
 def query_links():
   try:
     command = "curl -s http://%s:%s/graphs/%s/vertices?key=type\&value=port" % (RestIP, RestPort, DBName)
diff --git a/web/restapi3.py b/web/restapi3.py
index 001faa6..f3bb3eb 100755
--- a/web/restapi3.py
+++ b/web/restapi3.py
@@ -137,7 +137,7 @@
 
   return response
 
-@app.route("/wm/device/")
+@app.route("/wm/floodlight/device/")
 def devices():
   try:
     command = "curl -s http://%s:%s/graphs/%s/vertices\?key=type\&value=device" % (RestIP, RestPort, DBName)
@@ -182,7 +182,7 @@
 
 
 ## return fake stat for now
-@app.route("/wm/core/switch/<switchId>/<statType>/json")
+@app.route("/wm/floodlight/core/switch/<switchId>/<statType>/json")
 def switch_stat(switchId, statType):
     if statType == "desc":
         desc=[{"length":1056,"serialNumber":"None","manufacturerDescription":"Nicira Networks, Inc.","hardwareDescription":"Open vSwitch","softwareDescription":"1.4.0+build0","datapathDescription":"None"}]
@@ -199,7 +199,7 @@
     resp = Response(js, status=200, mimetype='application/json')
     return resp
 
-@app.route("/wm/core/controller/switches/json")
+@app.route("/wm/floodlight/core/controller/switches/json")
 def query_switch():
   try:
     command = "curl -s \'http://%s:%s/graphs/%s/vertices?key=type&value=switch\'" % (RestIP, RestPort, DBName)
@@ -226,7 +226,7 @@
   resp = Response(js, status=200, mimetype='application/json')
   return resp
 
-@app.route("/wm/topology/links/json")
+@app.route("/wm/onos/linkdiscovery/links/json")
 def query_links():
   try:
     command = 'curl -s http://%s:%s/graphs/%s/vertices?key=type\&value=port' % (RestIP, RestPort, DBName)
diff --git a/web/shortest_path.py b/web/shortest_path.py
index 0f23bf4..805224b 100755
--- a/web/shortest_path.py
+++ b/web/shortest_path.py
@@ -13,7 +13,7 @@
 from flask import Flask, json, Response, render_template, make_response, request
 
 #
-# curl http://127.0.0.1:8080/wm/topology/route/00:00:00:00:00:00:0a:01/1/00:00:00:00:00:00:0a:04/1/json
+# curl http://127.0.0.1:8080/wm/onos/topology/route/00:00:00:00:00:00:0a:01/1/00:00:00:00:00:00:0a:04/1/json
 #
 
 ## Global Var ##
@@ -33,14 +33,14 @@
   if DEBUG:
     print '%s' % (txt)
 
-# @app.route("/wm/topology/route/<srcdpid>/<srcport>/<destdpid>/<destport>/json")
+# @app.route("/wm/onos/topology/route/<srcdpid>/<srcport>/<destdpid>/<destport>/json")
 #
 # Sample output:
 # {'dstPort': {'port': {'value': 0}, 'dpid': {'value': '00:00:00:00:00:00:00:02'}}, 'srcPort': {'port': {'value': 0}, 'dpid': {'value': '00:00:00:00:00:00:00:01'}}, 'flowEntries': [{'outPort': {'value': 1}, 'flowEntryErrorState': None, 'flowEntryMatch': None, 'flowEntryActions': None, 'inPort': {'value': 0}, 'flowEntryId': None, 'flowEntryUserState': 'FE_USER_UNKNOWN', 'dpid': {'value': '00:00:00:00:00:00:00:01'}, 'flowEntrySwitchState': 'FE_SWITCH_UNKNOWN'}, {'outPort': {'value': 0}, 'flowEntryErrorState': None, 'flowEntryMatch': None, 'flowEntryActions': None, 'inPort': {'value': 9}, 'flowEntryId': None, 'flowEntryUserState': 'FE_USER_UNKNOWN', 'dpid': {'value': '00:00:00:00:00:00:00:02'}, 'flowEntrySwitchState': 'FE_SWITCH_UNKNOWN'}]}
 #
 def shortest_path(v1, p1, v2, p2):
   try:
-    command = "curl -s http://%s:%s/wm/topology/route/%s/%s/%s/%s/json" % (ControllerIP, ControllerPort, v1, p1, v2, p2)
+    command = "curl -s http://%s:%s/wm/onos/topology/route/%s/%s/%s/%s/json" % (ControllerIP, ControllerPort, v1, p1, v2, p2)
     debug("shortest_path %s" % command)
 
     result = os.popen(command).read()
diff --git a/web/topology_rest.py b/web/topology_rest.py
index b3a415e..38dba5d 100755
--- a/web/topology_rest.py
+++ b/web/topology_rest.py
@@ -273,69 +273,69 @@
   return "http://" + host + ":8080"
 
 ## Switch ##
-@app.route("/wm/core/topology/switches/all/json")
+@app.route("/wm/onos/topology/switches/all/json")
 def switches():
   if request.args.get('proxy') == None:
     host = pick_host()
   else:
     host = ONOS_GUI3_HOST
 
-  url ="%s/wm/core/topology/switches/all/json" % (host)
+  url ="%s/wm/onos/topology/switches/all/json" % (host)
   (code, result) = get_json(url)
 
   resp = Response(result, status=code, mimetype='application/json')
   return resp
 
 ## Link ##
-@app.route("/wm/core/topology/links/json")
+@app.route("/wm/onos/topology/links/json")
 def links():
   if request.args.get('proxy') == None:
     host = pick_host()
   else:
     host = ONOS_GUI3_HOST
 
-  url ="%s/wm/core/topology/links/json" % (host)
+  url ="%s/wm/onos/topology/links/json" % (host)
   (code, result) = get_json(url)
 
   resp = Response(result, status=code, mimetype='application/json')
   return resp
 
 ## FlowSummary ##
-@app.route("/wm/flow/getsummary/<start>/<range>/json")
+@app.route("/wm/onos/flows/getsummary/<start>/<range>/json")
 def flows(start, range):
   if request.args.get('proxy') == None:
     host = pick_host()
   else:
     host = ONOS_GUI3_HOST
 
-  url ="%s/wm/flow/getsummary/%s/%s/json" % (host, start, range)
+  url ="%s/wm/onos/flows/getsummary/%s/%s/json" % (host, start, range)
   (code, result) = get_json(url)
 
   resp = Response(result, status=code, mimetype='application/json')
   return resp
 
-@app.route("/wm/registry/controllers/json")
+@app.route("/wm/onos/registry/controllers/json")
 def registry_controllers():
   if request.args.get('proxy') == None:
     host = pick_host()
   else:
     host = ONOS_GUI3_HOST
 
-  url= "%s/wm/registry/controllers/json" % (host)
+  url= "%s/wm/onos/registry/controllers/json" % (host)
   (code, result) = get_json(url)
 
   resp = Response(result, status=code, mimetype='application/json')
   return resp
 
 
-@app.route("/wm/registry/switches/json")
+@app.route("/wm/onos/registry/switches/json")
 def registry_switches():
   if request.args.get('proxy') == None:
     host = pick_host()
   else:
     host = ONOS_GUI3_HOST
 
-  url="%s/wm/registry/switches/json" % (host)
+  url="%s/wm/onos/registry/switches/json" % (host)
   (code, result) = get_json(url)
 
   resp = Response(result, status=code, mimetype='application/json')
@@ -354,7 +354,7 @@
 @app.route('/topology', methods=['GET'])
 def topology_for_gui():
   try:
-    command = "curl -s \'http://%s:%s/wm/core/topology/switches/all/json\'" % (RestIP, RestPort)
+    command = "curl -s \'http://%s:%s/wm/onos/topology/switches/all/json\'" % (RestIP, RestPort)
     result = os.popen(command).read()
     parsedResult = json.loads(result)
   except:
@@ -382,7 +382,7 @@
       switches.append(sw)
 
   try:
-    command = "curl -s \'http://%s:%s/wm/registry/switches/json\'" % (RestIP, RestPort)
+    command = "curl -s \'http://%s:%s/wm/onos/registry/switches/json\'" % (RestIP, RestPort)
     result = os.popen(command).read()
     parsedResult = json.loads(result)
   except:
@@ -404,7 +404,7 @@
 #    v2 = "00:00:00:00:00:0b:0d:03"
 #    v2 = "00:00:00:00:00:0d:00:d3"
 #    p2=1
-#    command = "curl -s http://%s:%s/wm/topology/route/%s/%s/%s/%s/json" % (RestIP, RestPort, v1, p1, v2, p2)
+#    command = "curl -s http://%s:%s/wm/onos/topology/route/%s/%s/%s/%s/json" % (RestIP, RestPort, v1, p1, v2, p2)
 #    result = os.popen(command).read()
 #    parsedResult = json.loads(result)
 #  except:
@@ -421,7 +421,7 @@
   #      path.append( (sdpid, ddpid))
 
   try:
-    command = "curl -s \'http://%s:%s/wm/core/topology/links/json\'" % (RestIP, RestPort)
+    command = "curl -s \'http://%s:%s/wm/onos/topology/links/json\'" % (RestIP, RestPort)
     result = os.popen(command).read()
     parsedResult = json.loads(result)
   except:
@@ -457,12 +457,12 @@
   resp = Response(js, status=200, mimetype='application/json')
   return resp
 
-#@app.route("/wm/topology/toporoute/00:00:00:00:00:a1/2/00:00:00:00:00:c1/3/json")
-#@app.route("/wm/topology/toporoute/<srcdpid>/<srcport>/<destdpid>/<destport>/json")
-@app.route("/wm/topology/toporoute/<v1>/<p1>/<v2>/<p2>/json")
+#@app.route("/wm/floodlight/topology/toporoute/00:00:00:00:00:a1/2/00:00:00:00:00:c1/3/json")
+#@app.route("/wm/floodlight/topology/toporoute/<srcdpid>/<srcport>/<destdpid>/<destport>/json")
+@app.route("/wm/floodlight/topology/toporoute/<v1>/<p1>/<v2>/<p2>/json")
 def shortest_path(v1, p1, v2, p2):
   try:
-    command = "curl -s \'http://%s:%s/wm/core/topology/switches/all/json\'" % (RestIP, RestPort)
+    command = "curl -s \'http://%s:%s/wm/onos/topology/switches/all/json\'" % (RestIP, RestPort)
     result = os.popen(command).read()
     parsedResult = json.loads(result)
   except:
@@ -494,7 +494,7 @@
       switches.append(sw)
 
   try:
-    command = "curl -s http://%s:%s/wm/topology/route/%s/%s/%s/%s/json" % (RestIP, RestPort, v1, p1, v2, p2)
+    command = "curl -s http://%s:%s/wm/onos/topology/route/%s/%s/%s/%s/json" % (RestIP, RestPort, v1, p1, v2, p2)
     result = os.popen(command).read()
     parsedResult = json.loads(result)
   except:
@@ -510,7 +510,7 @@
       path.append( (sdpid, ddpid))
 
   try:
-    command = "curl -s \'http://%s:%s/wm/core/topology/links/json\'" % (RestIP, RestPort)
+    command = "curl -s \'http://%s:%s/wm/onos/topology/links/json\'" % (RestIP, RestPort)
     result = os.popen(command).read()
     parsedResult = json.loads(result)
   except:
@@ -545,11 +545,11 @@
   resp = Response(js, status=200, mimetype='application/json')
   return resp
 
-@app.route("/wm/core/controller/switches/json")
+@app.route("/wm/floodlight/core/controller/switches/json")
 def query_switch():
   try:
-    command = "curl -s \'http://%s:%s/wm/core/topology/switches/all/json\'" % (RestIP, RestPort)
-#    http://localhost:8080/wm/core/topology/switches/active/json
+    command = "curl -s \'http://%s:%s/wm/onos/topology/switches/all/json\'" % (RestIP, RestPort)
+#    http://localhost:8080/wm/onos/topology/switches/active/json
     print command
     result = os.popen(command).read()
     parsedResult = json.loads(result)
@@ -577,7 +577,7 @@
   resp = Response(js, status=200, mimetype='application/json')
   return resp
 
-@app.route("/wm/device/")
+@app.route("/wm/floodlight/device/")
 def devices():
   try:
     command = "curl -s http://%s:%s/graphs/%s/vertices\?key=type\&value=device" % (RestIP, RestPort, DBName)
@@ -621,7 +621,7 @@
 #{"entityClass":"DefaultEntityClass","mac":["7c:d1:c3:e0:8c:a3"],"ipv4":["192.168.2.102","10.1.10.35"],"vlan":[],"attachmentPoint":[{"port":13,"switchDPID":"00:01:00:12:e2:78:32:44","errorStatus":null}],"lastSeen":1357333593496}
 
 ## return fake stat for now
-@app.route("/wm/core/switch/<switchId>/<statType>/json")
+@app.route("/wm/floodlight/core/switch/<switchId>/<statType>/json")
 def switch_stat(switchId, statType):
     if statType == "desc":
         desc=[{"length":1056,"serialNumber":"None","manufacturerDescription":"Nicira Networks, Inc.","hardwareDescription":"Open vSwitch","softwareDescription":"1.4.0+build0","datapathDescription":"None"}]
@@ -639,7 +639,7 @@
     return resp
 
 
-@app.route("/wm/topology/links/json")
+@app.route("/wm/onos/linkdiscovery/links/json")
 def query_links():
   try:
     command = 'curl -s http://%s:%s/graphs/%s/vertices?key=type\&value=port' % (RestIP, RestPort, DBName)
@@ -955,7 +955,7 @@
 @app.route("/gui/addflow/<src_dpid>/<src_port>/<dst_dpid>/<dst_port>/<srcMAC>/<dstMAC>")
 def add_flow(src_dpid, src_port, dst_dpid, dst_port, srcMAC, dstMAC):
   host = pick_host()
-  url ="%s/wm/flow/getsummary/%s/%s/json" % (host, 0, 0)
+  url ="%s/wm/onos/flows/getsummary/%s/%s/json" % (host, 0, 0)
   (code, result) = get_json(url)
   parsedResult = json.loads(result)
   if len(parsedResult) > 0:
@@ -990,7 +990,7 @@
 @app.route("/gui/iperf/start/<flow_id>/<duration>/<samples>")
 def iperf_start(flow_id,duration,samples):
   try:
-    command = "curl -s \'http://%s:%s/wm/flow/get/%s/json\'" % (RestIP, RestPort, flow_id)
+    command = "curl -s \'http://%s:%s/wm/onos/flows/get/%s/json\'" % (RestIP, RestPort, flow_id)
     print command
     result = os.popen(command).read()
     if len(result) == 0:
@@ -1055,7 +1055,7 @@
 @app.route("/gui/iperf/rate/<flow_id>")
 def iperf_rate(flow_id):
   try:
-    command = "curl -s \'http://%s:%s/wm/flow/get/%s/json\'" % (RestIP, RestPort, flow_id)
+    command = "curl -s \'http://%s:%s/wm/onos/flows/get/%s/json\'" % (RestIP, RestPort, flow_id)
     print command
     result = os.popen(command).read()
     if len(result) == 0: