From 2a7e193fae8d55066e7acfe89e52903053f30433 Mon Sep 17 00:00:00 2001 From: YAMADA Hideki Date: Thu, 28 Mar 2013 18:50:26 +0900 Subject: [PATCH] topology: exported function returns Switch/Link list instead of event Signed-off-by: YAMADA Hideki Signed-off-by: FUJITA Tomonori --- ryu/topology/switches.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ryu/topology/switches.py b/ryu/topology/switches.py index 6b69a001..318473fa 100644 --- a/ryu/topology/switches.py +++ b/ryu/topology/switches.py @@ -804,7 +804,8 @@ class Switches(app_manager.RyuApp): def get_switch(app, dpid=None): - return app.send_request(event.EventSwitchRequest(dpid)) + rep = app.send_request(event.EventSwitchRequest(dpid)) + return rep.switches def get_all_switch(app): @@ -812,7 +813,8 @@ def get_all_switch(app): def get_link(app, dpid=None): - return app.send_request(event.EventLinkRequest(dpid)) + rep = app.send_request(event.EventLinkRequest(dpid)) + return rep.links def get_all_link(app):