google / cloud-forensics-utils

Python library to carry out DFIR analysis on the Cloud
Apache License 2.0
464 stars 88 forks source link

Functionality to create storage buckets in GCP and AWS #291

Closed Fryyyyy closed 3 years ago

Fryyyyy commented 3 years ago

As part of the work for #135 - first we need to be able to create buckets.

codecov-commenter commented 3 years ago

Codecov Report

Merging #291 (551f8c6) into master (e4448c6) will increase coverage by 0.26%. The diff coverage is 67.08%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #291      +/-   ##
==========================================
+ Coverage   65.39%   65.66%   +0.26%     
==========================================
  Files          14       32      +18     
  Lines         968     2222    +1254     
==========================================
+ Hits          633     1459     +826     
- Misses        335      763     +428     
Flag Coverage Δ
nosetests 65.66% <67.08%> (+0.26%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...cloudforensics/providers/azure/internal/network.py 24.52% <24.52%> (ø)
libcloudforensics/providers/gcp/forensics.py 34.78% <28.28%> (-30.22%) :arrow_down:
libcloudforensics/providers/aws/internal/kms.py 40.00% <40.00%> (ø)
...ibcloudforensics/providers/gcp/internal/compute.py 51.01% <45.94%> (-11.34%) :arrow_down:
libcloudforensics/providers/aws/forensics.py 56.16% <53.06%> (-13.61%) :arrow_down:
...cs/providers/gcp/internal/compute_base_resource.py 37.33% <54.28%> (+0.82%) :arrow_up:
libcloudforensics/providers/aws/internal/log.py 73.07% <55.55%> (-4.20%) :arrow_down:
libcloudforensics/providers/gcp/internal/common.py 56.89% <57.44%> (+0.57%) :arrow_up:
...bcloudforensics/providers/gcp/internal/function.py 40.54% <62.50%> (+8.28%) :arrow_up:
...loudforensics/providers/azure/internal/resource.py 65.38% <65.38%> (ø)
... and 41 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8184367...551f8c6. Read the comment docs.

Fryyyyy commented 3 years ago

Not sure what's up with this current linting error ?

Fryyyyy commented 3 years ago

:( still the mypy error, @giovannt0

giovannt0 commented 3 years ago

@Fryyyyy this works locally:

bucket = client.create_bucket(
          Bucket=name,
          ACL=acl,
          CreateBucketConfiguration={
              'LocationConstraint': region or self.aws_account.default_region
          })  # type: Dict[str, Any]
      return bucket