dcicutils 7.11.0.1b9__tar.gz → 7.12.0.1b4__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/PKG-INFO +1 -3
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/glacier_utils.py +16 -4
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/license_utils.py +677 -165
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/misc_utils.py +9 -97
- dcicutils-7.12.0.1b4/dcicutils/scripts/run_license_checker.py +77 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/pyproject.toml +8 -9
- dcicutils-7.11.0.1b9/dcicutils/sheet_utils.py +0 -1131
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/LICENSE.txt +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/README.rst +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/__init__.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/base.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/beanstalk_utils.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/cloudformation_utils.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/codebuild_utils.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/command_utils.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/common.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/contribution_scripts.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/contribution_utils.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/creds_utils.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/data_utils.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/deployment_utils.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/diff_utils.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/docker_utils.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/ecr_scripts.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/ecr_utils.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/ecs_utils.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/env_base.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/env_manager.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/env_scripts.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/env_utils.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/env_utils_legacy.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/es_utils.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/exceptions.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/ff_mocks.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/ff_utils.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/function_cache_decorator.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/jh_utils.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/kibana/dashboards.json +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/kibana/readme.md +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/lang_utils.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/log_utils.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/obfuscation_utils.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/opensearch_utils.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/project_utils.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/qa_checkers.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/qa_utils.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/redis_tools.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/redis_utils.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/s3_utils.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/scripts/publish_to_pypi.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/secrets_utils.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/snapshot_utils.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/ssl_certificate_utils.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/task_utils.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/trace_utils.py +0 -0
- {dcicutils-7.11.0.1b9 → dcicutils-7.12.0.1b4}/dcicutils/variant_utils.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: dcicutils
|
3
|
-
Version: 7.
|
3
|
+
Version: 7.12.0.1b4
|
4
4
|
Summary: Utility package for interacting with the 4DN Data Portal and other 4DN resources
|
5
5
|
Home-page: https://github.com/4dn-dcic/utils
|
6
6
|
License: MIT
|
@@ -25,11 +25,9 @@ Requires-Dist: PyYAML (>=5.1,<5.5)
|
|
25
25
|
Requires-Dist: aws-requests-auth (>=0.4.2,<1)
|
26
26
|
Requires-Dist: boto3 (>=1.17.39,<2.0.0)
|
27
27
|
Requires-Dist: botocore (>=1.20.39,<2.0.0)
|
28
|
-
Requires-Dist: chardet (>=5.2.0,<6.0.0)
|
29
28
|
Requires-Dist: docker (>=4.4.4,<5.0.0)
|
30
29
|
Requires-Dist: elasticsearch (==7.13.4)
|
31
30
|
Requires-Dist: gitpython (>=3.1.2,<4.0.0)
|
32
|
-
Requires-Dist: openpyxl (>=3.1.2,<4.0.0)
|
33
31
|
Requires-Dist: opensearch-py (>=2.0.1,<3.0.0)
|
34
32
|
Requires-Dist: pyOpenSSL (>=23.1.1,<24.0.0)
|
35
33
|
Requires-Dist: pytz (>=2020.4)
|
@@ -58,6 +58,10 @@ class GlacierUtils:
|
|
58
58
|
self.env_key = self.key_manager.get_keydict_for_env(env_name)
|
59
59
|
self.health_page = get_health_page(key=self.env_key, ff_env=env_name)
|
60
60
|
|
61
|
+
@property
|
62
|
+
def kms_key_id(self) -> str:
|
63
|
+
return self.health_page.get("s3_encrypt_key_id", "")
|
64
|
+
|
61
65
|
@classmethod
|
62
66
|
def is_glacier_storage_class(cls, storage_class: S3StorageClass):
|
63
67
|
return storage_class in S3_GLACIER_CLASSES
|
@@ -295,6 +299,9 @@ class GlacierUtils:
|
|
295
299
|
}
|
296
300
|
if tags:
|
297
301
|
cmu['Tagging'] = tags
|
302
|
+
if self.kms_key_id:
|
303
|
+
cmu['ServerSideEncryption'] = 'aws:kms'
|
304
|
+
cmu['SSEKMSKeyId'] = self.kms_key_id
|
298
305
|
mpu = self.s3.create_multipart_upload(**cmu)
|
299
306
|
mpu_upload_id = mpu['UploadId']
|
300
307
|
except Exception as e:
|
@@ -381,16 +388,21 @@ class GlacierUtils:
|
|
381
388
|
else:
|
382
389
|
# Force copy the object into standard in a single operation
|
383
390
|
copy_source = {'Bucket': bucket, 'Key': key}
|
384
|
-
|
391
|
+
copy_args = {
|
385
392
|
'Bucket': bucket, 'Key': key,
|
386
393
|
'StorageClass': storage_class,
|
387
394
|
}
|
388
395
|
if version_id:
|
389
396
|
copy_source['VersionId'] = version_id
|
390
|
-
|
397
|
+
copy_args['CopySourceVersionId'] = version_id
|
391
398
|
if tags:
|
392
|
-
|
393
|
-
|
399
|
+
copy_args['Tagging'] = tags
|
400
|
+
if self.kms_key_id:
|
401
|
+
copy_args['ServerSideEncryption'] = 'aws:kms'
|
402
|
+
copy_args['SSEKMSKeyId'] = self.kms_key_id
|
403
|
+
response = self.s3.copy_object(
|
404
|
+
**copy_args, CopySource=copy_source
|
405
|
+
)
|
394
406
|
PRINT(f'Response from boto3 copy:\n{response}')
|
395
407
|
PRINT(f'Object {bucket}/{key} copied back to its original location in S3')
|
396
408
|
return response
|