summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorIWASE Yusuke <iwase.yusuke0@gmail.com>2016-01-18 16:37:58 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-01-19 10:52:21 +0900
commit9571fde7dddfafe48d961a7ffd312e3c872687b2 (patch)
tree94682854956a86cd5070c61894ae0f4c700bf915
parenta2d71f3198b8563884c0ae761f9c4210f577e63d (diff)
doc: Add Nicira Extension Structures references
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--doc/source/developing.rst1
-rw-r--r--doc/source/nicira_ext_ref.rst31
-rw-r--r--ryu/ofproto/nx_match.py28
3 files changed, 60 insertions, 0 deletions
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<idx> Integer 32bit Packet register.
+ <idx> 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),