module ILO_SDK::ComputerSystemHelper
Contains helper methods for Computer System actions
Public Instance Methods
Get the Asset Tag @deprecated Use {#get_system_settings} instead @raise [RuntimeError] if the request failed @return [String] asset_tag
# File lib/ilo-sdk/helpers/computer_system_helper.rb, line 37 def get_asset_tag @logger.warn '[Deprecated] `get_asset_tag` is deprecated. Please use `get_system_settings[\'AssetTag\']` instead.' response = rest_get('/redfish/v1/Systems/1/') response_handler(response)['AssetTag'] end
Get the UID indicator LED state @deprecated Use {#get_system_settings} instead @raise [RuntimeError] if the request failed @return [String] indicator_led
# File lib/ilo-sdk/helpers/computer_system_helper.rb, line 60 def get_indicator_led @logger.warn '[Deprecated] `get_indicator_led` is deprecated. Please use `get_system_settings[\'IndicatorLED\']` instead.' response = rest_get('/redfish/v1/Systems/1/') response_handler(response)['IndicatorLED'] end
Get the computer system settings @param system_id [Integer, String] ID of the system @raise [RuntimeError] if the request failed @return [Hash] Computer system settings
# File lib/ilo-sdk/helpers/computer_system_helper.rb, line 19 def get_system_settings(system_id = 1) response_handler(rest_get("/redfish/v1/Systems/#{system_id}/")) end
Set the Asset Tag @deprecated Use {#set_system_settings} instead @param asset_tag [String, Symbol] @raise [RuntimeError] if the request failed @return true
# File lib/ilo-sdk/helpers/computer_system_helper.rb, line 48 def set_asset_tag(asset_tag) @logger.warn '[Deprecated] `set_asset_tag` is deprecated. Please use `set_system_settings(AssetTag: <tag>)` instead.' new_action = { 'AssetTag' => asset_tag } response = rest_patch('/redfish/v1/Systems/1/', body: new_action) response_handler(response) true end
Set the UID indicator LED @deprecated Use {#set_system_settings} instead @param state [String, Symbol] @raise [RuntimeError] if the request failed @return true
# File lib/ilo-sdk/helpers/computer_system_helper.rb, line 71 def set_indicator_led(state) @logger.warn '[Deprecated] `set_indicator_led` is deprecated. Please use `set_system_settings(IndicatorLED: <state>)` instead.' new_action = { 'IndicatorLED' => state } response = rest_patch('/redfish/v1/Systems/1/', body: new_action) response_handler(response) true end
Set computer system settings @param options [Hash] Hash of options to set @param system_id [Integer, String] ID of the system @raise [RuntimeError] if the request failed @return true
# File lib/ilo-sdk/helpers/computer_system_helper.rb, line 28 def set_system_settings(options, system_id = 1) response_handler(rest_patch("/redfish/v1/Systems/#{system_id}/", body: options)) true end