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_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.
is_image_href_ordinary_file_name
(image_href)[source]¶Check if image_href is a ordinary file name.
This method judges if image_href is an ordinary file name or not, which is a file supposed to be stored in share file system. The ordinary file name is neither glance image href nor image service href.
Returns: | True if image_href is ordinary file name, False otherwise. |
---|
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 |
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.