]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Fix _update_subnet_allocation_pools returning empty list
authorJohn Davidge <jodavidg@cisco.com>
Tue, 11 Aug 2015 12:55:51 +0000 (13:55 +0100)
committerJohn Davidge <jodavidg@cisco.com>
Tue, 11 Aug 2015 16:38:24 +0000 (17:38 +0100)
commit0b0aa4a61dce3af9e6e2d773434ced0298d60275
tree62e021450ac2061d641dc1cb78651a3c0de8ad1a
parentdfadd1af75ae2586a637af59864f8bb5348a71b2
Fix _update_subnet_allocation_pools returning empty list

_update_subnet_allocation_pools was returning an empty list in all
cases due to trying to iterate over the same generator twice.
Generators cannot be iterated over multiple times.

This patch changes the generator into a list to fix this problem,
and alters the unit test so that this issue is exposed.

Change-Id: Iea98f3ae4f16964cd68154ac5edfeb125de889e0
Closes-Bug: 1483687
neutron/db/ipam_backend_mixin.py
neutron/tests/unit/db/test_db_base_plugin_v2.py