Changed REST API routes of FlowPusher.
diff --git a/web/pusher.py b/web/pusher.py
index f53e3ea..2a3528b 100755
--- a/web/pusher.py
+++ b/web/pusher.py
@@ -29,14 +29,12 @@
if DEBUG:
print '%s' % (txt)
-# @app.route("/wm/fprog/setrate/<dpid>/<rate>/json")
+# @app.route("/wm/fprog/pusher/setrate/<dpid>/<rate>/json")
# Sample output:
# "true"
-
-
def set_rate(dpid,rate):
try:
- command = "curl -s \"http://%s:%s/wm/fprog/setrate/%s/%s/json\"" % (ControllerIP, ControllerPort, dpid, rate)
+ command = "curl -s \"http://%s:%s/wm/fprog/pusher/setrate/%s/%s/json\"" % (ControllerIP, ControllerPort, dpid, rate)
debug("set_rate %s" % command)
result = os.popen(command).read()
@@ -50,9 +48,12 @@
print "Sending rate to %s is successfully set to %s" % (dpid, rate)
+# @app.route("/wm/fprog/pusher/suspend/<dpid>/json")
+# Sample output:
+# "true"
def suspend(dpid):
try:
- command = "curl -s \"http://%s:%s/wm/fprog/suspend/%s/json\"" % (ControllerIP, ControllerPort, dpid)
+ command = "curl -s \"http://%s:%s/wm/fprog/pusher/suspend/%s/json\"" % (ControllerIP, ControllerPort, dpid)
debug("suspend %s" % command)
result = os.popen(command).read()
@@ -66,9 +67,12 @@
print "DPID %s is successfully suspended" % dpid
+# @app.route("/wm/fprog/pusher/resume/<dpid>/json")
+# Sample output:
+# "true"
def resume(dpid):
try:
- command = "curl -s \"http://%s:%s/wm/fprog/resume/%s/json\"" % (ControllerIP, ControllerPort, dpid)
+ command = "curl -s \"http://%s:%s/wm/fprog/pusher/resume/%s/json\"" % (ControllerIP, ControllerPort, dpid)
debug("resume %s" % command)
result = os.popen(command).read()
@@ -82,9 +86,12 @@
print "DPID %s is successfully resumed" % dpid
+# @app.route("/wm/fprog/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/barrier/%s/json\"" % (ControllerIP, ControllerPort, dpid)
+ command = "curl -s \"http://%s:%s/wm/fprog/pusher/barrier/%s/json\"" % (ControllerIP, ControllerPort, dpid)
debug("barrier %s" % command)
result = os.popen(command).read()