Wrap interface function for multihash correctly
The store_add_to_backend_with_multihash() function was not wrapped correctly so that Glance could consume the secure hash value. This patch adds the correct wrapping. Closes-bug: #1784420 Change-Id: I7a94dfffb61fc212abb58c1e1aec5884474b6aa8
This commit is contained in:
parent
c369ba013f
commit
4d4cf1559c
@ -532,6 +532,15 @@ def add_to_backend(conf, image_id, data, size, scheme=None, context=None,
|
||||
verifier)
|
||||
|
||||
|
||||
def add_to_backend_with_multihash(conf, image_id, data, size, hashing_algo,
|
||||
scheme=None, context=None, verifier=None):
|
||||
if scheme is None:
|
||||
scheme = conf['glance_store']['default_store']
|
||||
store = get_store_from_scheme(scheme)
|
||||
return store_add_to_backend_with_multihash(
|
||||
image_id, data, size, hashing_algo, store, context, verifier)
|
||||
|
||||
|
||||
def set_acls(location_uri, public=False, read_tenants=[],
|
||||
write_tenants=None, context=None):
|
||||
|
||||
|
@ -279,6 +279,16 @@ def add(conf, image_id, data, size, backend, context=None,
|
||||
verifier)
|
||||
|
||||
|
||||
def add_with_multihash(conf, image_id, data, size, backend, hashing_algo,
|
||||
scheme=None, context=None, verifier=None):
|
||||
if not backend:
|
||||
backend = conf.glance_store.default_backend
|
||||
|
||||
store = get_store_from_store_identifier(backend)
|
||||
return store_add_to_backend_with_multihash(
|
||||
image_id, data, size, hashing_algo, store, context, verifier)
|
||||
|
||||
|
||||
def _check_metadata(store, metadata):
|
||||
if not isinstance(metadata, dict):
|
||||
msg = (_("The storage driver %(driver)s returned invalid "
|
||||
|
Loading…
Reference in New Issue
Block a user