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
- ironic.drivers.modules.redfish.utils.NIC_COMPONENT_PREFIX = 'nic:'¶
 Prefix for NIC Firmware Components
- class ironic.drivers.modules.redfish.utils.SessionCache(driver_info)[source]¶
 Bases:
objectCache 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_chassis(node, system)[source]¶
 Get a Redfish Chassis associated with a System of a node
- Parameters:
 node – an Ironic node object
system – the Sushy System object
- Raises:
 RedfishConnectionError when it fails to connect to Redfish
- Raises:
 RedfishError if there is no Chassis registered
- 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_first_controller(storage)[source]¶
 Get the first storage controller from a storage object.
- Parameters:
 storage – a storage object
- Returns:
 the first storage controller or None
- 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_system_collection(node)[source]¶
 Get a Redfish System Collection that includes the 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)