Bases: ironic.common.glance_service.base_image_service.BaseImageService, ironic.common.glance_service.service.ImageService
Generate a no-auth Swift temporary URL.
This function will generate the temporary Swift URL using the image id from Glance and the config options: ‘swift_endpoint_url’, ‘swift_api_version’, ‘swift_account’ and ‘swift_container’. The temporary URL will be valid for ‘swift_temp_url_duration’ seconds. This allows Ironic to download a Glance image without passing around an auth_token.
Parameters: | image_info – The return from a GET request to Glance for a certain image_id. Should be a dictionary, with keys like ‘name’ and ‘checksum’. See http://docs.openstack.org/developer/glance/glanceapi.html for examples. |
---|---|
Returns: | A signed Swift URL from which an image can be downloaded, without authentication. |
Raises: | InvalidParameterValue if Swift config options are not set correctly. |
Raises: | MissingParameterValue if a required parameter is not set. |
Raises: | ImageUnacceptable if the image info from Glance does not have a image ID. |