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
1 change: 1 addition & 0 deletions src/azure-cli/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Release History
**Storage**

* Add a new command group `az storage share-rm` to use the Microsoft.Storage resource provider for Azure file share management operations.
* Fix issue #11415: permission error for `az storage blob update`

2.0.80
++++++
Expand Down
29 changes: 15 additions & 14 deletions src/azure-cli/azure/cli/command_modules/storage/_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,16 @@ def get_config_value(section, key, default):
if auth_mode == 'login':
n.token_credential = _create_token_credential(cmd.cli_ctx)

# give warning if there are account key args being ignored
account_key_args = [n.account_key and "--account-key", n.sas_token and "--sas-token",
n.connection_string and "--connection-string"]
account_key_args = [arg for arg in account_key_args if arg]

if account_key_args:
logger.warning('In "login" auth mode, the following arguments are ignored: %s',
' ,'.join(account_key_args))
return
if hasattr(n, 'token_credential') and n.token_credential:
# give warning if there are account key args being ignored
account_key_args = [n.account_key and "--account-key", n.sas_token and "--sas-token",
n.connection_string and "--connection-string"]
account_key_args = [arg for arg in account_key_args if arg]

if account_key_args:
logger.warning('In "login" auth mode, the following arguments are ignored: %s',
' ,'.join(account_key_args))
return

if not n.connection_string:
n.connection_string = get_config_value('storage', 'connection_string', None)
Expand Down Expand Up @@ -369,13 +370,13 @@ def validator(cmd, namespace):
key = ns.get('account_key')
cs = ns.get('connection_string')
sas = ns.get('sas_token')
token_credential = ns.get('token_credential')
if _class_name(settings_class) == _class_name(t_blob_content_settings):
client = get_storage_data_service_client(cmd.cli_ctx,
t_base_blob_service,
account,
key,
cs,
sas)
service=t_base_blob_service,
name=account,
key=key, connection_string=cs, sas_token=sas,
token_credential=token_credential)
container = ns.get('container_name')
blob = ns.get('blob_name')
lease_id = ns.get('lease_id')
Expand Down