Fixing test_create_port_in_allowed_allocation_pool when 3 (or more) controllers
When running Tempest test test_create_port_in_allowed_allocation_pools
on a 3 controllers infra, we have this error: No more IP addresses available
on network UUID.
In the code, the function created a new subnet with only 3 IPs available for
the allocation pools.
One is used for the network, another for neutron s port and the last one for
the broadcast.
A better way could be to used and concate default parameters
tenant_network_subnet and tenant_network_mask_bits and check if the subnet
is large enough.
Changed way to calculate allocation_pool:
* Used and concate tenant_network_subnet & tenant_network_mask_bits
* Check if the mask bits is not too small for the test
* If it is OK, create net, subnet and try to allocate a port
Reviewed: https:/ /review. openstack. org/243159 /git.openstack. org/cgit/ openstack/ tempest/ commit/ ?id=bdf1d8d11fe 57074214d639715 eb229a83b52325
Committed: https:/
Submitter: Jenkins
Branch: master
commit bdf1d8d11fe5707 4214d639715eb22 9a83b52325
Author: Guillaume Chenuet <email address hidden>
Date: Mon Nov 9 16:10:48 2015 +0100
Fixing test_create_ port_in_ allowed_ allocation_ pool when 3 (or more) controllers
When running Tempest test test_create_ port_in_ allowed_ allocation_ pools
on a 3 controllers infra, we have this error: No more IP addresses available
on network UUID.
In the code, the function created a new subnet with only 3 IPs available for
the allocation pools.
One is used for the network, another for neutron s port and the last one for
the broadcast.
A better way could be to used and concate default parameters network_ subnet and tenant_ network_ mask_bits and check if the subnet
tenant_
is large enough.
Changed way to calculate allocation_pool:
* Used and concate tenant_ network_ subnet & tenant_ network_ mask_bits
* Check if the mask bits is not too small for the test
* If it is OK, create net, subnet and try to allocate a port
Change-Id: Id523c54037518e a199cd88d553b4c dfef59a186b
Closes-Bug: 1514457