I checked the specification of OpenFlow 1.3. It is written that Action List
has order in "5.11 Action List". I understood that acts was a list because
there is no order in map of Python. And the following default values should
be list of empty.

(lib/ofctl_v1_3.py:257)
    inst = to_actions(dp, flow.get('actions', {}))

I checked that OpenFlow1.0 and 1.2 were the same.

Thanks,
Satoshi

2013/8/8 Satoshi Kobayashi <[email protected]>

> Hi,
>
> I would like to know what 'acts' will assume as a argument. I have noticed
> that a map is used as a default argument of 'to_actions' function in
> lib/ofctl_v1_3.py:257. However, it seems that 'acts' assumes a seq. I think
> that acts.items() is used if it is a map.
>
> (lib/ofctl_v1_3.py:245)
> def mod_flow_entry(dp, flow, cmd):
> …(snip)…
>     inst = to_actions(dp, flow.get('actions', {}))
>
> (lib/ofctl_v1_3.py:38)
> def to_actions(dp, acts):
> …(snip)…
>     for a in acts:
>
> In my imagination, 'acts' will assume the following structure (map in seq).
> [
>   {
>     'type': 'PUSH_VLAN',
>     'ethertype': ...
>   },
>   { ... },
>   ...
> ]
>
> The code does not cause a problem now but confusion and a bug may be made
> by it in the future I think. Moreover, the same issue is also in
> ofctl_v1_*.py.
>
> Thanks,
> Satoshi
>
>


-- 
Satoshi Kobayashi <[email protected]>
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to