In the past I used available_floating_ip to create a new floating ip and attach it to an instance or use an existing non-attached floating ip and attach it to an instance.
For some reason the latter no longer works now (might be an update?). When a non-attached floating ip exists, available_floating_ip(network, server) returns the ip correctly, but doesn't attach it anymore to the server.
I filed a bug report, but am simultaneously looking for an alternative solution. So I was looking for an option to add a floating ip manually to a server. To my surprise I could find no such method in connection and in the compute REST API I only saw the deprecated add floating ip.
What should I use to add my floating_ip to the server?
conn = create_connection(...)
server = create_server(...)
conn.add_auto_ip(server)
float_ip = conn.available_floating_ip("Network...", server).floating_ip_address
conn.add_ip_list(server, float_ip)
Compute
's add_floating_ip_to_server method.conn.compute.add_floating_ip_to_server(server, float_ip)