glance_store.capabilities module

glance_store.capabilities module

Glance Store capability

class glance_store.capabilities.BitMasks

Bases: enum.IntEnum

ALL = 255
DRIVER_REUSABLE = 64
NONE = 0
READ_ACCESS = 1
READ_CHUNK = 5
READ_OFFSET = 3
READ_RANDOM = 7
RW_ACCESS = 9
RW_CHUNK = 45
RW_OFFSET = 27
RW_RANDOM = 63
WRITE_ACCESS = 8
WRITE_CHUNK = 40
WRITE_OFFSET = 24
WRITE_RANDOM = 56
class glance_store.capabilities.StoreCapability

Bases: object

capabilities
static contains(x, y)
is_capable(*capabilities)

Check if requested capability(s) are supported by current driver instance.

Parameters:capabilities – required capability(s).
set_capabilities(*dynamic_capabilites)

Set dynamic storage capabilities based on current driver configuration and backend status.

Parameters:dynamic_capabilites – dynamic storage capability(s).
unset_capabilities(*dynamic_capabilites)

Unset dynamic storage capabilities.

Parameters:dynamic_capabilites – dynamic storage capability(s).
update_capabilities()

Update dynamic storage capabilities based on current driver configuration and backend status when needed.

As a hook, the function will be triggered in two cases: calling once after store driver get configured, it was used to update dynamic storage capabilities based on current driver configuration, or calling when the capabilities checking of an operation failed every time, this was used to refresh dynamic storage capabilities based on backend status then.

This function shouldn’t raise any exception out.

glance_store.capabilities.check(store_op_fun)
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.