1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/clodo/requests/compute/move_ip_address.rb
2012-04-25 10:31:28 -04:00

34 lines
830 B
Ruby

module Fog
module Compute
class Clodo
class Real
# Move IP-address to specified server.
# ==== Paramaters
# * server_id<~Integer> - Id of server to move IP to
# * ip<~String> - IP-address to move
#
# ==== Returns
# * response<~Excon::Response>
#
def move_ip_address(server_id, ip)
request(
:expects => [204],
:method => 'GET',
:path => "servers/#{server_id}/ips/moveip",
:body => Fog::JSON.encode({'ip'=>"#{ip}"})
)
end
end
class Mock
def move_ip_address(server_id, ip)
response = Excon::Response.new
response.status = [204]
response
end
end
end
end
end