ironic.common.glance_service.service_utils module

ironic.common.glance_service.service_utils module

ironic.common.glance_service.service_utils.get_glance_api_server(image_href)[source]

Construct a glance API url from config options

Returns a random server from the CONF.glance.glance_api_servers list of servers.

Parameters:image_href – href of an image
Returns:glance API URL
Raises:InvalidImageRef – when input image href is invalid
ironic.common.glance_service.service_utils.is_glance_image(image_href)[source]
ironic.common.glance_service.service_utils.is_image_active(image)[source]

Check the image status.

This check is needed in case the Glance image is stuck in queued status or pending_delete.

ironic.common.glance_service.service_utils.is_image_available(context, image)[source]

Check image availability.

This check is needed in case Nova and Glance are deployed without authentication turned on.

ironic.common.glance_service.service_utils.parse_image_id(image_href)[source]

Parse an image id from image href.

Parameters:image_href – href of an image
Returns:image id parsed from image_href
Raises:InvalidImageRef – when input image href is invalid
ironic.common.glance_service.service_utils.translate_from_glance(image)[source]
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.