From 2969f3d2f246aa04732ab4651737ba6511a65be7 Mon Sep 17 00:00:00 2001 From: Rodrigo Mendoza <43052640+rosanch@users.noreply.github.com> Date: Sun, 11 Apr 2021 23:47:42 -0700 Subject: [PATCH] removing validation from onprem command --- .../cli/command_modules/acr/connected_registry.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/acr/connected_registry.py b/src/azure-cli/azure/cli/command_modules/acr/connected_registry.py index fdc9c0b9b20..b40f0111eb5 100644 --- a/src/azure-cli/azure/cli/command_modules/acr/connected_registry.py +++ b/src/azure-cli/azure/cli/command_modules/acr/connected_registry.py @@ -90,11 +90,6 @@ def acr_connected_registry_create(cmd, # pylint: disable=too-many-locals, too-m "when the connected registry parent '{}' mode is '{}'. ".format(parent_name, parent.mode) + "For more information on connected registries " + "please visit https://aka.ms/acr/connected-registry.") - msg = "Can't create the registry '{}'. The ancestor connected ".format(connected_registry_name) +\ - "registry activation status is not '{}'. ".format(ConnectedRegistryActivationStatus.ACTIVE.value) +\ - "Please install the parent connected registry and try again. For more information on connected " +\ - "registries, please visit https://aka.ms/acr/connected-registry." - _check_ancestors_are_active(family_tree, parent.id, msg) _update_ancestor_permissions(cmd, family_tree, resource_group_name, registry_name, parent.id, connected_registry_name, repositories, mode, False) @@ -471,14 +466,6 @@ def _get_install_info(cmd, # endregion -def _check_ancestors_are_active(family_tree, parent_id, msg): - while parent_id and not parent_id.isspace(): - ancestor = family_tree[parent_id]["connectedRegistry"] - if ancestor.activation.status != ConnectedRegistryActivationStatus.ACTIVE.value: - raise CLIError(msg) - parent_id = ancestor.parent.id - - def _update_ancestor_permissions(cmd, family_tree, resource_group_name,