2010-05-24 14:03:52 -04:00
|
|
|
module Fog
|
|
|
|
module Bluebox
|
|
|
|
class Real
|
|
|
|
|
2010-06-02 11:20:38 -04:00
|
|
|
# Reboot block
|
|
|
|
#
|
2010-05-24 14:03:52 -04:00
|
|
|
# ==== Parameters
|
2010-06-02 11:20:38 -04:00
|
|
|
# * block_id<~String> - Id of block to reboot
|
2010-05-24 14:03:52 -04:00
|
|
|
# * type<~String> - Type of reboot, must be in ['HARD', 'SOFT']
|
|
|
|
#
|
|
|
|
# ==== Returns
|
|
|
|
# * response<~Excon::Response>:
|
|
|
|
# * body<~Hash>:
|
2010-06-02 11:20:38 -04:00
|
|
|
# TODO
|
2010-05-24 14:03:52 -04:00
|
|
|
def reboot_block(block_id, type = 'SOFT')
|
|
|
|
request(
|
|
|
|
:expects => 200,
|
|
|
|
:method => 'PUT',
|
2010-06-02 22:38:50 -04:00
|
|
|
:path => "api/blocks/#{block_id}/#{'soft_' if type == 'SOFT'}reboot.json"
|
2010-05-24 14:03:52 -04:00
|
|
|
)
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
class Mock
|
|
|
|
|
2010-06-02 11:09:54 -04:00
|
|
|
def reboot_block(block_id, type = 'SOFT')
|
|
|
|
Fog::Mock.not_implemented
|
2010-05-24 14:03:52 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|