Fix bug in playbooks/library/neutron

This change updates _add_router_interface to list ports for the router
device only, and not for all devices.  As we select specific device
ports only, we no longer need to skip over other device's ports, and
this indirectly fixes a bug where we were using 'next' instead of
'continue' to skip to the next iteration of the for loop.

Change-Id: I892dc0f58f1d8bbb7ebd46f7790c5420c4c8b94b
Closes-Bug: #1439295
This commit is contained in:
Matt Thompson 2015-04-02 09:21:16 +01:00
parent c717a61889
commit 8bd358d2c2

@ -371,9 +371,7 @@ class ManageNeutron(object):
found = False
for port in self.neutron.list_ports()['ports']:
if port['device_id'] != router_id:
next
for port in self.neutron.list_ports(device_id=router_id)['ports']:
for fixed_ips in port['fixed_ips']:
if fixed_ips['subnet_id'] == subnet_id:
found = True