Signed-off-by: YAMAMOTO Takashi <[email protected]>
Tested-by: Gal Sagie <[email protected]>
---
ryu/ofproto/nx_actions.py | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/ryu/ofproto/nx_actions.py b/ryu/ofproto/nx_actions.py
index 4a95538..cc9c3f8 100644
--- a/ryu/ofproto/nx_actions.py
+++ b/ryu/ofproto/nx_actions.py
@@ -380,6 +380,41 @@ def generate(ofp_name, ofpp_name):
msg_pack_into('!%ds' % len(data), buf, offset + payload_offset,
bytes(data))
+ class NXActionResubmitTable(NXAction):
+ _subtype = nicira_ext.NXAST_RESUBMIT_TABLE
+
+ # in_port, table_id
+ _fmt_str = '!HB3x'
+
+ def __init__(self,
+ in_port,
+ table_id,
+ type_=None, len_=None, experimenter=None, subtype=None):
+ super(NXActionResubmitTable, self).__init__()
+ self.in_port = in_port
+ self.table_id = table_id
+
+ @classmethod
+ def parse(cls, buf):
+ (in_port,
+ table_id) = struct.unpack_from(
+ NXActionResubmitTable._fmt_str, buf, 0)
+ return cls(in_port, table_id)
+
+ def serialize(self, buf, offset):
+ data = bytearray()
+ msg_pack_into(NXActionResubmitTable._fmt_str, data, 0,
+ self.in_port,
+ self.table_id)
+ payload_offset = (
+ ofp.OFP_ACTION_EXPERIMENTER_HEADER_SIZE +
+ struct.calcsize(NXAction._fmt_str)
+ )
+ self.len = utils.round_up(payload_offset + len(data), 8)
+ super(NXActionResubmitTable, self).serialize(buf, offset)
+ msg_pack_into('!%ds' % len(data), buf, offset + payload_offset,
+ bytes(data))
+
def add_attr(k, v):
v.__module__ = ofpp.__name__ # Necessary for stringify stuff
setattr(ofpp, k, v)
@@ -391,6 +426,7 @@ def generate(ofp_name, ofpp_name):
'NXActionRegMove',
'NXActionLearn',
'NXActionConjunction',
+ 'NXActionResubmitTable',
'_NXFlowSpec', # exported for testing
'NXFlowSpecMatch',
'NXFlowSpecLoad',
--
2.3.2 (Apple Git-55)
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel