ironic.drivers.modules.drac.utils module

ironic.drivers.modules.drac.utils.execute_oem_manager_method(task, process_name, lambda_oem_func, pass_manager=False)[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() For older versions also support second input parameter Redfish manager itself when pass_manager set to True.

  • pass_manager – whether to pass manager itself to executed OEM extension method. This is for backward compability, new functions must not pass manager, but acquire it internally. Will be removed in future.

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.