]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Remove chain for correct router during update_routers()
authorAngus Lees <gus@inodes.org>
Thu, 28 Aug 2014 07:26:01 +0000 (17:26 +1000)
committerAngus Lees <gus@inodes.org>
Mon, 1 Sep 2014 02:54:27 +0000 (12:54 +1000)
commit4e80524a61a655fe9732ff42dc8f035810214670
treeb21e2b61094f1c6cbba784dc8127dcc2c31af69c
parent00d3af481ee765ee55df4f96dfa5c4e55197d90e
Remove chain for correct router during update_routers()

The existing code incorrectly used the stale value from a previous list
comprehension - and deleted the chains for the wrong router :(
(Found via pylint)

Also: change to using a set() rather than a list(), since it is used for
repeated membership tests.

Also: refactor test cases to remove test case duplication.

Closes-Bug: #1362466
Change-Id: I4df400d57bab5427362db47a715576faa6340173
neutron/services/metering/drivers/iptables/iptables_driver.py
neutron/tests/unit/services/metering/drivers/test_iptables_driver.py