Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TrackV2 none Fixxed issues #18850

Closed
wants to merge 1 commit into from
Closed
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
27 changes: 14 additions & 13 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,11 +129,10 @@ def acr_connected_registry_create(cmd, # pylint: disable=too-many-locals, too-m
)

try:
return client.create(subscription_id=subscription_id,
resource_group_name=resource_group_name,
registry_name=registry_name,
connected_registry_name=connected_registry_name,
connected_registry_create_parameters=connected_registry_create_parameters)
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)
except ValidationError as e:
raise CLIError(e)

Expand Down Expand Up @@ -264,14 +263,12 @@ 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.deactivate(subscription_id=subscription_id,
resource_group_name=resource_group_name,
registry_name=registry_name,
connected_registry_name=connected_registry_name)
return client.begin_deactivate(resource_group_name=resource_group_name,
registry_name=registry_name,
connected_registry_name=connected_registry_name)


def acr_connected_registry_list(cmd,
Expand Down Expand Up @@ -520,12 +517,16 @@ def _update_repo_permissions(cmd,
return None
current_actions = list(final_actions_set)
logger.warning(msg)
return scope_map_client.update(
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