Firmware file processor
- class ironic.drivers.modules.ilo.firmware_processor.FirmwareImageLocation(fw_image_location, fw_image_filename)¶
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.
Exposed method to remove the wrapped firmware file
This method gets overridden by the remove method for the respective type of firmware file location it wraps.
- class ironic.drivers.modules.ilo.firmware_processor.FirmwareProcessor(url)¶
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)¶
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_tomethod 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)¶
Validates the firmware image info and returns the retrieved values.
firmware_image_info – dict object containing the firmware image info
MissingParameterValue, for missing fields (or values) in image info.
InvalidParameterValue, for unsupported firmware component
tuple of firmware url, checksum, component when the firmware update is ilo based.
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.
parsed_url – Parsed url object.
SwiftOperationError, on failure to get url from swift.
Verifies the firmware update arguments.