# File lib/cloudservers/server.rb, line 89 def reboot(type="SOFT") data = JSON.generate(:reboot => {:type => type}) response = @connection.csreq("POST",@svrmgmthost,"#{@svrmgmtpath}/servers/#{URI.encode(self.id.to_s)}/action",@svrmgmtport,@svrmgmtscheme,{'content-type' => 'application/json'},data) CloudServers::Exception.raise_exception(response) unless response.code.match(/^20.$/) true end