Hi, Hu

I've just submitted the patch which enables to get more informations from EventNewOVSDBConnection. (Subject: [PATCH 1/5] service/ovsdb: Add properties to EventNewOVSDBConnection)
Could you review my patch?

---
 ryu/services/protocols/ovsdb/event.py   | 10 +++++++---
 ryu/services/protocols/ovsdb/manager.py |  2 +-
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/ryu/services/protocols/ovsdb/event.py b/ryu/services/protocols/ovsdb/event.py
index 486e5c7..f162b52 100644
--- a/ryu/services/protocols/ovsdb/event.py
+++ b/ryu/services/protocols/ovsdb/event.py
@@ -119,13 +119,17 @@ class EventModifyReply(ryu_event.EventReplyBase):


 class EventNewOVSDBConnection(ryu_event.EventBase):
-    def __init__(self, system_id):
+    def __init__(self, client):
         super(EventNewOVSDBConnection, self).__init__()
-        self.system_id = system_id
+        self.client = client

     def __str__(self):
         return '%s<system_id=%s>' % (self.__class__.__name__,
-                                     self.system_id)
+ self.client.system_id)
+
+    @property
+    def system_id(self):
+        return self.client.system_id


 class EventReadRequest(ryu_event.EventRequestBase):
diff --git a/ryu/services/protocols/ovsdb/manager.py b/ryu/services/protocols/ovsdb/manager.py
index 86a2d1f..9822503 100644
--- a/ryu/services/protocols/ovsdb/manager.py
+++ b/ryu/services/protocols/ovsdb/manager.py
@@ -146,7 +146,7 @@ class OVSDB(app_manager.RyuApp):
         if app:
             self._clients[app.name] = app
             app.start()
-            ev = event.EventNewOVSDBConnection(app.system_id)
+            ev = event.EventNewOVSDBConnection(app)
             self.send_event_to_observers(ev)

         else:
--

Thanks,
Fujimoto

On 2017年06月14日 16:30, Hu Dingyuan wrote:

Hi Fujimoto,

I just want to get the ip address of ovsdb.

I think RemoteOvsdb has enough information and these information should be available for app developer though EventNewOVSDBConnection and other events.

*From: *Fujimoto Satoshi <satoshi.fujimo...@gmail.com>
*Reply-To: *"ryu-devel@lists.sourceforge.net" <ryu-devel@lists.sourceforge.net>
*Date: *Wednesday, 14 June 2017 at 15:16
*To: *Dingyuan <h...@outlook.com>, "ryu-devel@lists.sourceforge.net" <ryu-devel@lists.sourceforge.net> *Subject: *Re: [Ryu-devel] [feature request] get ovs information from ovsdb protocol

Hello, Hu

Could you tell me what informations you want to get?
For example, informations which RemoteOvsdb has are enough for you?
https://github.com/osrg/ryu/blob/master/ryu/services/protocols/ovsdb/manager.py#L139-L144

Thanks,
Fujimoto

On 2017年06月14日 13:03, Hu Dingyuan wrote:

    Hi,

    When I use OpenFlow protocol, I can get bridge ip address though
    `ev.msg.datapath.address[0]`.

    But when I try to use OVSDB protocol, I can only get `system_id`
    from `ev`.

    Can someone help me to get more information from
    `ovsdb_event.EventNewOVSDBConnection`?




    
------------------------------------------------------------------------------

    Check out the vibrant tech community on one of the world's most

    engaging tech sites, Slashdot.org!http://sdm.link/slashdot




    _______________________________________________

    Ryu-devel mailing list

    Ryu-devel@lists.sourceforge.net
    <mailto:Ryu-devel@lists.sourceforge.net>

    https://lists.sourceforge.net/lists/listinfo/ryu-devel





------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to