Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement SAS URL generation for Azure Storage #1408

Merged
merged 1 commit into from Jan 14, 2020
Merged

Implement SAS URL generation for Azure Storage #1408

merged 1 commit into from Jan 14, 2020

Conversation

c-w
Copy link
Member

@c-w c-w commented Jan 10, 2020

Implement SAS URL generation for Azure Storage

Description

As discussed in #1403, this pull request implements AzureBlobsStorageDriver.get_object_cdn_url via a service SAS.

Status

  • done, ready for review

Checklist

@codecov-io
Copy link

@codecov-io codecov-io commented Jan 10, 2020

Codecov Report

Merging #1408 into trunk will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##            trunk    #1408      +/-   ##
==========================================
+ Coverage   86.44%   86.45%   +<.01%     
==========================================
  Files         366      366              
  Lines       76767    76785      +18     
  Branches     7529     7529              
==========================================
+ Hits        66365    66383      +18     
  Misses       7534     7534              
  Partials     2868     2868
Impacted Files Coverage Δ
libcloud/test/storage/test_azure_blobs.py 94.34% <100%> (+0.07%) ⬆️
libcloud/storage/drivers/azure_blobs.py 85.62% <100%> (+0.53%) ⬆️

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 435d82b...885bc52. Read the comment docs.

Kami
Kami approved these changes Jan 14, 2020
Copy link
Member

@Kami Kami left a comment

LGTM 👍

@@ -489,6 +503,70 @@ def get_object(self, container_name, object_name):
raise ObjectDoesNotExistError(value=None, driver=self,
object_name=object_name)

def get_object_cdn_url(self, obj,
ex_expiry=AZURE_STORAGE_CDN_URL_EXPIRY_HOURS):
Copy link
Member

@Kami Kami Jan 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going forward, we can also start adding type annotations for various method arguments in the drivers when we introduce new functionality.

We now don't support Python 2.7 anymore, but perhaps we should still start with type annotations in the comments and move to putting them directly into the method signatures in the future.

Copy link
Member Author

@c-w c-w Jan 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll take a note to work on a follow-up PR with type annotations for the storage API.

@c-w c-w merged commit bb865b1 into apache:trunk Jan 14, 2020
1 check passed
@c-w c-w deleted the azure-sas-url branch Jan 14, 2020
@c-w c-w mentioned this pull request Jan 14, 2020
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants