diff options
author | Ian Cordasco <ian.cordasco@rackspace.com> | 2015-01-23 12:24:52 -0600 |
---|---|---|
committer | Ian Cordasco <ian.cordasco@rackspace.com> | 2015-02-13 19:48:02 +0000 |
commit | ac9bd0d83acaf703013f4e4b16c35be5e6567151 (patch) | |
tree | 79a660b8f01d614e8cd23ef6ca5854f2e342dd36 /glance_store/_drivers/s3.py | |
parent | 138875b7c3051a4f92616df56bffb8c91e669d88 (diff) | |
download | glance_store-ac9bd0d83acaf703013f4e4b16c35be5e6567151.tar.gz |
Use a named enum for capability values
In Iedf0d4f829e46ca64c3f4fc6a7dfee54d9b0605b we added support for driver
capabilities in glance_store. That same change also used (mutable)
module globals to check driver capabilities. By moving the capability
definitions inside a subclass of IntEnum we retain all of the previous
functionality with the guarantee that the enum values will not change
once defined.
Change-Id: I13c7bd507252e793b2c790cc9b77c7b8db432d02
Diffstat (limited to 'glance_store/_drivers/s3.py')
-rw-r--r-- | glance_store/_drivers/s3.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/glance_store/_drivers/s3.py b/glance_store/_drivers/s3.py index f74fdba..7955f1a 100644 --- a/glance_store/_drivers/s3.py +++ b/glance_store/_drivers/s3.py @@ -294,7 +294,7 @@ class ChunkedFile(object): class Store(glance_store.driver.Store): """An implementation of the s3 adapter.""" - _CAPABILITIES = capabilities.RW_ACCESS + _CAPABILITIES = capabilities.BitMasks.RW_ACCESS OPTIONS = _S3_OPTS EXAMPLE_URL = "s3://<ACCESS_KEY>:<SECRET_KEY>@<S3_URL>/<BUCKET>/<OBJ>" |