diff --git a/doc/source/developing.rst b/doc/source/developing.rst index 2e416744..8f124b03 100644 --- a/doc/source/developing.rst +++ b/doc/source/developing.rst @@ -10,4 +10,5 @@ Writing Your Ryu Application ryu_app_api.rst library.rst ofproto_ref.rst + nicira_ext_ref.rst api_ref.rst diff --git a/doc/source/nicira_ext_ref.rst b/doc/source/nicira_ext_ref.rst new file mode 100644 index 00000000..dc7d5424 --- /dev/null +++ b/doc/source/nicira_ext_ref.rst @@ -0,0 +1,31 @@ +*************************** +Nicira Extension Structures +*************************** + +.. _nx_actions_structures: + +Nicira Extension Actions Structures +=================================== + +The followings shows the supported NXAction classes in OF1.3, +but also available in OF1.2+. + +.. py:currentmodule:: ryu.ofproto.ofproto_v1_3_parser + + +.. autoclass:: NXActionRegMove +.. autoclass:: NXActionLearn +.. autoclass:: NXActionConjunction +.. autoclass:: NXActionResubmitTable +.. autoclass:: NXActionCT +.. autoclass:: NXFlowSpecMatch +.. autoclass:: NXFlowSpecLoad +.. autoclass:: NXFlowSpecOutput + +.. _nx_match_structures: + +Nicira Extended Match Structures +================================ + +.. automodule:: ryu.ofproto.nx_match + diff --git a/ryu/ofproto/nx_match.py b/ryu/ofproto/nx_match.py index ca4b270a..281fdc22 100644 --- a/ryu/ofproto/nx_match.py +++ b/ryu/ofproto/nx_match.py @@ -16,6 +16,7 @@ # limitations under the License. import struct +import sys from ryu import exception from ryu.lib import mac @@ -1194,6 +1195,33 @@ class NXMatch(object): # The followings are implementations for OpenFlow 1.2+ # +sys.modules[__name__].__doc__ = """ +The API of this class is the same as ``OFPMatch``. + +You can define the flow match by the keyword arguments. +The following arguments are available. + +================ =============== ================================== +Argument Value Description +================ =============== ================================== +eth_dst_nxm MAC address Ethernet destination address. +eth_src_nxm MAC address Ethernet source address. +tunnel_id_nxm Integer 64bit Tunnel identifier. +tun_ipv4_src IPv4 address Tunnel IPv4 source address. +tun_ipv4_dst IPv4 address Tunnel IPv4 destination address. +pkt_mark Integer 32bit Packet metadata mark. +conj_id Integer 32bit Conjunction ID used only with + the conjunction action +ct_state Integer 32bit Conntrack state. +ct_zone Integer 16bit Conntrack zone. +ct_mark Integer 32bit Conntrack mark. +ct_label Integer 128bit Conntrack label. +_dp_hash Integer 32bit Flow hash computed in Datapath. +reg Integer 32bit Packet register. + is register number 0-7. +================ =============== ================================== +""" + oxm_types = [ oxm_fields.NiciraExtended0('eth_dst_nxm', 1, type_desc.MacAddr), oxm_fields.NiciraExtended0('eth_src_nxm', 2, type_desc.MacAddr),