ironic.drivers.modules.redfish.firmware_utils module

ironic.drivers.modules.redfish.firmware_utils.cleanup(node)[source]

Clean up staged files

Parameters:

node – Node for which to clean up. Should contain ‘firmware_cleanup’ entry in driver_internal_info to indicate source(s) to be cleaned up.

ironic.drivers.modules.redfish.firmware_utils.download_to_temp(node, url)[source]

Downloads to temporary location from given URL

Parameters:
  • node – Node for which to download to temporary location

  • url – URL to download from

Returns:

File path of temporary location file is downloaded to

ironic.drivers.modules.redfish.firmware_utils.get_swift_temp_url(parsed_url)[source]

Gets Swift temporary URL

Parameters:

parsed_url – Parsed URL from URL in format swift://container/[sub-folder/]file

Returns:

Swift temporary URL

ironic.drivers.modules.redfish.firmware_utils.stage(node, source, temp_file)[source]

Stage temporary file to configured location

Parameters:
  • node – Node for which to stage the file

  • source – Where to stage the file. Corresponds to CONF.redfish.firmware_source.

  • temp_file – File path of temporary file to stage

Returns:

Tuple of staged URL and source (http or swift) that needs cleanup of staged files afterwards.

Raises:

RedfishError – If staging to HTTP server has failed.

ironic.drivers.modules.redfish.firmware_utils.validate_firmware_interface_update_args(settings)[source]

Validate update step input argument

Parameters:

settings – args to validate.

Raises:

InvalidParameterValue When argument is not valid

ironic.drivers.modules.redfish.firmware_utils.validate_update_firmware_args(firmware_images)[source]

Validate update_firmware step input argument

Parameters:

firmware_images – args to validate.

Raises:

InvalidParameterValue When argument is not valid

ironic.drivers.modules.redfish.firmware_utils.verify_checksum(node, checksum, file_path)[source]

Verify checksum.

Parameters:
  • node – Node for which file to verify checksum

  • checksum – Expected checksum value

  • file_path – File path for which to verify checksum

Raises:

RedfishError – When checksum does not match