ironic.drivers.modules.irmc.management module¶
iRMC Management Driver
- class ironic.drivers.modules.irmc.management.IRMCManagement(*args, **kwargs)[source]¶
- Bases: - IPMIManagement,- RedfishManagement- detect_vendor(task)[source]¶
- Detects and returns the hardware vendor. - Parameters:
- task – A task from TaskManager. 
- Raises:
- InvalidParameterValue if a required parameter is missing 
- Raises:
- MissingParameterValue if a required parameter is missing 
- Raises:
- RedfishError on Redfish operation error. 
- Raises:
- PasswordFileFailedToCreate from creating or writing to the temporary file during IPMI operation. 
- Raises:
- processutils.ProcessExecutionError from executing ipmi command 
- Returns:
- String representing the BMC reported Vendor or Manufacturer, otherwise returns None. 
 
 - get_boot_device(task)[source]¶
- Get the current boot device for the task’s node. - Returns the current boot device of the node. - Parameters:
- task – a task from TaskManager. 
- Raises:
- InvalidParameterValue if an invalid boot device is specified. 
- Raises:
- MissingParameterValue if a required parameter is missing. 
- Raises:
- IPMIFailure on an error from ipmitool. 
- Raises:
- RedfishConnectionError on Redfish operation failure. 
- Raises:
- RedfishError on Redfish operation failure. 
- Returns:
- a dictionary containing: - boot_device:
- the boot device, one of - ironic.common.boot_devicesor None if it is unknown.
- persistent:
- Whether the boot device will persist to all future boots or not, None if it is unknown. 
 
 
 - get_boot_mode(task)[source]¶
- Get the current boot mode for a node. - IRMCManagement class doesn’t support this method - Parameters:
- task – a task from TaskManager. 
- Raises:
- UnsupportedDriverExtension if requested operation is not supported by the driver 
 
 - get_indicator_state(task, component, indicator)[source]¶
- Get current state of the indicator of the hardware component. - IRMCManagement class doesn’t support this method - Parameters:
- task – A task from TaskManager. 
- component – The hardware component, one of - ironic.common.components.
- indicator – Indicator ID (as reported by get_supported_indicators). 
 
- Raises:
- UnsupportedDriverExtension if requested operation is not supported by the driver 
 
 - get_mac_addresses(task)[source]¶
- Get MAC address information for the node. - IRMCManagement class doesn’t support this method - Parameters:
- task – A TaskManager instance containing the node to act on. 
- Raises:
- UnsupportedDriverExtension 
 
 - get_properties()[source]¶
- Return the properties of the interface. - Returns:
- Dictionary of <property name>:<property description> entries. 
 
 - get_secure_boot_state(task)[source]¶
- Get the current secure boot state for the node. - NOTE: Not all drivers support this method. Older hardware
- may not implement that. 
 - Parameters:
- task – A task from TaskManager. 
- Raises:
- MissingParameterValue if a required parameter is missing 
- Raises:
- DriverOperationError or its derivative in case of driver runtime error. 
- Raises:
- UnsupportedDriverExtension if secure boot is not supported by the driver or the hardware 
- Returns:
- Boolean 
 
 - get_sensors_data(task)[source]¶
- Get sensors data method. - It gets sensor data from the task’s node via SCCI, and convert the data from XML to the dict format. - Parameters:
- task – A TaskManager instance. 
- Raises:
- FailedToGetSensorData when getting the sensor data fails. 
- Raises:
- FailedToParseSensorData when parsing sensor data fails. 
- Raises:
- InvalidParameterValue if required parameters are invalid. 
- Raises:
- MissingParameterValue if a required parameter is missing. 
- Returns:
- Returns a consistent formatted dict of sensor data grouped by sensor type, which can be processed by Ceilometer. Example: - { 'Sensor Type 1': { 'Sensor ID 1': { 'Sensor Reading': 'Value1 Units1', 'Sensor ID': 'Sensor ID 1', 'Units': 'Units1' }, 'Sensor ID 2': { 'Sensor Reading': 'Value2 Units2', 'Sensor ID': 'Sensor ID 2', 'Units': 'Units2' } }, 'Sensor Type 2': { 'Sensor ID 3': { 'Sensor Reading': 'Value3 Units3', 'Sensor ID': 'Sensor ID 3', 'Units': 'Units3' }, 'Sensor ID 4': { 'Sensor Reading': 'Value4 Units4', 'Sensor ID': 'Sensor ID 4', 'Units': 'Units4' } } } 
 
 - get_supported_boot_devices(task)[source]¶
- Get list of supported boot devices - Actual code is delegated to IPMIManagement or RedfishManagement based on iRMC firmware version. - Parameters:
- task – A TaskManager instance 
- Returns:
- A list with the supported boot devices defined in - ironic.common.boot_devices.
 
 - get_supported_boot_modes(task)[source]¶
- Get a list of the supported boot modes. - IRMCManagement class doesn’t support this method - Parameters:
- task – a task from TaskManager. 
- Raises:
- UnsupportedDriverExtension if requested operation is not supported by the driver 
 
 - get_supported_indicators(task, component=None)[source]¶
- Get a map of the supported indicators (e.g. LEDs). - IRMCManagement class doesn’t support this method - Parameters:
- task – a task from TaskManager. 
- component – If not None, return indicator information for just this component, otherwise return indicators for all existing components. 
 
- Raises:
- UnsupportedDriverExtension if requested operation is not supported by the driver 
 
 - inject_nmi(task)[source]¶
- Inject NMI, Non Maskable Interrupt. - Inject NMI (Non Maskable Interrupt) for a node immediately. - Parameters:
- task – A TaskManager instance containing the node to act on. 
- Raises:
- IRMCOperationError on an error from SCCI 
- Returns:
- None 
 
 - restore_irmc_bios_config(task)[source]¶
- Restore BIOS config for a node. - Parameters:
- task – a task from TaskManager. 
- Raises:
- NodeCleaningFailure, on failure to execute step. 
- Returns:
- None. 
 
 - set_boot_device(task, device, persistent=False)[source]¶
- Set the boot device for a node. - Set the boot device to use on next reboot of the node. - Parameters:
- task – A task from TaskManager. 
- device – The boot device, one of the supported devices listed in - ironic.common.boot_devices.
- persistent – Boolean value. True if the boot device will persist to all future boots, False if not. Default: False. 
 
- Raises:
- InvalidParameterValue if an invalid boot device is specified. 
- Raises:
- MissingParameterValue if a required parameter is missing. 
- Raises:
- IPMIFailure on an error from ipmitool. 
- Raises:
- RedfishConnectionError on Redfish operation failure. 
- Raises:
- RedfishError on Redfish operation failure. 
 
 - set_boot_mode(task, mode)[source]¶
- Set the boot mode for a node. - IRMCManagement class doesn’t support this method - Parameters:
- task – a task from TaskManager. 
- mode – The boot mode, one of - ironic.common.boot_modes.
 
- Raises:
- UnsupportedDriverExtension if requested operation is not supported by the driver 
 
 - set_indicator_state(task, component, indicator, state)[source]¶
- Set indicator on the hardware component to the desired state. - IRMCManagement class doesn’t support this method - Parameters:
- task – A task from TaskManager. 
- component – The hardware component, one of - ironic.common.components.
- indicator – Indicator ID (as reported by get_supported_indicators). 
 
- State:
- Desired state of the indicator, one of - ironic.common.indicator_states.
- Raises:
- UnsupportedDriverExtension if requested operation is not supported by the driver 
 
 - set_secure_boot_state(task, state)[source]¶
- Set the current secure boot state for the node. - NOTE: Not all drivers support this method. Older hardware
- may not implement that. 
 - Parameters:
- task – A task from TaskManager. 
- state – A new state as a boolean. 
 
- Raises:
- MissingParameterValue if a required parameter is missing 
- Raises:
- DriverOperationError or its derivative in case of driver runtime error. 
- Raises:
- UnsupportedDriverExtension if secure boot is not supported by the driver or the hardware 
 
 - validate(task)[source]¶
- Validate the driver-specific management information. - This method validates whether the ‘driver_info’ property of the supplied node contains the required information for this driver. - Parameters:
- task – A TaskManager instance containing the node to act on. 
- Raises:
- InvalidParameterValue if required parameters are invalid. 
- Raises:
- MissingParameterValue if a required parameter is missing. 
 
 
