On Fri, 10 May 2013 15:01:13 +0900
YAMAMOTO Takashi <[email protected]> wrote:

> instead of explicit listing of of-wire attributes, use a heuristics
> to exclude internal attributes. (eg. buf, datapath, etc)
> 
> this commit changes __str__ outputs.  update a test case accordingly.
> 
> Signed-off-by: YAMAMOTO Takashi <[email protected]>
> ---
>  ryu/ofproto/ofproto_parser.py             | 27 +++++++++++++++++++++++----
>  ryu/ofproto/ofproto_v1_0_parser.py        | 18 ------------------
>  ryu/tests/unit/ofproto/test_parser_v10.py | 13 ++++++++++---
>  3 files changed, 33 insertions(+), 25 deletions(-)

Nice. Applied, thanks!

> +        # an example:
> +        # switch features ev version: 0x1 msg_type 0x6 xid 0x73a92862 
> datapath_id 8 n_tables 2 capabilities 0 actions 2047 ports {1: 
> OFPPhyPort(port_no=1, hw_addr='\x1a\xc1Q\xff\xef\x8a', 
> name='veth1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', config=0, state=0, 
> curr=192, advertised=0, supported=0, peer=0), 2: OFPPhyPort(port_no=2, 
> hw_addr='\xce/\xa2\x87\xf6p', 
> name='veth3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', config=0, state=0, 
> curr=192, advertised=0, supported=0, peer=0), 3: OFPPhyPort(port_no=3, 
> hw_addr='\xca\x8a\x1e\xf3w\xef', 
> name='veth5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', config=0, state=0, 
> curr=192, advertised=0, supported=0, peer=0), 4: OFPPhyPort(port_no=4, 
> hw_addr='\xfa\xbcw\x8d~\x0b', 
> name='veth7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', config=0, state=0, 
> curr=192, advertised=0, supported=0, peer=0)} n_buffers 256
> +

I dropped the above 'example' part since pep8 complains.

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to