Sha256: 885b24a3c54fb1de558c7674475561905fc5ffe8746b4417ca1933e791cfd036
Contents?: true
Size: 802 Bytes
Versions: 79
Compression:
Stored size: 802 Bytes
Contents
module Fog module Compute class HP class Real # 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 = 'SOFT') body = { 'reboot' => { 'type' => type }} server_action(server_id, body) end end class Mock def reboot_server(server_id, type = 'SOFT') response = Excon::Response.new if list_servers_detail.body['servers'].detect {|_| _['id'] == server_id} response.status = 202 response else raise Fog::Compute::HP::NotFound end end end end end end
Version data entries
79 entries across 79 versions & 12 rubygems