module ILO_SDK::SecureBootHelper

Contains helper methods for Secure Boot actions

Public Instance Methods

get_uefi_secure_boot() click to toggle source

Get the UEFI secure boot @raise [RuntimeError] if the request failed @return [TrueClass, FalseClass] uefi_secure_boot

# File lib/ilo-sdk/helpers/secure_boot_helper.rb, line 18
def get_uefi_secure_boot
  response = rest_get('/redfish/v1/Systems/1/SecureBoot/')
  response_handler(response)['SecureBootEnable']
end
set_uefi_secure_boot(secure_boot_enable) click to toggle source

Set the UEFI secure boot true or false @param [Boolean] secure_boot_enable @raise [RuntimeError] if the request failed @return true

# File lib/ilo-sdk/helpers/secure_boot_helper.rb, line 27
def set_uefi_secure_boot(secure_boot_enable)
  new_action = { 'SecureBootEnable' => secure_boot_enable }
  response = rest_patch('/redfish/v1/Systems/1/SecureBoot/', body: new_action)
  response_handler(response)
  true
end