Skip to content

Commit

Permalink
acr: removing cli validation for premium sku and use service end erro…
Browse files Browse the repository at this point in the history
…r check (#10950)
  • Loading branch information
Adithya Upadhya authored and yugangw-msft committed Oct 23, 2019
1 parent 87749c6 commit 8adf973
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/azure-cli/azure/cli/command_modules/acr/scope_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# --------------------------------------------------------------------------------------------

from azure.cli.core.util import CLIError
from ._utils import get_resource_group_name_by_registry_name, validate_premium_registry, parse_actions_from_repositories
from ._utils import get_resource_group_name_by_registry_name, parse_actions_from_repositories


def acr_scope_map_create(cmd,
Expand All @@ -16,7 +16,6 @@ def acr_scope_map_create(cmd,
description=None):

resource_group_name = get_resource_group_name_by_registry_name(cmd.cli_ctx, registry_name, resource_group_name)
validate_premium_registry(cmd, registry_name, resource_group_name)

actions = parse_actions_from_repositories(repository_actions_list)

Expand Down
5 changes: 2 additions & 3 deletions src/azure-cli/azure/cli/command_modules/acr/token.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from msrestazure.azure_exceptions import CloudError
from azure.cli.core.commands import LongRunningOperation
from azure.cli.core.util import CLIError
from ._utils import get_resource_group_name_by_registry_name, validate_premium_registry, parse_actions_from_repositories
from ._utils import get_resource_group_name_by_registry_name, parse_actions_from_repositories

SCOPE_MAPS = 'scopeMaps'
TOKENS = 'tokens'
Expand All @@ -29,7 +29,6 @@ def acr_token_create(cmd,
raise CLIError("usage error: --repository | --scope-map-name")

resource_group_name = get_resource_group_name_by_registry_name(cmd.cli_ctx, registry_name, resource_group_name)
validate_premium_registry(cmd, registry_name, resource_group_name)

logger = get_logger(__name__)
if repository_actions_list:
Expand Down Expand Up @@ -74,7 +73,7 @@ def _create_default_scope_map(cmd, resource_group_name, registry_name, token_nam
.format(registry_name, scope_map_name))
except CloudError:
pass
logger.warning('Creating a scope map of "%s" for provided respository permissions.', scope_map_name)
logger.warning('Creating a scope map "%s" for provided respository permissions.', scope_map_name)
poller = scope_map_client.create(resource_group_name, registry_name, scope_map_name,
actions, "Token {}'s scope map".format(token_name))
scope_map = LongRunningOperation(cmd.cli_ctx)(poller)
Expand Down

0 comments on commit 8adf973

Please sign in to comment.