Module: ILO_SDK::SecureBootHelper

Included in:
Client
Defined in:
lib/ilo-sdk/helpers/secure_boot_helper.rb

Overview

Contains helper methods for Secure Boot actions

Instance Method Summary collapse

Instance Method Details

#get_uefi_secure_bootTrueClass, FalseClass

Get the UEFI secure boot

Returns:

  • (TrueClass, FalseClass)

    uefi_secure_boot

Raises:

  • (RuntimeError)

    if the request failed


18
19
20
21
# 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) ⇒ Object

Set the UEFI secure boot true or false

Parameters:

  • secure_boot_enable (Boolean)

Returns:

  • true

Raises:

  • (RuntimeError)

    if the request failed


27
28
29
30
31
32
# 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