Hi, I am trying to test the vacancy feature in Openflow 1.4 and 1.5
I am following the https://ryu.readthedocs.io/en/latest/ofproto_v1_4_ref.html?highlight=vacancy tutorial But the example code snippet is wrong. def send_table_mod(self, datapath): ofp = datapath.ofproto ofp_parser = datapath.ofproto_parser req = ofp_parser.OFPTableMod(datapath, 1, 3) flags = ofp.OFPTC_VACANCY_EVENTS properties = [ofp_parser.OFPTableModPropEviction(flags)] req = ofp_parser.OFPTableMod(datapath, 1, 3, properties) datapath.send_msg(req) Even i corrected the code, as below (to enable VACANCY) as below, def send_table_mod(self, datapath): ofp = datapath.ofproto ofp_parser = datapath.ofproto_parser flags = ofp.OFPTC_VACANCY_EVENTS properties = [ofp_parser.OFPTableModPropVacancy(0,0,20,70,)] req = ofp_parser.OFPTableMod(datapath, 0, flags, properties) datapath.send_msg(req) But still, i received this error. SimpleSwitch15: Exception occurred during handler processing. Backtrace from offending handler [switch_features_handler] servicing event [EventOFPSwitchFeatures] follows. Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/ryu/base/app_manager.py", line 290, in _event_loop handler(ev) File "/home/suresh/ramshina/simple_switch_15.py", line 50, in switch_features_handler self.send_table_mod(datapath) File "/home/suresh/ramshina/simple_switch_15.py", line 60, in send_table_mod datapath.send_msg(req) File "/usr/local/lib/python2.7/dist-packages/ryu/controller/controller.py", line 438, in send_msg msg.serialize() File "/usr/local/lib/python2.7/dist-packages/ryu/ofproto/ofproto_parser.py", line 270, in serialize self._serialize_body() File "/usr/local/lib/python2.7/dist-packages/ryu/ofproto/ofproto_v1_5_parser.py", line 1829, in _serialize_body props_buf += p.serialize() File "/usr/local/lib/python2.7/dist-packages/ryu/ofproto/ofproto_v1_5_parser.py", line 1289, in serialize self.vacancy_up, self.vacancy) File "/usr/local/lib/python2.7/dist-packages/ryu/lib/pack_utils.py", line 25, in msg_pack_into struct.pack_into(fmt, buf, offset, *args) error: cannot convert argument to integer Do we have any example for setting vacancy as well as receiving notification? Thanks suresh -- *Regards, * *Knet solutions.* Whatsapp/Mobile: +919445042007 website: http://knetsolutions.in/ Facebook Page : https://www.facebook.com/sdntraining/ youtube channel: https://www.youtube.com/channel/UCTD6X9_oDqIYs_xpE7moFnQ
_______________________________________________ Ryu-devel mailing list Ryu-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ryu-devel