Fixes IpAddressAlreadyAllocated thrown by fixed_ip port tests.
Currently, a IpAddressAlreadyAllocated may be thrown by the test
test_update_port_fixed_ips [0]. This can also happen for
test_create_port_fixed_ips.
This is because the test 1) creates a port and 2) tries to update
a port with a fixed ip, but because random.choice() is used to
select a random address across the ip range, the same address for
update may be chosen as the address that was used for creation,
resulting in the error.
This patch excludes the ip address for the port that was first
created from the range over which random.choice selects the
next ip address for updating the port with a fixed ip.
[0] http://logs.openstack.org/04/448204/1/check/gate-tempest-dsvm-patrole-member-ubuntu-xenial-nv/0971b9d/console.html
Change-Id: I2e351f9332cafe70efe6f4ecbfaa184079a58b93
Partial-Bug: #1670553
1 file changed