Hi,

I am trying to send a port mod message embedded in a bundle and I am
getting the following error while constructing the port mod message.

hub: uncaught exception: Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/ryu/lib/hub.py", line 52, in
_launch
    func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/ryu/base/app_manager.py",
line 274, in _event_loop
    handler(ev)
  File "/home/openflow/bundles/add.py", line 33, in send_bundle_Open
    self.send_bundle_add_message(datapath)
  File "/home/openflow/bundles/add.py", line 51, in send_bundle_add_message
    datapath.send_msg(req)
  File
"/usr/local/lib/python2.7/dist-packages/ryu/controller/controller.py", line
214, in send_msg
    msg.serialize()
  File
"/usr/local/lib/python2.7/dist-packages/ryu/ofproto/ofproto_parser.py",
line 205, in serialize
    self._serialize_body()
  File
"/usr/local/lib/python2.7/dist-packages/ryu/ofproto/ofproto_v1_4_parser.py",
line 6063, in _serialize_body
    self.message.serialize()
  File
"/usr/local/lib/python2.7/dist-packages/ryu/ofproto/ofproto_parser.py",
line 205, in serialize
    self._serialize_body()
  File
"/usr/local/lib/python2.7/dist-packages/ryu/ofproto/ofproto_v1_4_parser.py",
line 5662, in _serialize_body
    for p in self.properties:
TypeError: 'OFPPortModPropEthernet' object is not iterable


And this is my code:

                port_no = 1
                hw_addr = 'fa:c8:e8:76:1d:7e'
                config = ofp.OFPPC_PORT_DOWN
                mask = ofp.OFPPC_PORT_DOWN
                advertise = (ofp.OFPPF_10MB_HD | ofp.OFPPF_100MB_FD)
                properties = ofp_parser.OFPPortModPropEthernet(advertise)
                msg = ofp_parser.OFPPortMod(datapath, port_no, hw_addr,
config,
                                        mask, properties)
                req = ofp_parser.OFPBundleAddMsg(datapath, 7,
ofp.OFPBF_ATOMIC,
                                             msg, [])
                datapath.send_msg(req)

Am i missing anything ? Can you please suggest the solution ?

Thanks,
Chethan
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to