summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2012-04-04 18:37:52 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2012-05-01 08:41:29 +0900
commit7858adf321b48821e25b755498d56683d1bb62b9 (patch)
treed5833bf775d6448b7893acbdcbbf5430bcf833a7
parentd435bc605bcfa6f6ddd2a8ca5559d75dd93b7225 (diff)
ofproto/ofproto_v1_0_parser: serializer for NXActionResbumit
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/ofproto/ofproto_v1_0_parser.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/ryu/ofproto/ofproto_v1_0_parser.py b/ryu/ofproto/ofproto_v1_0_parser.py
index 3b61d5a2..f3fd172e 100644
--- a/ryu/ofproto/ofproto_v1_0_parser.py
+++ b/ryu/ofproto/ofproto_v1_0_parser.py
@@ -369,6 +369,33 @@ class NXActionHeader(object):
buf, offset, self.type, self.len)
+class NXActionResubmitBase(NXActionHeader):
+ def __init__(self, subtype, in_port, table):
+ assert subtype in (ofproto_v1_0.NXAST_RESUBMIT,
+ ofproto_v1_0.NXAST_RESUBMIT_TABLE)
+ super(NXActionResubmitBase, self).__init__(
+ subtype, ofproto_v1_0.NX_ACTION_RESUBMIT_SIZE)
+ self.in_port = in_port
+ self.table = table
+
+ def serialize(self, buf, offset):
+ msg_pack_into(ofproto_v1_0.NX_ACTION_RESUBMIT_PACK_STR, buf, offset,
+ self.type, self.len, self.vendor, self.subtype,
+ self.in_port, self.table)
+
+
+class NXActionResubmit(NXActionResubmitBase):
+ def __init__(self, in_port=ofproto_v1_0.OFPP_IN_PORT):
+ super(NXActionResubmit, self).__init__(
+ ofproto_v1_0.NXAST_RESUBMIT, in_port, 0)
+
+
+class NXActionResubmitTable(NXActionResubmitBase):
+ def __init__(self, in_port=ofproto_v1_0.OFPP_IN_PORT, table=0xff):
+ super(NXActionResubmitTable, self).__init__(
+ ofproto_v1_0.NXAST_RESUBMIT_TABLE, in_port, table)
+
+
class NXActionSetTunnel(NXActionHeader):
def __init__(self, tun_id_):
self.tun_id = tun_id_