# File lib/openstack/compute/connection.rb, line 544 def attach_floating_ip(opts={:server_id=>"", :ip_id => ""}) check_extension("os-floating-ips") #first get the address: addr = get_floating_ip(opts[:ip_id]).ip data = JSON.generate({:addFloatingIp=>{:address=>addr}}) @connection.req("POST", "/servers/#{opts[:server_id]}/action", {:data=>data}) true end