diff options
author | YAMADA Hideki <yamada.hideki@po.ntts.co.jp> | 2013-03-28 18:50:26 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2013-03-31 18:12:34 +0900 |
commit | 2a7e193fae8d55066e7acfe89e52903053f30433 (patch) | |
tree | ac7dc6560fb7f868374cfc03acd635a709435ad1 | |
parent | 4590e0d20ec312df1d28b26e400854e04053cabe (diff) |
topology: exported function returns Switch/Link list instead of event
Signed-off-by: YAMADA Hideki <yamada.hideki@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/topology/switches.py | 6 |
1 files 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): |