neutron/neutron/tests/unit/openvswitch
Carl Baldwin 8f50bc29ed Refactor l2_pop code to pass mac/ip info more readably
Previous code used a 2 element array to represent a mac/ip address
pair.  Code assumed that element 0 was mac and 1 was ip.  This made
the code difficult to read and difficult to maintain.  An attempt was
made to insert a third value that failed miserably because of the
position dependence and other code that assumed not only positions but
also the number of elements.

Using a namedtuple seems to be the best way to get better
maintainability.  Named tuples can be compared with regular tuples.
The json serializer still uses an array to represent it so the on-wire
representation of the object has not changed.  A short snip of code
was required to restore the namedtuple from the RPC message.

Change-Id: I7f8c93b0e12ee0179bb23dfbb3a3d814615b1c2e
Closes-Bug: #1352801
2014-10-15 22:17:33 +00:00
..
__init__.py Remove the useless vim modelines 2014-06-21 15:07:31 +08:00
test_agent_scheduler.py Merge "Catch exceptions in router rescheduler" 2014-10-14 16:11:37 +00:00
test_ovs_defaults.py Implement local ARP responder onto OVS agent 2014-05-19 21:42:11 +02:00
test_ovs_neutron_agent.py Refactor l2_pop code to pass mac/ip info more readably 2014-10-15 22:17:33 +00:00
test_ovs_tunnel.py Refresh rpc_backend values in unit tests to those from oslo.messaging 2014-08-22 11:02:25 +02:00