ironic.drivers.modules.redfish.utils module

ironic.drivers.modules.redfish.utils.BIOS = 'bios'

BIOS Firmware Component

ironic.drivers.modules.redfish.utils.BMC = 'bmc'

BMC Firmware Component

ironic.drivers.modules.redfish.utils.FIRMWARE_COMPONENTS = ['bios', 'bmc']

Firmware Components available to update

class ironic.drivers.modules.redfish.utils.SessionCache(driver_info)[source]

Bases: object

Cache of HTTP sessions credentials

AUTH_CLASSES = {'auto': <class 'sushy.auth.SessionOrBasicAuth'>, 'basic': <class 'sushy.auth.BasicAuth'>, 'session': <class 'sushy.auth.SessionAuth'>}
ironic.drivers.modules.redfish.utils.get_enabled_macs(task, system)[source]

Get information on MAC addresses of enabled ports using Redfish.

Parameters:
  • task – a TaskManager instance containing the node to act on.

  • system – a Redfish System object

Returns:

a dictionary containing MAC addresses of enabled interfaces in a {‘mac’: <state>} format, where <state> is a sushy constant

ironic.drivers.modules.redfish.utils.get_event_service(node)[source]

Get a node’s event service.

Parameters:

node – an Ironic node object.

Raises:

RedfishConnectionError when it fails to connect to Redfish

Raises:

RedfishError when the EventService is not registered in Redfish

ironic.drivers.modules.redfish.utils.get_manager(node, system, manager_id=None)[source]

Get a node’s manager.

Parameters:
  • system – a Sushy system object

  • manager_id – the id of the manager

Returns:

a sushy Manager

Raises:

RedfishError when the System doesn’t have Managers associated

ironic.drivers.modules.redfish.utils.get_system(node)[source]

Get a Redfish System that represents a node.

Parameters:

node – an Ironic node object

Raises:

RedfishConnectionError when it fails to connect to Redfish

Raises:

RedfishError if the System is not registered in Redfish

ironic.drivers.modules.redfish.utils.get_task_monitor(node, uri)[source]

Get a TaskMonitor for a node.

Parameters:
  • node – an Ironic node object

  • uri – the URI of a TaskMonitor

Raises:

RedfishConnectionError when it fails to connect to Redfish

Raises:

RedfishError when the TaskMonitor is not available in Redfish

ironic.drivers.modules.redfish.utils.get_update_service(node)[source]

Get a node’s update service.

Parameters:

node – an Ironic node object

Raises:

RedfishConnectionError when it fails to connect to Redfish

Raises:

RedfishError when the UpdateService is not registered in Redfish

ironic.drivers.modules.redfish.utils.parse_driver_info(node)[source]

Parse the information required for Ironic to connect to Redfish.

Parameters:

node – an Ironic node object

Returns:

dictionary of parameters

Raises:

InvalidParameterValue on malformed parameter(s)

Raises:

MissingParameterValue on missing parameter(s)

ironic.drivers.modules.redfish.utils.wait_until_get_system_ready(node)[source]

Wait until Redfish system is ready.

Parameters:

node – an Ironic node object

Raises:

RedfishConnectionError on time out.