ironic.drivers.modules.ilo.firmware_processor module¶
Firmware file processor
- class ironic.drivers.modules.ilo.firmware_processor.FirmwareImageLocation(fw_image_location, fw_image_filename)[source]¶
Bases:
object
Firmware image location class
This class acts as a wrapper class for the firmware image location. It primarily helps in removing the firmware files from their respective locations, made available for firmware update operation.
- class ironic.drivers.modules.ilo.firmware_processor.FirmwareProcessor(url)[source]¶
Bases:
object
Firmware file processor
This class helps in downloading the firmware file from url, extracting the firmware file (if its in compact format) and makes it ready for firmware update operation. In future, methods can be added as and when required to extend functionality for different firmware file types.
- process_fw_on(node, expected_checksum)[source]¶
Processes the firmware file from the url
This is the template method which downloads the firmware file from url, verifies checksum and extracts the firmware and makes it ready for firmware update operation.
_download_fw_to
method is set in the firmware processor object creation factory method,get_fw_processor()
, based on the url type. :param node: a single Node. :param expected_checksum: checksum to be checked against. :returns: wrapper object of raw firmware image location :raises: IloOperationError, on failure to process firmware file. :raises: ImageDownloadFailed, on failure to download the original file. :raises: ImageRefValidationFailed, on failure to verify the checksum. :raises: SwiftOperationError, if upload to Swift fails. :raises: ImageUploadFailed, if upload to web server fails.
- ironic.drivers.modules.ilo.firmware_processor.get_and_validate_firmware_image_info(firmware_image_info, firmware_update_mode)[source]¶
Validates the firmware image info and returns the retrieved values.
- Parameters:
firmware_image_info – dict object containing the firmware image info
- Raises:
MissingParameterValue, for missing fields (or values) in image info.
- Raises:
InvalidParameterValue, for unsupported firmware component
- Returns:
tuple of firmware url, checksum, component when the firmware update is ilo based.
- ironic.drivers.modules.ilo.firmware_processor.get_swift_url(parsed_url)[source]¶
Gets swift temp url.
It generates a temp url for the swift based firmware url to the target file. Expecting url as swift://containername/objectname.
- Parameters:
parsed_url – Parsed url object.
- Raises:
SwiftOperationError, on failure to get url from swift.