Fixed Issue #207:
Implement remaining API for getting flow state
NOTE: The implementation of the API backend is sub-optimal,
but should be sufficient for now:
We fetch all flows, and then return only the subset that match
the query conditions.
We should use the appropriate Titan/Gremlin query to filter-out
the flows as appropriate.
Estimated: 2D
Actual: 1D
diff --git a/web/add_flow.py b/web/add_flow.py
index 5c3b3ab..18846b7 100755
--- a/web/add_flow.py
+++ b/web/add_flow.py
@@ -84,7 +84,7 @@
exit(1)
if __name__ == "__main__":
- usage_msg = "Usage: %s <flow-id> <src-dpid> <src-port> <dest-dpid> <dest-port>" % (sys.argv[0])
+ usage_msg = "Usage: %s <flow-id> <installer-id> <src-dpid> <src-port> <dest-dpid> <dest-port>" % (sys.argv[0])
# app.debug = False;
@@ -94,14 +94,14 @@
exit(0)
# Check arguments
- if len(sys.argv) < 6:
+ if len(sys.argv) < 7:
log_error(usage_msg)
exit(1)
# Do the work
- data_path = shortest_path(sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5]);
- my_installer_id = 'ONOS-Path-Computation-Python'
- my_flow_id = sys.argv[1];
+ my_flow_id = sys.argv[1]
+ my_installer_id = sys.argv[2]; # 'ONOS-Path-Computation-Python'
+ data_path = shortest_path(sys.argv[3], sys.argv[4], sys.argv[5], sys.argv[6])
debug("Data Path: %s" % data_path)