Return IPV4 openstack VM addresses
OVH have recently started providing IPV6 addresses along with their IPV4 addresses for new VMs. ref: http://travaux.ovh.net/?do=details&id=23185
Unfortunately, our logic for determining the public IP of a new VM was too simplistic, and so it broke when this change was rolled out.
This PR updates openstack_utils.get_server_public_address()
and related tests to:
- Adds an optional
ip_version
parameter, default4
. - Returns the first address found which matches the requested
ip_version
.
Reviewer