With this change the initialiser of OFPTableMod now requires a properties argument. This is incompatible with Ryu v3.6. If it is important to maintain compatibility then things can be reworked a little to make the properties argument optional.
Signed-off-by: Simon Horman <[email protected]> --- v2 * first post --- ryu/ofproto/ofproto_v1_4_parser.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ryu/ofproto/ofproto_v1_4_parser.py b/ryu/ofproto/ofproto_v1_4_parser.py index f270e23..d7f8d8f 100644 --- a/ryu/ofproto/ofproto_v1_4_parser.py +++ b/ryu/ofproto/ofproto_v1_4_parser.py @@ -1842,18 +1842,28 @@ class OFPTableMod(MsgBase): ofp_parser = datapath.ofproto_parser req = ofp_parser.OFPTableMod(datapath, 1, 3) + flags = ofproto.OFPTMPEF_OTHER + properties = [ofp_parser.OFPTableModPropEviction(flags)] + req = ofp_parser.OFPTableMod(datapath, 1, 3, properties) datapath.send_msg(req) """ - def __init__(self, datapath, table_id, config): + def __init__(self, datapath, table_id, config, properties): super(OFPTableMod, self).__init__(datapath) self.table_id = table_id self.config = config + self.properties = properties def _serialize_body(self): + props_buf = bytearray() + for p in self.properties: + props_buf += p.serialize() + msg_pack_into(ofproto.OFP_TABLE_MOD_PACK_STR, self.buf, ofproto.OFP_HEADER_SIZE, self.table_id, self.config) + self.buf += props_buf + @_register_parser @_set_msg_type(ofproto.OFPT_MULTIPART_REPLY) -- 1.8.5.2 ------------------------------------------------------------------------------ Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk _______________________________________________ Ryu-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ryu-devel
