# glance.common.store_utils module

glance.common.store_utils.check_reserved_stores(enabled_stores)

glance.common.store_utils.delete_image_location_from_backend(context, image_id, location)

  Given a location, immediately or schedule the deletion of an image location and update location status to db.

  Parameters

    - context – The request context

    - image_id – The image identifier

    - location – The image location entry

glance.common.store_utils.get_dir_separator()

glance.common.store_utils.get_updated_store_location(locations)

glance.common.store_utils.safe_delete_from_backend(context, image_id, location)

  Given a location, delete an image from the store and update location status to db.

  This function try to handle all known exceptions which might be raised by those calls on store and DB modules in its implementation.

  Parameters

    - context – The request context

    - image_id – The image identifier

    - location – The image location entry

glance.common.store_utils.schedule_delayed_delete_from_backend(context, image_id, location)

  Given a location, schedule the deletion of an image location and update location status to db.

  Parameters

    - context – The request context

    - image_id – The image identifier

    - location – The image location entry

glance.common.store_utils.update_store_in_locations(context, image, image_repo)

glance.common.store_utils.validate_external_location(uri)

  Validate if URI of external location are supported.

  Only over non-local store types are OK, i.e. Swift, HTTP. Note the absence of ‘file://’ for security reasons, see LP bug #942118, 1400966, ‘swift+config://’ is also absent for security reasons, see LP bug #1334196.

  Parameters

    uri – The URI of external image location.

  Returns

    Whether given URI of external image location are OK.

this page last updated: 2026-03-19 02:17:34

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

found an error? report a bug