The glance_store.driver Module

The glance_store.driver Module

Base class for all storage backends

class glance_store.driver.Store(conf)

Bases: glance_store.capabilities.StoreCapability

OPTIONS = None
READ_CHUNKSIZE = 4194304
WRITE_CHUNKSIZE = 4194304
add(store, *args, **kwargs)
configure(re_raise_bsc=False)

Configure the store to use the stored configuration options and initialize capabilities based on current configuration.

Any store that needs special configuration should implement this method.

configure_add()

This is like configure except that it’s specifically for configuring the store to accept objects.

If the store was not able to successfully configure itself, it should raise exceptions.BadStoreConfiguration.

delete(store, *args, **kwargs)
get(store, *args, **kwargs)
get_schemes()

Returns a tuple of schemes which this store can handle.

get_size(location, context=None)

Takes a glance_store.location.Location object that indicates where to find the image file, and returns the size

Parameters:locationglance_store.location.Location object, supplied from glance_store.location.get_location_from_uri()
Raises:glance_store.exceptions.NotFound if image does not exist
get_store_location_class()

Returns the store location class that is used by this store.

set_acls(location, public=False, read_tenants=None, write_tenants=None, context=None)

Sets the read and write access control list for an image in the backend store.

Parameters:
  • locationglance_store.location.Location object, supplied from glance_store.location.get_location_from_uri()
  • public – A boolean indicating whether the image should be public.
  • read_tenants – A list of tenant strings which should be granted read access for an image.
  • write_tenants – A list of tenant strings which should be granted write access for an image.
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.