]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Fix a wrong condition for the _purge_metering_info function
authorSergey Vilgelm <sergey@vilgelm.info>
Mon, 31 Aug 2015 14:06:48 +0000 (17:06 +0300)
committerKevin Benton <kevinbenton@buttewifi.com>
Fri, 4 Sep 2015 01:15:47 +0000 (01:15 +0000)
commit997aa86fa12e3209b65741ef95906d491895a493
treea2b632a9b04a0017182211d05f1b646f7f12cc7b
parent29ad0c787916166b5a92cf0a0c3491d0b6fb348d
Fix a wrong condition for the _purge_metering_info function

Fix a situation for the _purge_metering_info function
when the items will never be deleted from the metering_info.
Delete the metering_info dict and use the metering_infos instead.
Fix the problem with changing a dictionary during iteration.
Add the unit tests for the _purge_metering_info and
_add_metering_info functions.

Co-Authored-By: Yaroslav Isakov <yisakov@mirantis.com>
Change-Id: I9031a5f27ae6438ffd5c5a48b0cf5cdc6867eff3
Closes-Bug: #1490581
neutron/services/metering/agents/metering_agent.py
neutron/tests/unit/services/metering/agents/test_metering_agent.py