Bugfix for switch node labels getting wrong after some time.
Change-Id: Ibbab82aa09a5ff5650b7435464943fad3b9e20e2
diff --git a/web/simple_web_server.py b/web/simple_web_server.py
index 14fa05d..3abd0b0 100755
--- a/web/simple_web_server.py
+++ b/web/simple_web_server.py
@@ -17,7 +17,7 @@
@app.route('/', methods=['GET'])
@app.route('/<filename>', methods=['GET'])
@app.route('/js/<filename>', methods=['GET'])
-def return_file(filename):
+def return_file(filename="/"):
if request.path == "/":
fullpath = "./simple-topo.html"
else:
@@ -50,8 +50,7 @@
@app.route('/wm/', defaults={'path':''})
@app.route('/wm/<path:path>')
def rest(path):
- url="http://localhost:8080/wm/" + path
- print url
+ url="http://%s:%s/wm/%s" % (RestIP, RestPort, path)
try:
response = urlopen(url)
except URLError, e:
@@ -61,11 +60,9 @@
print "ONOS REST IF %s has issue. Code %s" % (url, e.code)
result = ""
- print response
result = response.read()
return result
if __name__ == "__main__":
app.debug = True
app.run(threaded=True, host="0.0.0.0", port=9000)
-# app.run(threaded=False, host="0.0.0.0", port=9000)