Fix a bug and cleanup the Topology REST API:
* Fix a bug in the base path:
/wm/onos -> /wm/onos/topology
If the base path is the top-level prefix /wm/onos, it hides all other
ONOS REST APIs that are added by a different module if at runtime
they are added after the NetworkGraphWebRoutable Restlet.
* Removed old REST APIs:
"/rc/switches/json"
"/rc/links/json"
"/rc/ports/json"
Those are same as the existing:
"/ds/switches/json"
"/ds/links/json"
"/ds/ports/json"
* Removed the "/ng" prefix for accessing the topology-related info
* Removed the old Topology API
Now the remaining and updated Topology REST API is:
// debug API to dump datastore content
/wm/onos/topology/ds/switches/json
/wm/onos/topology/ds/links/json
/wm/onos/topology/ds/ports/json
// Topology API
/wm/onos/topology/switches/json
/wm/onos/topology/links/json
// TODO: This one will be moved to the Intent framework REST API
/wm/onos/topology/shortest-path/{src-dpid}/{dst-dpid}/json
Change-Id: I367007413d9abdf28e0ce4ea0b78b2704f196dc7
diff --git a/scripts/get_network_graph.py b/scripts/get_network_graph.py
index c4b880d..b91b569 100755
--- a/scripts/get_network_graph.py
+++ b/scripts/get_network_graph.py
@@ -39,7 +39,7 @@
# @app.route("/wm/onos/topology/links/json ")
# @app.route("/wm/onos/topology/switches/json ")
-# @app.route("/wm/onos/ng/shortest-path/<src-dpid>/<dst-dpid>/json ")
+# @app.route("/wm/onos/topology/shortest-path/<src-dpid>/<dst-dpid>/json ")
# Sample output:
def print_parsed_result(parsedResult):
@@ -89,7 +89,7 @@
def get_network_shortest_path(src_dpid, dst_dpid):
try:
- command = "curl -s \"http://%s:%s/wm/onos/ng/shortest-path/%s/%s/json\"" % (ControllerIP, ControllerPort, src_dpid, dst_dpid)
+ command = "curl -s \"http://%s:%s/wm/onos/topology/shortest-path/%s/%s/json\"" % (ControllerIP, ControllerPort, src_dpid, dst_dpid)
debug("get_network_switches %s" % command)
result = os.popen(command).read()