Module: ILO_SDK::ComputerSystemHelper
- Included in:
- Client
- Defined in:
- lib/ilo-sdk/helpers/computer_system_helper.rb
Overview
Contains helper methods for Computer System actions
Instance Method Summary collapse
-
#get_asset_tag ⇒ String
Get the Asset Tag.
-
#get_indicator_led ⇒ String
Get the UID indicator LED state.
-
#set_asset_tag(asset_tag) ⇒ Object
Set the Asset Tag.
-
#set_indicator_led(state) ⇒ Object
Set the UID indicator LED.
Instance Method Details
#get_asset_tag ⇒ String
Get the Asset Tag
16 17 18 19 |
# File 'lib/ilo-sdk/helpers/computer_system_helper.rb', line 16 def get_asset_tag response = rest_get('/redfish/v1/Systems/1/') response_handler(response)['AssetTag'] end |
#get_indicator_led ⇒ String
Get the UID indicator LED state
35 36 37 38 |
# File 'lib/ilo-sdk/helpers/computer_system_helper.rb', line 35 def get_indicator_led response = rest_get('/redfish/v1/Systems/1/') response_handler(response)['IndicatorLED'] end |
#set_asset_tag(asset_tag) ⇒ Object
Set the Asset Tag
25 26 27 28 29 30 |
# File 'lib/ilo-sdk/helpers/computer_system_helper.rb', line 25 def set_asset_tag(asset_tag) new_action = { 'AssetTag' => asset_tag } response = rest_patch('/redfish/v1/Systems/1/', body: new_action) response_handler(response) true end |
#set_indicator_led(state) ⇒ Object
Set the UID indicator LED
44 45 46 47 48 49 |
# File 'lib/ilo-sdk/helpers/computer_system_helper.rb', line 44 def set_indicator_led(state) new_action = { 'IndicatorLED' => state } response = rest_patch('/redfish/v1/Systems/1/', body: new_action) response_handler(response) true end |