ironic.drivers.modules.drac.firmware module

Dell iDRAC firmware update utilities.

Provides Dell-specific helpers used by the generic Redfish firmware interface when running on iDRAC hardware.

class ironic.drivers.modules.drac.firmware.LCJobStatus(*values)[source]

Bases: Enum

Combined status of a set of Lifecycle Controller jobs.

DONE = 'done'

Every job finished successfully.

ERROR = 'error'

Every job finished, and at least one failed or cannot be found.

RUNNING = 'running'

At least one job has not finished yet.

UNAVAILABLE = 'unavailable'

The node offers no Dell OEM job collection to check.

ironic.drivers.modules.drac.firmware.check_lc_jobs(task, jids)[source]

Check the status of one or more Dell Lifecycle Controller jobs.

Parameters:
  • task – a TaskManager instance

  • jids – an iterable of Dell LC job IDs (JIDs) to check

Returns:

a tuple (status, detail) with an LCJobStatus. detail is a comma-separated list of still-running JIDs for RUNNING, a description of the failed or missing job(s) for ERROR, and None for DONE and UNAVAILABLE

Raises:

RedfishError, RedfishConnectionError or sushy.exceptions.SushyError if the jobs cannot be read. A read failure says nothing about the jobs, so callers should check again later rather than treat it as any status.

ironic.drivers.modules.drac.firmware.check_scheduled_idrac_job(task, current_update)[source]

Check Dell iDRAC for a scheduled Lifecycle Controller job.

Used when the Redfish task of a firmware update disappears before Ironic sees it finish. If the job is still scheduled or running, the firmware is staged and the next reboot applies it. If the job has finished or does not exist, nothing is left to apply.

Parameters:
  • task – a TaskManager instance

  • current_update – the current firmware update being processed

Returns:

True if the job is still scheduled or running, False if it has finished (successfully or not) or does not exist, None if the task monitor does not name a job or the Dell OEM job collection is not available

Raises:

RedfishError, RedfishConnectionError or sushy.exceptions.SushyError if the job collection cannot be read; the job may still exist, so the caller should check again later.

ironic.drivers.modules.drac.firmware.jid_from_task_monitor(task_monitor_uri)[source]

Get the Lifecycle Controller job ID from a task monitor URI.

iDRAC names a firmware update task monitor after the job that performs the update: /redfish/v1/TaskService/TaskMonitors/JID_...

Parameters:

task_monitor_uri – a task monitor URI, or None.

Returns:

the JID, or None if the URI does not end in one.