2010-03-19 21:29:42 -04:00
|
|
|
module Fog
|
2011-06-16 19:28:54 -04:00
|
|
|
module Compute
|
|
|
|
class Rackspace
|
2010-03-19 21:29:42 -04:00
|
|
|
class Real
|
2009-10-17 17:24:34 -04:00
|
|
|
|
|
|
|
# Reboot an existing server
|
|
|
|
#
|
|
|
|
# ==== Parameters
|
|
|
|
# * server_id<~Integer> - Id of server to reboot
|
|
|
|
# * type<~String> - Type of reboot, must be in ['HARD', 'SOFT']
|
|
|
|
#
|
2010-02-06 17:51:19 -05:00
|
|
|
def reboot_server(server_id, type = 'SOFT')
|
2010-11-29 13:36:10 -05:00
|
|
|
body = { 'reboot' => { 'type' => type }}
|
2010-11-29 22:28:14 -05:00
|
|
|
server_action(server_id, body)
|
2009-10-17 17:24:34 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
2010-03-19 21:29:42 -04:00
|
|
|
class Mock
|
2009-10-17 17:24:34 -04:00
|
|
|
|
2010-05-31 11:37:26 -04:00
|
|
|
def reboot_server(server_id, type = 'SOFT')
|
2010-11-29 13:36:10 -05:00
|
|
|
response = Excon::Response.new
|
|
|
|
response.status = 202
|
|
|
|
response
|
2009-10-17 17:24:34 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|