module ILO_SDK::PowerHelper
Contains helper methods for Power actions
Public Instance Methods
get_power_state()
click to toggle source
Get the Power State @raise [RuntimeError] if the request failed @return [String] power_state
# File lib/ilo-sdk/helpers/power_helper.rb, line 18 def get_power_state response = rest_get('/redfish/v1/Systems/1/') response_handler(response)['PowerState'] end
reset_ilo()
click to toggle source
Reset the iLO @raise [RuntimeError] if the request failed @return true
# File lib/ilo-sdk/helpers/power_helper.rb, line 37 def reset_ilo new_action = { 'Action' => 'Reset' } response = rest_post('/redfish/v1/Managers/1/', body: new_action) response_handler(response) true end
set_power_state(state)
click to toggle source
Set the Power State @param [String, Symbol] state @raise [RuntimeError] if the request failed @return true
# File lib/ilo-sdk/helpers/power_helper.rb, line 27 def set_power_state(state) new_action = { 'Action' => 'Reset', 'ResetType' => state } response = rest_post('/redfish/v1/Systems/1/', body: new_action) response_handler(response) true end