mirror of
https://github.com/lucaspalomodevelop/indico-plugins.git
synced 2026-03-14 16:04:36 +00:00
Storage/S3: Add custom metadata exposed via API
This commit is contained in:
parent
d19afe7157
commit
1a49a6d7a6
@ -69,7 +69,7 @@ class RHBuckets(RH):
|
||||
if not isinstance(storage, S3StorageBase):
|
||||
continue
|
||||
readonly = isinstance(storage, ReadOnlyStorageMixin)
|
||||
data[key] = {'readonly': readonly}
|
||||
data[key] = {'readonly': readonly, 'meta': storage.meta}
|
||||
if isinstance(storage, S3Storage):
|
||||
data[key].update(self._get_static_info(storage))
|
||||
elif isinstance(storage, DynamicS3Storage):
|
||||
|
||||
@ -53,6 +53,7 @@ class S3StorageBase(Storage):
|
||||
session_kwargs['aws_secret_access_key'] = data['secret_key']
|
||||
self.bucket_policy_file = data.get('bucket_policy_file')
|
||||
self.bucket_versioning = data.get('bucket_versioning') in ('1', 'true', 'yes')
|
||||
self.meta = data.get('meta')
|
||||
self.session = boto3.session.Session(**session_kwargs)
|
||||
self.client = self.session.client('s3', endpoint_url=self.endpoint_url)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user