Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,9 @@ def _generate_delete_blobs_options(self,
if_tags_match_condition = kwargs.pop('if_tags_match_condition', None)
kwargs.update({'raise_on_any_failure': raise_on_any_failure,
'sas': self._query_str.replace('?', '&'),
'timeout': '&timeout=' + str(timeout) if timeout else ""
'timeout': '&timeout=' + str(timeout) if timeout else "",
'path': self.container_name,
'restype': 'restype=container&'
})

reqs = []
Expand Down Expand Up @@ -1259,7 +1261,9 @@ def _generate_set_tiers_options(self,
if_tags = kwargs.pop('if_tags_match_condition', None)
kwargs.update({'raise_on_any_failure': raise_on_any_failure,
'sas': self._query_str.replace('?', '&'),
'timeout': '&timeout=' + str(timeout) if timeout else ""
'timeout': '&timeout=' + str(timeout) if timeout else "",
'path': self.container_name,
'restype': 'restype=container&'
})

reqs = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,17 +262,20 @@ def _create_pipeline(self, credential, **kwargs):
return config, Pipeline(config.transport, policies=policies)

def _batch_send(
self, *reqs, # type: HttpRequest
self,
*reqs, # type: HttpRequest
**kwargs
):
"""Given a series of request, do a Storage batch call.
"""
# Pop it here, so requests doesn't feel bad about additional kwarg
raise_on_any_failure = kwargs.pop("raise_on_any_failure", True)
request = self._client._client.post( # pylint: disable=protected-access
url='{}://{}/?comp=batch{}{}'.format(
url='{}://{}/{}?{}comp=batch{}{}'.format(
self.scheme,
self.primary_hostname,
kwargs.pop('path', ""),
kwargs.pop('restype', ""),
kwargs.pop('sas', ""),
kwargs.pop('timeout', "")
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,19 +111,22 @@ def _create_pipeline(self, credential, **kwargs):
return config, AsyncPipeline(config.transport, policies=policies)

async def _batch_send(
self, *reqs: 'HttpRequest',
self,
*reqs, # type: HttpRequest
**kwargs
):
"""Given a series of request, do a Storage batch call.
"""
# Pop it here, so requests doesn't feel bad about additional kwarg
raise_on_any_failure = kwargs.pop("raise_on_any_failure", True)
request = self._client._client.post( # pylint: disable=protected-access
url='{}://{}/?comp=batch{}{}'.format(
url='{}://{}/{}?{}comp=batch{}{}'.format(
self.scheme,
self.primary_hostname,
kwargs.pop('sas', None),
kwargs.pop('timeout', None)
kwargs.pop('path', ""),
kwargs.pop('restype', ""),
kwargs.pop('sas', ""),
kwargs.pop('timeout', "")
),
headers={
'x-ms-version': self.api_version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ interactions:
x-ms-version:
- '2019-07-07'
method: POST
uri: https://storagename.blob.core.windows.net/?comp=batch
uri: https://storagename.blob.core.windows.net/containerd5f4183b?restype=container&comp=batch
response:
body:
string: "--batchresponse_78d7e1c5-b832-4902-a2f0-2412a0c529b9\r\nContent-Type:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ interactions:
x-ms-version:
- '2019-07-07'
method: POST
uri: https://storagename.blob.core.windows.net/?comp=batch
uri: https://storagename.blob.core.windows.net/container71811ab8?restype=container&comp=batch
response:
body:
string: "--batchresponse_e14ad61c-425b-4f12-a33b-02674b3de02f\r\nContent-Type:
Expand Down
Loading