From b726a57eeed7764b24ef78f56160643e41b5ff10 Mon Sep 17 00:00:00 2001 From: Rodrigo Mendoza <43052640+rosanch@users.noreply.github.com> Date: Thu, 7 Jan 2021 02:57:18 -0800 Subject: [PATCH 1/3] Quick Fix --- src/azure-cli/HISTORY.rst | 8 ++++---- src/azure-cli/azure/cli/command_modules/acr/_help.py | 4 ++-- src/azure-cli/azure/cli/command_modules/acr/_params.py | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/azure-cli/HISTORY.rst b/src/azure-cli/HISTORY.rst index 6b4bb2ed61b..42b7576e4e8 100644 --- a/src/azure-cli/HISTORY.rst +++ b/src/azure-cli/HISTORY.rst @@ -16,10 +16,10 @@ Release History **ACR** * Support zone redundancy (#15975) -* `az acr connected-registry`: New feature for on-prem Azure Container Registry (#16238) -* `az acr scope-map update`: --add and --remove are deprecated, they are renamed to --add-repo --remove-repo (#16238) -* `az acr scope-map create/update`: Add support to handle Gateway actions. (#16238) -* `az acr token create`: support added for gateway actions (#16238) +* `az acr connected-registry`: Added support for private preview of connected registry feature. (#16238) +* `az acr scope-map update`: Deprecated the --add and --remove argument names, replaced with --add-repo and --remove-repo. (#16238) +* `az acr scope-map create/update`: Introduced gateway permissions to support private preview of connected registry feature. (#16238) +* `az acr token create`: Introduced synchronization tokens to support private preview of connected registry feature. (#16238) **AKS** diff --git a/src/azure-cli/azure/cli/command_modules/acr/_help.py b/src/azure-cli/azure/cli/command_modules/acr/_help.py index c3e3a3e7878..2ea4444b5dd 100644 --- a/src/azure-cli/azure/cli/command_modules/acr/_help.py +++ b/src/azure-cli/azure/cli/command_modules/acr/_help.py @@ -1224,7 +1224,7 @@ - name: Create a connected registry in registry mode with access to repos app/hello-world and service/mycomponent. It'll create a sync token and scope-map with the right repo permissions. text: | az acr connected-registry create --registry mycloudregistry --name myconnectedregistry \\ - --repository "app/hello-world service/mycomponent" + --repositories "app/hello-world service/mycomponent" - name: Create a mirror connected registry with only read permissions and pass the sync token text: | az acr connected-registry create --registry mycloudregistry --name mymirroracr \\ @@ -1232,7 +1232,7 @@ - name: Create a mirror connected registry with client tokens, that syncs every day at midninght and sync window of 4 hours. text: | az acr connected-registry create -r mycloudregistry -n mymirroracr -p myconnectedregistry \\ - -t app/mycomponent -m mirror -s "0 12 * * *" -w PT4H \\ + --repositories app/mycomponent -m mirror -s "0 12 * * *" -w PT4H \\ --client-tokens myTokenName1 myTokenName2 """ diff --git a/src/azure-cli/azure/cli/command_modules/acr/_params.py b/src/azure-cli/azure/cli/command_modules/acr/_params.py index eaca19e9380..507493489a2 100644 --- a/src/azure-cli/azure/cli/command_modules/acr/_params.py +++ b/src/azure-cli/azure/cli/command_modules/acr/_params.py @@ -396,7 +396,7 @@ def load_arguments(self, _): # pylint: disable=too-many-statements c.argument('registry_name', options_list=['--registry', '-r'], help='The login server of the Cloud ACR registry. Must be the FQDN to support also Azure Stack.', required=True) c.argument('connected_registry_name', options_list=['--name', '-n'], help='Name for the connected registry. Name must be between 5 to 40 character long, start with a letter and contain only alphanumeric characters (including ‘_’ or ‘-’). Name must be unique under the Cloud ACR hierarchy.', required=True) c.argument('parent_name', options_list=['--parent', '-p'], help='The name of the parent connected registry.', required=False) - c.argument('repositories', options_list=['--repository', '-t'], nargs='+', help='Specifies the repositories that need to be sync to the connected registry. It can be in the format [REPO01] [REPO02]...', required=False) + c.argument('repositories', nargs='+', help='Specifies the repositories that need to be sync to the connected registry. It can be in the format [REPO01] [REPO02]...', required=False) c.argument('sync_token_name', options_list=['--sync-token'], help='Specifies the sync token used to synchronize the connected registry with its parent. It most have only repo permissions and at least the actions required for its mode. It can include access for multiple repositories.', required=False) c.argument('cleanup', help='It will aslo delete the sync token and the scope map resources.', required=False) c.argument('no_children', help='Used to remove all children from the list.', required=False, action='store_true') From 2a37ca5d5be5832c7bce002f0c3db7abced87b6a Mon Sep 17 00:00:00 2001 From: Rodrigo Mendoza <43052640+rosanch@users.noreply.github.com> Date: Tue, 12 Jan 2021 18:37:49 -0800 Subject: [PATCH 2/3] redirect -t option --- src/azure-cli/azure/cli/command_modules/acr/_params.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/azure-cli/azure/cli/command_modules/acr/_params.py b/src/azure-cli/azure/cli/command_modules/acr/_params.py index 507493489a2..8468d3c0a2c 100644 --- a/src/azure-cli/azure/cli/command_modules/acr/_params.py +++ b/src/azure-cli/azure/cli/command_modules/acr/_params.py @@ -396,7 +396,7 @@ def load_arguments(self, _): # pylint: disable=too-many-statements c.argument('registry_name', options_list=['--registry', '-r'], help='The login server of the Cloud ACR registry. Must be the FQDN to support also Azure Stack.', required=True) c.argument('connected_registry_name', options_list=['--name', '-n'], help='Name for the connected registry. Name must be between 5 to 40 character long, start with a letter and contain only alphanumeric characters (including ‘_’ or ‘-’). Name must be unique under the Cloud ACR hierarchy.', required=True) c.argument('parent_name', options_list=['--parent', '-p'], help='The name of the parent connected registry.', required=False) - c.argument('repositories', nargs='+', help='Specifies the repositories that need to be sync to the connected registry. It can be in the format [REPO01] [REPO02]...', required=False) + c.argument('repositories', options_list=['--repository', c.deprecate(target='-t', redirect='--repository', hide=True)], nargs='+', help='Specifies the repositories that need to be sync to the connected registry. It can be in the format [REPO01] [REPO02]...', required=False) c.argument('sync_token_name', options_list=['--sync-token'], help='Specifies the sync token used to synchronize the connected registry with its parent. It most have only repo permissions and at least the actions required for its mode. It can include access for multiple repositories.', required=False) c.argument('cleanup', help='It will aslo delete the sync token and the scope map resources.', required=False) c.argument('no_children', help='Used to remove all children from the list.', required=False, action='store_true') From 4bf523a3397c2a681f1bdfd98f84d656e69279f8 Mon Sep 17 00:00:00 2001 From: Rodrigo Mendoza <43052640+rosanch@users.noreply.github.com> Date: Thu, 14 Jan 2021 03:41:17 -0800 Subject: [PATCH 3/3] lynt --- src/azure-cli/HISTORY.rst | 2 +- src/azure-cli/azure/cli/command_modules/acr/_help.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/azure-cli/HISTORY.rst b/src/azure-cli/HISTORY.rst index 42b7576e4e8..785fc395134 100644 --- a/src/azure-cli/HISTORY.rst +++ b/src/azure-cli/HISTORY.rst @@ -16,7 +16,7 @@ Release History **ACR** * Support zone redundancy (#15975) -* `az acr connected-registry`: Added support for private preview of connected registry feature. (#16238) +* `az acr connected-registry`: add support for private preview of connected registry feature. (#16238) * `az acr scope-map update`: Deprecated the --add and --remove argument names, replaced with --add-repo and --remove-repo. (#16238) * `az acr scope-map create/update`: Introduced gateway permissions to support private preview of connected registry feature. (#16238) * `az acr token create`: Introduced synchronization tokens to support private preview of connected registry feature. (#16238) diff --git a/src/azure-cli/azure/cli/command_modules/acr/_help.py b/src/azure-cli/azure/cli/command_modules/acr/_help.py index 2ea4444b5dd..9ab111d52ce 100644 --- a/src/azure-cli/azure/cli/command_modules/acr/_help.py +++ b/src/azure-cli/azure/cli/command_modules/acr/_help.py @@ -1224,7 +1224,7 @@ - name: Create a connected registry in registry mode with access to repos app/hello-world and service/mycomponent. It'll create a sync token and scope-map with the right repo permissions. text: | az acr connected-registry create --registry mycloudregistry --name myconnectedregistry \\ - --repositories "app/hello-world service/mycomponent" + --repository "app/hello-world service/mycomponent" - name: Create a mirror connected registry with only read permissions and pass the sync token text: | az acr connected-registry create --registry mycloudregistry --name mymirroracr \\ @@ -1232,7 +1232,7 @@ - name: Create a mirror connected registry with client tokens, that syncs every day at midninght and sync window of 4 hours. text: | az acr connected-registry create -r mycloudregistry -n mymirroracr -p myconnectedregistry \\ - --repositories app/mycomponent -m mirror -s "0 12 * * *" -w PT4H \\ + --repository app/mycomponent -m mirror -s "0 12 * * *" -w PT4H \\ --client-tokens myTokenName1 myTokenName2 """