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
18 19 20 21 |
# File 'lib/ilo-sdk/helpers/computer_system_helper.rb', line 18 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
37 38 39 40 |
# File 'lib/ilo-sdk/helpers/computer_system_helper.rb', line 37 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
27 28 29 30 31 32 |
# File 'lib/ilo-sdk/helpers/computer_system_helper.rb', line 27 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
46 47 48 49 50 51 |
# File 'lib/ilo-sdk/helpers/computer_system_helper.rb', line 46 def set_indicator_led(state) new_action = { 'IndicatorLED' => state } response = rest_patch('/redfish/v1/Systems/1/', body: new_action) response_handler(response) true end |