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 @@ -226,7 +226,8 @@ def cf_blob_service(cli_ctx, kwargs):
account_url = get_account_url(cli_ctx, account_name=account_name, service='blob')
credential = account_key or sas_token or token_credential

return t_blob_service(account_url=account_url, credential=credential, **client_kwargs)
return t_blob_service(account_url=account_url, credential=credential,
connection_timeout=kwargs.pop('connection_timeout', None), **client_kwargs)


def get_credential(kwargs):
Expand All @@ -250,7 +251,8 @@ def cf_blob_client(cli_ctx, kwargs):
kwargs.pop('blob_name')
return t_blob_client.from_blob_url(blob_url=kwargs.pop('blob_url'),
credential=credential,
snapshot=kwargs.pop('snapshot', None))
snapshot=kwargs.pop('snapshot', None),
connection_timeout=kwargs.pop('connection_timeout', None))
if 'blob_url' in kwargs:
kwargs.pop('blob_url')

Expand Down
2 changes: 2 additions & 0 deletions src/azure-cli/azure/cli/command_modules/storage/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -987,6 +987,8 @@ def load_arguments(self, _): # pylint: disable=too-many-locals, too-many-statem
c.extra('tags', arg_type=tags_type, arg_group="Additional Flags")
c.argument('metadata', arg_group="Additional Flags")
c.argument('timeout', arg_group="Additional Flags")
c.extra('connection_timeout', options_list=('--socket-timeout'), type=int,
help='The socket timeout(secs), used by the service to regulate data flow.')

# pylint: disable=line-too-long
with self.argument_context('storage blob upload-batch', resource_type=ResourceType.DATA_STORAGE_BLOB) as c:
Expand Down
Loading