rackerlabs/quark — pull request #264 by Cerberus98 (2014-10-28 22:03:55+00:00)
Title: Port update now orrectly allocates multiple IPs

RM10187

If multiple new fixed_ips were passed to update_port, the unctionality
incorrectly passed previously allocated IPs back into subsequent calls
to allocate.

Assuming N IP addresses were requested, and the first of those was
successfully allocated. The behavior of the second IP address allocation
would result in one of two behaviors:

1) If the IP existed and was deallocated, it would allocate it and work
as expected
2) If the IP did NOT exist, the strategy satisfaction check between
reallocating an old and allocating a new would return True, as
the first IP allocated was passed in as part of the "addresses" list.

This patch ensures that a fresh "addresses" list is passed to each
allocation call, and the result of which is pushed onto a cumulative
list.