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/rackspace/requests/servers/reboot_server.rb
2009-10-17 14:24:34 -07:00

42 lines
745 B
Ruby

unless Fog.mocking?
module Fog
module Rackspace
class Servers
# Reboot an existing server
#
# ==== Parameters
# * server_id<~Integer> - Id of server to reboot
# * type<~String> - Type of reboot, must be in ['HARD', 'SOFT']
#
def reboot_server(server_id, type)
data = {
'reboot' => { 'type' => type }
}
request(
:body => data.to_json,
:expects => 202,
:method => 'POST',
:path => "servers/#{id}"
)
end
end
end
end
else
module Fog
module Rackspace
class Servers
def update_server
end
end
end
end
end