Separated ONOS specific REST API modules from floodlight.
Renamed floodlight REST API paths.
diff --git a/web/js/models/hostmodel.js b/web/js/models/hostmodel.js
index 8de3dd6..370ef02 100644
--- a/web/js/models/hostmodel.js
+++ b/web/js/models/hostmodel.js
@@ -35,7 +35,7 @@
var self = this;
//console.log("fetching host list")
$.ajax({
- url:hackBase + "/wm/device/",
+ url:hackBase + "/fl/device/",
dataType:"json",
success:function (data) {
//console.log("fetched host list: " + data.length);
diff --git a/web/js/models/statusmodel.js b/web/js/models/statusmodel.js
index b7cdebd..2dbb143 100644
--- a/web/js/models/statusmodel.js
+++ b/web/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 + "/fl/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 + "/fl/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 + "/fl/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 + "/fl/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/js/models/switchmodel.js
index 4104dd0..79f2016 100644
--- a/web/js/models/switchmodel.js
+++ b/web/js/models/switchmodel.js
@@ -16,7 +16,7 @@
window.Switch = Backbone.Model.extend({
- urlRoot:"/wm/core/switch/",
+ urlRoot:"/fl/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 + "/fl/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 + "/fl/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 + "/fl/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 + "/fl/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 + "/fl/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 + "/fl/core/controller/switches/json",
dataType:"json",
success:function (data) {
//console.log("fetched switch list: " + data.length);
diff --git a/web/onos-topology-route.html b/web/onos-topology-route.html
index 6c167c7..5f19144 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/fl/topology/toporoute/00:00:00:0d:00:d1/2/00:00:00:0d:00:d3/3/json");
</script>
</svg>
</body>
diff --git a/web/restapi.py b/web/restapi.py
index a3bd51c..028d11e 100755
--- a/web/restapi.py
+++ b/web/restapi.py
@@ -61,14 +61,14 @@
# resp = Response(js, status=200, mimetype='application/json')
# return resp
-#@app.route("/wm/core/controller/switches/json")
+#@app.route("/fl/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("/fl/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("/fl/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("/fl/core/controller/switches/json")
def query_switch():
try:
command = "curl -s http://%s:%s/graphs/%s/vertices" % (RestIP, RestPort, DBName)
diff --git a/web/restapi2.py b/web/restapi2.py
index c9952ac..b341033 100755
--- a/web/restapi2.py
+++ b/web/restapi2.py
@@ -158,14 +158,14 @@
# resp = Response(js, status=200, mimetype='application/json')
# return resp
-#@app.route("/wm/core/controller/switches/json")
+#@app.route("/fl/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("/fl/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("/fl/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("/fl/core/controller/switches/json")
def query_switch():
try:
command = "curl -s http://%s:%s/graphs/%s/vertices?key=type\&value=switch" % (RestIP, RestPort, DBName)
diff --git a/web/restapi3.py b/web/restapi3.py
index 001faa6..79eb189 100755
--- a/web/restapi3.py
+++ b/web/restapi3.py
@@ -137,7 +137,7 @@
return response
-@app.route("/wm/device/")
+@app.route("/fl/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("/fl/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("/fl/core/controller/switches/json")
def query_switch():
try:
command = "curl -s \'http://%s:%s/graphs/%s/vertices?key=type&value=switch\'" % (RestIP, RestPort, DBName)
diff --git a/web/topology_rest.py b/web/topology_rest.py
index b3a415e..0e54347 100755
--- a/web/topology_rest.py
+++ b/web/topology_rest.py
@@ -457,9 +457,9 @@
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("/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")
def shortest_path(v1, p1, v2, p2):
try:
command = "curl -s \'http://%s:%s/wm/core/topology/switches/all/json\'" % (RestIP, RestPort)
@@ -545,7 +545,7 @@
resp = Response(js, status=200, mimetype='application/json')
return resp
-@app.route("/wm/core/controller/switches/json")
+@app.route("/fl/core/controller/switches/json")
def query_switch():
try:
command = "curl -s \'http://%s:%s/wm/core/topology/switches/all/json\'" % (RestIP, RestPort)
@@ -577,7 +577,7 @@
resp = Response(js, status=200, mimetype='application/json')
return resp
-@app.route("/wm/device/")
+@app.route("/fl/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("/fl/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"}]