]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Break down _bind_port_if_needed in ML2
authorKevin Benton <blak111@gmail.com>
Thu, 13 Aug 2015 23:58:02 +0000 (16:58 -0700)
committerKevin Benton <blak111@gmail.com>
Fri, 14 Aug 2015 00:05:38 +0000 (17:05 -0700)
commit59434672b405f3734d1c319aac311af75a88325f
tree4ca298a6d5edb2e7f6f00ec841bbbea96011c04f
parent86bf1b41504ed9aa1c1a6c4a8b653ab7b5be9b52
Break down _bind_port_if_needed in ML2

Separate the looping and retry logic in _bind_port_if_needed
from the actual binding attempts. This also eliminates the
'while True' loop with a regular for loop counter to make it
a little easier to reason about.

A suggestion to do this came up in a code review for
I437290affd8eb87177d0626bf7935a165859cbdd because the function
was difficult to reason about.

Change-Id: I6171cf39a4562ed1da9467e8e604d4519a813977
neutron/plugins/ml2/plugin.py