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

Change-Id: Id523c54037518ea199cd88d553b4cdfef59a186b
Closes-Bug: 1514457
1 file changed