summaryrefslogtreecommitdiffhomepage
path: root/ryu/topology/api.py
diff options
context:
space:
mode:
Diffstat (limited to 'ryu/topology/api.py')
-rw-r--r--ryu/topology/api.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/ryu/topology/api.py b/ryu/topology/api.py
index 7485a8e6..cd72b84b 100644
--- a/ryu/topology/api.py
+++ b/ryu/topology/api.py
@@ -35,4 +35,12 @@ def get_all_link(app):
return get_link(app)
+def get_host(app, dpid=None):
+ rep = app.send_request(event.EventHostRequest(dpid))
+ return rep.hosts
+
+
+def get_all_host(app):
+ return get_host(app)
+
app_manager.require_app('ryu.topology.switches', api_style=True)