Skip to content

Commit

Permalink
Merge remote-tracking branch 'azure/release_2.26.1' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
jiasli committed Jul 20, 2021
2 parents ea8caff + c7c1558 commit 1f4a0ea
Show file tree
Hide file tree
Showing 18 changed files with 351 additions and 330 deletions.
4 changes: 4 additions & 0 deletions src/azure-cli-core/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Release History
===============

2.26.1
++++++
* No changes

2.26.0
++++++
* Minor fixes
Expand Down
2 changes: 1 addition & 1 deletion src/azure-cli-core/azure/cli/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# --------------------------------------------------------------------------------------------
# pylint: disable=line-too-long

__version__ = "2.26.0"
__version__ = "2.26.1"

import os
import sys
Expand Down
2 changes: 1 addition & 1 deletion src/azure-cli-core/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from codecs import open
from setuptools import setup, find_packages

VERSION = "2.26.0"
VERSION = "2.26.1"

# If we have source, validate that our version numbers match
# This should prevent uploading releases with mismatched versions.
Expand Down
17 changes: 17 additions & 0 deletions src/azure-cli/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,23 @@
Release History
===============

2.26.1
++++++

**ACR**

* Hotfix: `az acr build\connected-registry\pack\run\scope-map`: Fix the compatibility bug caused by SDK upgrade (#18853)

**AKS**

* Hotfix: `az aks create`: Fix the issue that `assign-kubelet-identity` option can't work (#18795)

**Storage**

* Hotfix: Fix issue caused by jwt upgrade. (#18811)
* Hotfix: `az storage fs directory download`: Fix the issue with `--sas-token` to generate valid sas url (#18811)
* Hotfix: `az storage blob copy start`: Fix the issue in copy from different account (#18730)

2.26.0
++++++

Expand Down
2 changes: 1 addition & 1 deletion src/azure-cli/azure/cli/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from knack.log import get_logger

__author__ = "Microsoft Corporation <[email protected]>"
__version__ = "2.26.0"
__version__ = "2.26.1"


# A workaround for https://bugs.python.org/issue32502 (https://github.com/Azure/azure-cli/issues/5184)
Expand Down
17 changes: 10 additions & 7 deletions src/azure-cli/azure/cli/command_modules/acr/connected_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,7 @@ def acr_connected_registry_create(cmd, # pylint: disable=too-many-locals, too-m
)

try:
return client.begin_create(subscription_id=subscription_id,
resource_group_name=resource_group_name,
return client.begin_create(resource_group_name=resource_group_name,
registry_name=registry_name,
connected_registry_name=connected_registry_name,
connected_registry_create_parameters=connected_registry_create_parameters)
Expand Down Expand Up @@ -264,12 +263,10 @@ def acr_connected_registry_deactivate(cmd,
resource_group_name=None):
_, resource_group_name = validate_managed_registry(
cmd, registry_name, resource_group_name)
subscription_id = get_subscription_id(cmd.cli_ctx)

user_confirmation("Are you sure you want to deactivate the connected registry '{}' in '{}'?".format(
connected_registry_name, registry_name), yes)
return client.begin_deactivate(subscription_id=subscription_id,
resource_group_name=resource_group_name,
return client.begin_deactivate(resource_group_name=resource_group_name,
registry_name=registry_name,
connected_registry_name=connected_registry_name)

Expand Down Expand Up @@ -520,12 +517,18 @@ def _update_repo_permissions(cmd,
return None
current_actions = list(final_actions_set)
logger.warning(msg)

ScopeMapUpdateParameters = cmd.get_models('ScopeMapUpdateParameters')
scope_map_update_parameters = ScopeMapUpdateParameters(
description=description,
actions=current_actions
)

return scope_map_client.begin_update(
resource_group_name,
registry_name,
sync_scope_map_name,
description,
current_actions
scope_map_update_parameters
)


Expand Down
22 changes: 14 additions & 8 deletions src/azure-cli/azure/cli/command_modules/acr/scope_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,12 @@ def acr_scope_map_create(cmd,

actions = parse_scope_map_actions(repository_actions_list, gateway_actions_list)

scope_map = {
'actions': actions,
'description': description
}
ScopeMap = cmd.get_models('ScopeMap')

scope_map = ScopeMap(
actions=actions,
description=description
)

return client.begin_create(
resource_group_name,
Expand All @@ -68,7 +70,7 @@ def acr_scope_map_delete(cmd,
return None

resource_group_name = get_resource_group_name_by_registry_name(cmd.cli_ctx, registry_name, resource_group_name)
return client.delete(resource_group_name, registry_name, scope_map_name)
return client.begin_delete(resource_group_name, registry_name, scope_map_name)


def acr_scope_map_update(cmd,
Expand Down Expand Up @@ -106,12 +108,16 @@ def acr_scope_map_update(cmd,
final_actions_set = set(current_scope_map.actions).union(add_actions_set).difference(remove_actions_set)
current_actions = list(final_actions_set)

return client.update(
ScopeMapUpdateParameters = cmd.get_models('ScopeMapUpdateParameters')
scope_map_update_parameters = ScopeMapUpdateParameters(
description=description,
actions=current_actions
)
return client.begin_update(
resource_group_name,
registry_name,
scope_map_name,
description,
current_actions
scope_map_update_parameters
)


Expand Down
13 changes: 8 additions & 5 deletions src/azure-cli/azure/cli/command_modules/acs/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -2009,9 +2009,10 @@ def aks_create(cmd, client, resource_group_name, name, ssh_key_value, # pylint:
ManagedClusterIdentity = cmd.get_models('ManagedClusterIdentity',
resource_type=ResourceType.MGMT_CONTAINERSERVICE,
operation_group='managed_clusters')
ManagedClusterPropertiesIdentityProfileValue = cmd.get_models('ManagedClusterPropertiesIdentityProfileValue',
resource_type=ResourceType.MGMT_CONTAINERSERVICE,
operation_group='managed_clusters')
ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties = cmd.get_models(
'ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties',
resource_type=ResourceType.MGMT_CONTAINERSERVICE,
operation_group='managed_clusters')
ManagedCluster = cmd.get_models('ManagedCluster',
resource_type=ResourceType.MGMT_CONTAINERSERVICE,
operation_group='managed_clusters')
Expand Down Expand Up @@ -2318,7 +2319,8 @@ def aks_create(cmd, client, resource_group_name, name, ssh_key_value, # pylint:
raise ArgumentUsageError('--assign-kubelet-identity can only be specified when --assign-identity is specified')
kubelet_identity = _get_user_assigned_identity(cmd.cli_ctx, assign_kubelet_identity)
identity_profile = {
'kubeletidentity': ManagedClusterPropertiesIdentityProfileValue(
# pylint: disable=line-too-long
'kubeletidentity': ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties(
resource_id=assign_kubelet_identity,
client_id=kubelet_identity.client_id,
object_id=kubelet_identity.principal_id
Expand All @@ -2328,7 +2330,8 @@ def aks_create(cmd, client, resource_group_name, name, ssh_key_value, # pylint:
# ensure the cluster identity has "Managed Identity Operator" role at the scope of kubelet identity
_ensure_cluster_identity_permission_on_kubelet_identity(
cmd.cli_ctx,
cluster_identity_object_id)
cluster_identity_object_id,
assign_kubelet_identity)

mc = ManagedCluster(
location=location,
Expand Down
Loading

0 comments on commit 1f4a0ea

Please sign in to comment.