diff options
author | Minoru TAKAHASHI <takahashi.minoru7@gmail.com> | 2015-09-17 13:03:52 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-09-18 08:27:42 +0900 |
commit | c36bafea262663f24550dba00e531bc25ad2d247 (patch) | |
tree | 9cf131533bc4f5d7c1a75aaf0e39209dd2f1200b | |
parent | c638c345dd86466a7ea55f705bb46c7842daad11 (diff) |
doc/ofproto_v1_5_ref: Add description for Port Structures and Controller Status Structure
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | doc/source/ofproto_v1_5_ref.rst | 9 | ||||
-rw-r--r-- | ryu/ofproto/ofproto_v1_5_parser.py | 60 |
2 files changed, 69 insertions, 0 deletions
diff --git a/doc/source/ofproto_v1_5_ref.rst b/doc/source/ofproto_v1_5_ref.rst index 2ac0a837..a78cfb67 100644 --- a/doc/source/ofproto_v1_5_ref.rst +++ b/doc/source/ofproto_v1_5_ref.rst @@ -524,6 +524,11 @@ Experimenter .. literalinclude:: ../../ryu/tests/unit/ofproto/json/of15/libofproto-OFP15-error_msg_experimenter.packet.json +Port Structures +=============== + +.. autoclass:: OFPPort + Flow Match Structure ==================== @@ -565,4 +570,8 @@ Action Structures .. autoclass:: OFPActionMeter .. autoclass:: OFPActionExperimenter +Controller Status Structure +=========================== + +.. autoclass:: OFPControllerStatusStats diff --git a/ryu/ofproto/ofproto_v1_5_parser.py b/ryu/ofproto/ofproto_v1_5_parser.py index 01dcad0f..99a92fa4 100644 --- a/ryu/ofproto/ofproto_v1_5_parser.py +++ b/ryu/ofproto/ofproto_v1_5_parser.py @@ -2094,6 +2094,34 @@ class OFPFlowRemoved(MsgBase): class OFPPort(StringifyMixin): + + """ + Description of a port + + ========== ========================================================= + Attribute Description + ========== ========================================================= + port_no Port number and it uniquely identifies a port within + a switch. + length Length of ofp_port (excluding padding). + hw_addr MAC address for the port. + name Null-terminated string containing a human-readable name + for the interface. + config Bitmap of port configration flags. + + | OFPPC_PORT_DOWN + | OFPPC_NO_RECV + | OFPPC_NO_FWD + | OFPPC_NO_PACKET_IN + state Bitmap of port state flags. + + | OFPPS_LINK_DOWN + | OFPPS_BLOCKED + | OFPPS_LIVE + properties List of ``OFPPortDescProp`` subclass instance + ========== ========================================================= + """ + _TYPE = { 'ascii': [ 'hw_addr', @@ -5272,6 +5300,38 @@ class OFPControllerStatusPropExperimenter(OFPPropCommonExperimenter4ByteData): class OFPControllerStatusStats(StringifyMixin): + + """ + Controller status structure + + ============== ========================================================= + Attribute Description + ============== ========================================================= + length Length of this entry. + short_id ID number which identifies the controller. + role Bitmap of controller's role flags. + + | OFPCR_ROLE_NOCHANGE + | OFPCR_ROLE_EQUAL + | OFPCR_ROLE_MASTER + | OFPCR_ROLE_SLAVE + reason Bitmap of controller status reason flags. + + | OFPCSR_REQUEST + | OFPCSR_CHANNEL_STATUS + | OFPCSR_ROLE + | OFPCSR_CONTROLLER_ADDED + | OFPCSR_CONTROLLER_REMOVED + | OFPCSR_SHORT_ID + | OFPCSR_EXPERIMENTER + channel_status Bitmap of control channel status flags. + + | OFPCT_STATUS_UP + | OFPCT_STATUS_DOWN + properties List of ``OFPControllerStatusProp`` subclass instance + ============== ========================================================= + """ + def __init__(self, short_id=None, role=None, reason=None, channel_status=None, properties=None, length=None): super(OFPControllerStatusStats, self).__init__() |