It looks like actions1 is of type long.  It's supposed to be a list of actions. 
 The format of this list is loosely described in the docstring for 
install_datapath_flow:
        actions - a list where each entry is a two-element list representing
        an action.  Elem 0 of an action list should be an ofp_action_type
        and elem 1 should be the action argument (if needed). For
        OFPAT_OUTPUT, this should be another two-element list with max_len
        as the first elem, and port_no as the second

So, for example, the following should output the packet on portnum, IIRC:
actions1 = [[OFPAT_OUTPUT, [0, portnum]]]
On Apr 8, 2011, at 1:56 AM, karim torkmen wrote:

For better reference, read the code for make_action_array() in util.py.

-- Murphy

> Hi,
> I called the following method to install a flow:
> self.install_datapath_flow(1, flow, CACHE_TIMEOUT, actions1, 
> None,openflow.OFP_DEFAULT_PRIORITY,2, buf)
> But I always get the following error:
> 
> 00014|pyrt|ERR:unable to invoke a Python event handler:
> Traceback (most recent call last):
>  File "./nox/lib/util.py", line 116, in f
>    event.total_len, buffer_id, packet)
>  File "./nox/coreapps/try_topology/try_topology.py", line 157, in 
> packet_in_callback
>    self.forward_l2_packet(dpid, inport, packet, packet.arr, bufid)
>  File "./nox/coreapps/try_topology/try_topology.py", line 103, in 
> forward_l2_packet
>    openflow.OFP_DEFAULT_PRIORITY,1, buf)
>  File "./nox/lib/core.py", line 380, in install_datapath_flow
>    (idle_timeout, actions, buffer_id), hard_timeout)
>  File "./nox/lib/core.py", line 259, in send_flow_command
>    oactions = self.make_action_array(actions)
>  File "./nox/lib/core.py", line 145, in make_action_array
>    for action in actions:
> TypeError: 'long' object is not iterable
> 
> Any Idea why I am getting this error ?
> Thanks a lot,
> Karim
> 
> 
> _______________________________________________
> nox-dev mailing list
> [email protected]
> http://noxrepo.org/mailman/listinfo/nox-dev

_______________________________________________
nox-dev mailing list
[email protected]
http://noxrepo.org/mailman/listinfo/nox-dev

Reply via email to