ironic.drivers.modules.drac.utils module

ironic.drivers.modules.drac.utils.execute_oem_manager_method(task, process_name, lambda_oem_func)[source]

Loads OEM manager and executes passed method on it.

Known iDRAC Redfish systems has only one manager, but as Redfish schema allows a list this method iterates through all values in case this changes in future. If there are several managers, this will try starting from the first in the list until the first success.

Parameters:
  • task – a TaskManager instance.

  • process_name – user friendly name of method to be executed. Used in exception and log messages.

  • lambda_oem_func – method to execute as lambda function with input parameter OEM extension manager. Example: lambda m: m.reset_idrac()

Returns:

Returned value of lambda_oem_func

Raises:

RedfishError if can’t execute OEM function either because there are no managers to the system, failed to load OEM extension or execution of the OEM method failed itself.