Skip to content

Commit

Permalink
[Storage] Fix service operations with account SAS (#24217)
Browse files Browse the repository at this point in the history
  • Loading branch information
jalauzon-msft authored Apr 28, 2022
1 parent 0a9f2be commit bfd037f
Show file tree
Hide file tree
Showing 26 changed files with 550 additions and 153 deletions.
2 changes: 2 additions & 0 deletions sdk/storage/azure-storage-blob/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
### Bugs Fixed:
- Fixed a bug in `BlobClient.from_blob_url()` such that users will receive a more helpful error
message if they pass an incorrect URL without a full `/container/blob` path.
- Fixed a bug, introduced in the previous beta release, that caused Authentication errors when attempting to use
an Account SAS with certain service level operations.

## 12.12.0b1 (2022-04-14)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ async def set_properties( # pylint: disable=inconsistent-return-statements
_content = self._serialize.body(storage_service_properties, 'StorageServiceProperties', is_xml=True)

request = build_set_properties_request(
url=self._config.url,
restype=restype,
comp=comp,
version=self._config.version,
Expand Down Expand Up @@ -119,7 +120,7 @@ async def set_properties( # pylint: disable=inconsistent-return-statements
if cls:
return cls(pipeline_response, None, response_headers)

set_properties.metadata = {'url': "/"} # type: ignore
set_properties.metadata = {'url': "{url}"} # type: ignore


@distributed_trace_async
Expand Down Expand Up @@ -163,6 +164,7 @@ async def get_properties(


request = build_get_properties_request(
url=self._config.url,
restype=restype,
comp=comp,
version=self._config.version,
Expand Down Expand Up @@ -197,7 +199,7 @@ async def get_properties(

return deserialized

get_properties.metadata = {'url': "/"} # type: ignore
get_properties.metadata = {'url': "{url}"} # type: ignore


@distributed_trace_async
Expand Down Expand Up @@ -242,6 +244,7 @@ async def get_statistics(


request = build_get_statistics_request(
url=self._config.url,
restype=restype,
comp=comp,
version=self._config.version,
Expand Down Expand Up @@ -277,7 +280,7 @@ async def get_statistics(

return deserialized

get_statistics.metadata = {'url': "/"} # type: ignore
get_statistics.metadata = {'url': "{url}"} # type: ignore


@distributed_trace_async
Expand Down Expand Up @@ -341,6 +344,7 @@ async def list_containers_segment(


request = build_list_containers_segment_request(
url=self._config.url,
comp=comp,
version=self._config.version,
prefix=prefix,
Expand Down Expand Up @@ -378,7 +382,7 @@ async def list_containers_segment(

return deserialized

list_containers_segment.metadata = {'url': "/"} # type: ignore
list_containers_segment.metadata = {'url': "{url}"} # type: ignore


@distributed_trace_async
Expand Down Expand Up @@ -427,6 +431,7 @@ async def get_user_delegation_key(
_content = self._serialize.body(key_info, 'KeyInfo', is_xml=True)

request = build_get_user_delegation_key_request(
url=self._config.url,
restype=restype,
comp=comp,
version=self._config.version,
Expand Down Expand Up @@ -464,7 +469,7 @@ async def get_user_delegation_key(

return deserialized

get_user_delegation_key.metadata = {'url': "/"} # type: ignore
get_user_delegation_key.metadata = {'url': "{url}"} # type: ignore


@distributed_trace_async
Expand Down Expand Up @@ -496,6 +501,7 @@ async def get_account_info( # pylint: disable=inconsistent-return-statements


request = build_get_account_info_request(
url=self._config.url,
restype=restype,
comp=comp,
version=self._config.version,
Expand Down Expand Up @@ -529,7 +535,7 @@ async def get_account_info( # pylint: disable=inconsistent-return-statements
if cls:
return cls(pipeline_response, None, response_headers)

get_account_info.metadata = {'url': "/"} # type: ignore
get_account_info.metadata = {'url': "{url}"} # type: ignore


@distributed_trace_async
Expand Down Expand Up @@ -579,6 +585,7 @@ async def submit_batch(
_content = self._serialize.body(body, 'IO')

request = build_submit_batch_request(
url=self._config.url,
multipart_content_type=multipart_content_type,
comp=comp,
version=self._config.version,
Expand Down Expand Up @@ -615,7 +622,7 @@ async def submit_batch(

return deserialized

submit_batch.metadata = {'url': "/"} # type: ignore
submit_batch.metadata = {'url': "{url}"} # type: ignore


@distributed_trace_async
Expand Down Expand Up @@ -676,6 +683,7 @@ async def filter_blobs(


request = build_filter_blobs_request(
url=self._config.url,
comp=comp,
version=self._config.version,
timeout=timeout,
Expand Down Expand Up @@ -713,5 +721,5 @@ async def filter_blobs(

return deserialized

filter_blobs.metadata = {'url': "/"} # type: ignore
filter_blobs.metadata = {'url': "{url}"} # type: ignore

Loading

0 comments on commit bfd037f

Please sign in to comment.