Renamed paths of REST API.
diff --git a/src/main/java/net/floodlightcontroller/core/internal/Controller.java b/src/main/java/net/floodlightcontroller/core/internal/Controller.java
index d5074f3..42fb3c6 100644
--- a/src/main/java/net/floodlightcontroller/core/internal/Controller.java
+++ b/src/main/java/net/floodlightcontroller/core/internal/Controller.java
@@ -61,7 +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.OnosCoreWebRoutable;
+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;
@@ -1832,7 +1832,7 @@
// Add our REST API
restApi.addRestletRoutable(new CoreWebRoutable());
- restApi.addRestletRoutable(new OnosCoreWebRoutable());
+ 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 e55c6cf..0e48975 100644
--- a/src/main/java/net/floodlightcontroller/core/web/CoreWebRoutable.java
+++ b/src/main/java/net/floodlightcontroller/core/web/CoreWebRoutable.java
@@ -31,7 +31,7 @@
public class CoreWebRoutable implements RestletRoutable {
@Override
public String basePath() {
- return "/fl/core";
+ return "/wm/floodlight/core";
}
@Override
diff --git a/src/main/java/net/floodlightcontroller/devicemanager/web/DeviceRoutable.java b/src/main/java/net/floodlightcontroller/devicemanager/web/DeviceRoutable.java
index b77bd2b..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 "/fl/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 b3e4a0b..363a194 100644
--- a/src/main/java/net/floodlightcontroller/topology/web/TopologyWebRoutable.java
+++ b/src/main/java/net/floodlightcontroller/topology/web/TopologyWebRoutable.java
@@ -25,6 +25,6 @@
*/
@Override
public String basePath() {
- return "/fl/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/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/Main.java b/src/main/java/net/onrc/onos/ofcontroller/core/Main.java
index 30544f7..a80ac36 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/core/Main.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/core/Main.java
@@ -9,7 +9,6 @@
import net.floodlightcontroller.core.module.FloodlightModuleLoader;
import net.floodlightcontroller.core.module.IFloodlightModuleContext;
import net.floodlightcontroller.restserver.IRestApiService;
-import net.onrc.onos.ofcontroller.core.web.OnosCoreWebRoutable;
/**
* Host for the ONOS main method
diff --git a/src/main/java/net/onrc/onos/ofcontroller/core/web/OnosCoreWebRoutable.java b/src/main/java/net/onrc/onos/ofcontroller/core/web/OnosCoreWebRoutable.java
deleted file mode 100644
index 35fa3ea..0000000
--- a/src/main/java/net/onrc/onos/ofcontroller/core/web/OnosCoreWebRoutable.java
+++ /dev/null
@@ -1,26 +0,0 @@
-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;
-import net.onrc.onos.ofcontroller.devicemanager.web.TopoDevicesResource;
-
-public class OnosCoreWebRoutable implements RestletRoutable {
- @Override
- public String basePath() {
- return "/wm/core";
- }
-
- @Override
- public Restlet getRestlet(Context context) {
- Router router = new Router(context);
- // 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/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/web/FlowWebRoutable.java b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/web/FlowWebRoutable.java
index c358263..ec448a3 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
@@ -30,6 +30,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/topology/web/OnosTopologyWebRoutable.java b/src/main/java/net/onrc/onos/ofcontroller/topology/web/OnosTopologyWebRoutable.java
index 75ad931..90eed9a 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/topology/web/OnosTopologyWebRoutable.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/topology/web/OnosTopologyWebRoutable.java
@@ -5,21 +5,25 @@
import org.restlet.routing.Router;
import net.floodlightcontroller.restserver.RestletRoutable;
-import net.onrc.onos.ofcontroller.linkdiscovery.web.LinksResource;
+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("/links/json", LinksResource.class);
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/topology";
+ return "/wm/onos/topology";
}
}
diff --git a/src/main/java/net/onrc/onos/registry/controller/web/RegistryWebRoutable.java b/src/main/java/net/onrc/onos/registry/controller/web/RegistryWebRoutable.java
index ce1b48f..77dd72d 100644
--- a/src/main/java/net/onrc/onos/registry/controller/web/RegistryWebRoutable.java
+++ b/src/main/java/net/onrc/onos/registry/controller/web/RegistryWebRoutable.java
@@ -18,7 +18,7 @@
@Override
public String basePath() {
- return "/wm/registry";
+ return "/wm/onos/registry";
}
}
diff --git a/web/add_flow.py b/web/add_flow.py
index 9690024..9f85bb4 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-shortest-path/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/floodlight/js/models/hostmodel.js b/web/floodlight/js/models/hostmodel.js
index 370ef02..1caff6c 100644
--- a/web/floodlight/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 + "/fl/device/",
+ url:hackBase + "/wm/floodlight/device/",
dataType:"json",
success:function (data) {
//console.log("fetched host list: " + data.length);
diff --git a/web/floodlight/js/models/statusmodel.js b/web/floodlight/js/models/statusmodel.js
index 2dbb143..5cbb526 100644
--- a/web/floodlight/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 + "/fl/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 + "/fl/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 + "/fl/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 + "/fl/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/floodlight/js/models/switchmodel.js b/web/floodlight/js/models/switchmodel.js
index 79f2016..700a1cf 100644
--- a/web/floodlight/js/models/switchmodel.js
+++ b/web/floodlight/js/models/switchmodel.js
@@ -16,7 +16,7 @@
window.Switch = Backbone.Model.extend({
- urlRoot:"/fl/core/switch/",
+ urlRoot:"/wm/floodlight/core/switch/",
defaults: {
datapathDescription: '',
@@ -34,7 +34,7 @@
//console.log("fetching switch " + this.id + " desc")
$.ajax({
- url:hackBase + "/fl/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 + "/fl/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 + "/fl/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 + "/fl/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 + "/fl/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 + "/fl/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/floodlight/js/models/topologymodel.js b/web/floodlight/js/models/topologymodel.js
index c5d8f9b..bcac141 100644
--- a/web/floodlight/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/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 5f19144..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/fl/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 028d11e..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("/fl/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("/fl/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("/fl/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("/fl/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 b341033..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("/fl/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("/fl/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("/fl/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("/fl/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 79eb189..f3bb3eb 100755
--- a/web/restapi3.py
+++ b/web/restapi3.py
@@ -137,7 +137,7 @@
return response
-@app.route("/fl/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("/fl/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("/fl/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 0e54347..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("/fl/topology/toporoute/00:00:00:00:00:a1/2/00:00:00:00:00:c1/3/json")
-#@app.route("/fl/topology/toporoute/<srcdpid>/<srcport>/<destdpid>/<destport>/json")
-@app.route("/fl/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("/fl/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("/fl/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("/fl/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: