module ILO_SDK::BootSettingsHelper
Contains helper methods for Boot Settings actions
Public Instance Methods
get_boot_baseconfig()
click to toggle source
Get the boot base config @raise [RuntimeError] if the request failed @return [Fixnum] boot_baseconfig
# File lib/ilo-sdk/helpers/boot_settings_helper.rb, line 18 def get_boot_baseconfig response = rest_get('/redfish/v1/Systems/1/bios/Boot/Settings/') response_handler(response)['BaseConfig'] end
get_boot_order()
click to toggle source
Get the boot order @raise [RuntimeError] if the request failed @return [Fixnum] boot_order
# File lib/ilo-sdk/helpers/boot_settings_helper.rb, line 36 def get_boot_order response = rest_get('/redfish/v1/systems/1/bios/Boot/Settings/') response_handler(response)['PersistentBootConfigOrder'] end
get_temporary_boot_order()
click to toggle source
Get the temporary boot order @raise [RuntimeError] if the request failed @return [Fixnum] temporary_boot_order
# File lib/ilo-sdk/helpers/boot_settings_helper.rb, line 55 def get_temporary_boot_order response = rest_get('/redfish/v1/Systems/1/') response_handler(response)['Boot']['BootSourceOverrideTarget'] end
revert_boot()
click to toggle source
Revert the boot @raise [RuntimeError] if the request failed @return true
# File lib/ilo-sdk/helpers/boot_settings_helper.rb, line 26 def revert_boot new_action = { 'BaseConfig' => 'default' } response = rest_patch('/redfish/v1/systems/1/bios/Boot/Settings/', body: new_action) response_handler(response) true end
set_boot_order(boot_order)
click to toggle source
Set the boot order @param [Fixnum] boot_order @raise [RuntimeError] if the request failed @return true
# File lib/ilo-sdk/helpers/boot_settings_helper.rb, line 45 def set_boot_order(boot_order) new_action = { 'PersistentBootConfigOrder' => boot_order } response = rest_patch('/redfish/v1/systems/1/bios/Boot/Settings/', body: new_action) response_handler(response) true end
set_temporary_boot_order(boot_target)
click to toggle source
Set the temporary boot order @param [Fixnum] boot_target @raise [RuntimeError] if the request failed @return true
# File lib/ilo-sdk/helpers/boot_settings_helper.rb, line 64 def set_temporary_boot_order(boot_target) response = rest_get('/redfish/v1/Systems/1/') boottargets = response_handler(response)['Boot']['BootSourceOverrideSupported'] unless boottargets.include? boot_target raise "BootSourceOverrideTarget value - #{boot_target} is not supported. Valid values are: #{boottargets}" end new_action = { 'Boot' => { 'BootSourceOverrideTarget' => boot_target } } response = rest_patch('/redfish/v1/Systems/1/', body: new_action) response_handler(response) true end