Signed-off-by: IWASE Yusuke <[email protected]>
---
 doc/source/ryu_app_api.rst  | 14 +++++---------
 ryu/controller/ofp_event.py | 26 ++++++++++++++++++++++++++
 2 files changed, 31 insertions(+), 9 deletions(-)

diff --git a/doc/source/ryu_app_api.rst b/doc/source/ryu_app_api.rst
index 06276e5..323b4a9 100644
--- a/doc/source/ryu_app_api.rst
+++ b/doc/source/ryu_app_api.rst
@@ -198,16 +198,12 @@ The base class for synchronous request reply for 
RyuApp.send_reply.
 ryu.controller.ofp_event.EventOFPStateChange
 ============================================
 
-An event class for negotiation phase change notification.
-An instance of this class is sent to observer after changing
-the negotiation phase.
-An instance has at least the following attributes.
+.. autoclass:: ryu.controller.ofp_event.EventOFPStateChange
 
-========= ====================================================================
-Attribute Description
-========= ====================================================================
-datapath  ryu.controller.controller.Datapath instance of the switch
-========= ====================================================================
+ryu.controller.ofp_event.EventOFPPortStateChange
+================================================
+
+.. autoclass:: ryu.controller.ofp_event.EventOFPPortStateChange
 
 ryu.controller.dpset.EventDP
 ============================
diff --git a/ryu/controller/ofp_event.py b/ryu/controller/ofp_event.py
index aa2b6c1..8c990aa 100644
--- a/ryu/controller/ofp_event.py
+++ b/ryu/controller/ofp_event.py
@@ -81,12 +81,38 @@ for ofp_mods in ofproto.get_ofp_modules().values():
 
 
 class EventOFPStateChange(event.EventBase):
+    """
+    An event class for negotiation phase change notification.
+    An instance of this class is sent to observer after changing
+    the negotiation phase.
+    An instance has at least the following attributes.
+
+    ========= =================================================================
+    Attribute Description
+    ========= =================================================================
+    datapath  ryu.controller.controller.Datapath instance of the switch
+    ========= =================================================================
+    """
     def __init__(self, dp):
         super(EventOFPStateChange, self).__init__()
         self.datapath = dp
 
 
 class EventOFPPortStateChange(event.EventBase):
+    """
+    An event class to notify the port state changes of Dtatapath instance.
+    This event performs like EventOFPPortStatus, but Ryu will
+    send this event after updating ``ports`` dict of Datapath instances.
+    An instance has at least the following attributes.
+
+    ========= =================================================================
+    Attribute Description
+    ========= =================================================================
+    datapath  ryu.controller.controller.Datapath instance of the switch
+    reason    one of OFPPR_*
+    port_no   Port number which state was changed
+    ========= =================================================================
+    """
     def __init__(self, dp, reason, port_no):
         super(EventOFPPortStateChange, self).__init__()
         self.datapath = dp
-- 
2.7.4


------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to