Renamed "devices" to "hosts" in the Topology REST API:
* REST call path rename:
http://%s:%s/wm/onos/topology/devices ->
http://%s:%s/wm/onos/topology/hosts
* Topology output JSON format: renamed field "devices" to "hosts".
OLD:
{
...
"devices": [...],
...
}
NEW:
{
...
"hosts": [...],
...
}
TODO in (a) separate commit(s):
* Renaming of "Device/Devices" and "device/devices" in the Java API
* Renaming of "Device/Devices" and "device/devices" in the backend
implementation
Change-Id: Ic70bf166f885a1a5ba7d8d33326ff43f84d2c506
diff --git a/onoscli b/onoscli
index 0d7caee..6bfa9d0 100755
--- a/onoscli
+++ b/onoscli
@@ -162,9 +162,9 @@
#
Command("show", "Show command"),
#
- Command("show device", "Show devices"),
+ Command("show host", "Show hosts"),
#
- Command("show device all", "Show all devices", self.show_device_all),
+ Command("show host all", "Show all hosts", self.show_host_all),
#
Command("show intent", "Show intents"),
#
@@ -300,10 +300,10 @@
# if len(result) != 0:
# self.print_json_result(result)
- def show_device_all(self, args):
- "CLI command callback: show device all"
+ def show_host_all(self, args):
+ "CLI command callback: show host all"
- url = "http://%s:%s/wm/onos/topology/devices" % (self.onos_ip, self.onos_port)
+ url = "http://%s:%s/wm/onos/topology/hosts" % (self.onos_ip, self.onos_port)
result = get_json(url)
self.print_json_result(result)