Signed-off-by: Isaku Yamahata <[email protected]>
---
ryu/app/client.py | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/ryu/app/client.py b/ryu/app/client.py
index d54fe44..4f6287f 100644
--- a/ryu/app/client.py
+++ b/ryu/app/client.py
@@ -83,3 +83,24 @@ class OFPClientV1_0(RyuClientBase):
OFPClient = OFPClientV1_0
+
+
+class DiscoveryClientV1_0(RyuClientBase):
+ version = 'v1.0'
+
+ # /topology/links
+ # /topology/switch/{dpid}/links
+ path_links = 'topology/links'
+ path_switch_links = 'topology/switch/%(dpid)s/links'
+
+ def __init__(self, address):
+ super(DiscoveryClientV1_0, self).__init__(self.version, address)
+
+ def list_links(self):
+ return self._do_request_read('GET', self.path_links)
+
+ def list_switch_links(self, dpid):
+ return self._do_request_read('GET', self.path_switch_links % locals())
+
+
+DiscoveryClient = DiscoveryClientV1_0
--
1.7.1.1
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel