diff --git a/src/command_modules/azure-cli-acr/README.rst b/src/command_modules/azure-cli-acr/README.rst index 87d72ec52cf..4eccb4c80bb 100644 --- a/src/command_modules/azure-cli-acr/README.rst +++ b/src/command_modules/azure-cli-acr/README.rst @@ -9,46 +9,46 @@ Commands to manage Azure container registries az acr: Commands to manage Azure container registries. Subgroups: - credential: Manage admin user credential for Azure container registries. + credential: Manage administrator login credentials for Azure container registries. repository: Manage repositories for Azure container registries. Commands: - check-name: Check whether the container registry name is available. - create : Create a container registry. - delete : Delete a container registry. - list : List container registries. - show : Get a container registry. - update : Update a container registry. + check-name: Checks whether the container registry name is available for use. + create : Creates or updates a container registry with the specified parameters. + delete : Deletes a container registry. + list : Lists all the available container registries under the current subscription. + show : Gets the properties of the specified container registry. + update : Updates a container registry with the specified parameters. Create a container registry ------------- :: Command - az acr create: Create a container registry. + az acr create: Creates or updates a container registry with the specified parameters. Arguments --location -l [Required]: Location. - --name -n [Required]: Name of container registry. + --name -n [Required]: The name of the container registry. --resource-group -g [Required]: Name of resource group. - --admin-enabled : Enable admin user. - --storage-account-name -s : Name of an existing storage account. + --admin-enabled : Enable admin user. Allowed values: false, true. + --storage-account-name : The name of an existing storage account. Examples Create a container registry with a new storage account az acr create -n myRegistry -g myResourceGroup -l southcentralus Create a container registry with an existing storage account - az acr create -n myRegistry -g myResourceGroup -l southcentralus -s myStorageAccount + az acr create -n myRegistry -g myResourceGroup -l southcentralus --storage-account-name myStorageAccount Delete a container registry ------------- :: Command - az acr delete: Delete a container registry. + az acr delete: Deletes a container registry. Arguments - --name -n [Required]: Name of container registry. + --name -n [Required]: The name of the container registry. --resource-group -g : Name of resource group. List container registries @@ -56,7 +56,7 @@ List container registries :: Command - az acr list: List container registries. + az acr list: Lists all the available container registries under the current subscription. Arguments --resource-group -g: Name of resource group. @@ -72,10 +72,10 @@ Get a container registry :: Command - az acr show: Get a container registry. + az acr show: Gets the properties of the specified container registry. Arguments - --name -n [Required]: Name of container registry. + --name -n [Required]: The name of the container registry. --resource-group -g : Name of resource group. Update a container registry @@ -83,25 +83,26 @@ Update a container registry :: Command - az acr update: Update a container registry. - + az acr update: Updates a container registry with the specified parameters. + Arguments - --name -n [Required]: Name of container registry. - --resource-group -g : Name of resource group. - --admin-enabled : Whether the admin user account is enabled. Allowed values: false, true. - --storage-account-name : Name of an existing storage account. - --tags : Space separated tags in 'key[=value]' format. Use "" to clear - existing tags. - + --name -n [Required]: The name of the container registry. + --admin-enabled : The value that indicates whether the admin user is enabled. Allowed + values: false, true. + --resource-group -g : Name of resource group. + --storage-account-name: The name of an existing storage account. + --tags : Space separated tags in 'key[=value]' format. Use "" to clear existing + tags. + Generic Update Arguments - --add : Add an object to a list of objects by specifying a path and key value - pairs. Example: --add property.listProperty . - --remove : Remove a property or an element from a list. Example: --remove - property.list OR --remove propertyToRemove. - --set : Update an object by specifying a property path and value to set. - Example: --set property1.property2=. - + --add : Add an object to a list of objects by specifying a path and key value + pairs. Example: --add property.listProperty . + --remove : Remove a property or an element from a list. Example: --remove + property.list OR --remove propertyToRemove. + --set : Update an object by specifying a property path and value to set. + Example: --set property1.property2=. + Examples Update tags for a container registry az acr update -n myRegistry --tags key1=value1 key2=value2 @@ -115,10 +116,10 @@ Get login credentials for a container registry :: Command - az acr credential show: Get login credentials for a container registry. + az acr credential show: Gets the administrator login credentials for the specified container registry. Arguments - --name -n [Required]: Name of container registry. + --name -n [Required]: The name of the container registry. --resource-group -g : Name of resource group. Regenerate login credentials for a container registry @@ -126,10 +127,10 @@ Regenerate login credentials for a container registry :: Command - az acr credential renew: Regenerate login credentials for a container registry. + az acr credential renew: Regenerates the administrator login credentials for the specified container registry. Arguments - --name -n [Required]: Name of container registry. + --name -n [Required]: The name of the container registry. --resource-group -g : Name of resource group. List repositories in a given container registry @@ -137,12 +138,12 @@ List repositories in a given container registry :: Command - az acr repository list: List repositories in a given container registry. + az acr repository list: Lists repositories in the specified container registry. Arguments - --name -n [Required]: Name of container registry. - --password -p : Password used to log into a container registry. - --username -u : Username used to log into a container registry. + --name -n [Required]: The name of the container registry. + --password -p : The password used to log into a container registry. + --username -u : The username used to log into a container registry. Examples List repositories in a given container registry if admin user is enabled @@ -155,17 +156,17 @@ Show tags of a given repository in a given container registry :: Command - az acr repository show-tags: Show tags of a given repository in a given container registry. + az acr repository show-tags: Shows tags of a given repository in the specified container + registry. Arguments - --name -n [Required]: Name of container registry. + --name -n [Required]: The name of the container registry. --repository [Required]: The repository to obtain tags from. - --password -p : Password used to log into a container registry. - --username -u : Username used to log into a container registry. + --password -p : The password used to log into a container registry. + --username -u : The username used to log into a container registry. Examples Show tags of a given repository in a given container registry if admin user is enabled az acr repository show-tags -n myRegistry --repository myRepository Show tags of a given repository in a given container registry with credentials - az acr repository show-tags -n myRegistry --repository myRepository -u myUsername -p - myPassword + az acr repository show-tags -n myRegistry --repository myRepository -u myUsername -p myPassword diff --git a/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_help.py b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_help.py index b841878698b..5d88acd3df0 100644 --- a/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_help.py +++ b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_help.py @@ -14,7 +14,7 @@ helps['acr credential'] = """ type: group - short-summary: Manage admin user credential for Azure container registries. + short-summary: Manage administrator login credentials for Azure container registries. """ helps['acr repository'] = """ @@ -41,12 +41,12 @@ az acr create -n myRegistry -g myResourceGroup -l southcentralus - name: Create a container registry with an existing storage account text: - az acr create -n myRegistry -g myResourceGroup -l southcentralus -s myStorageAccount + az acr create -n myRegistry -g myResourceGroup -l southcentralus --storage-account-name myStorageAccount """ helps['acr update'] = """ type: command - short-summary: Update a container registry. + short-summary: Updates a container registry with the specified parameters. examples: - name: Update tags for a container registry text: diff --git a/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_params.py b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_params.py index 6f518576a3c..0a033674c4c 100644 --- a/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_params.py +++ b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_params.py @@ -21,26 +21,27 @@ register_cli_argument('acr', 'registry_name', options_list=('--name', '-n'), - help='Name of container registry', + help='The name of the container registry', completer=get_resource_name_completion_list(ACR_RESOURCE_TYPE)) register_cli_argument('acr', 'storage_account_name', - help='Name of an existing storage account', + help='The name of an existing storage account', completer=get_resource_name_completion_list(STORAGE_RESOURCE_TYPE)) register_cli_argument('acr', 'resource_group_name', resource_group_name_type) register_cli_argument('acr', 'location', location_type) register_cli_argument('acr', 'tags', tags_type) register_cli_argument('acr', 'admin_enabled', - help='Whether the admin user account is enabled.', + help='The value that indicates whether the admin user is enabled', choices=['true', 'false']) register_cli_argument('acr', 'username', options_list=('--username', '-u'), - help='Username used to log into a container registry') + help='The username used to log into a container registry') register_cli_argument('acr', 'password', options_list=('--password', '-p'), - help='Password used to log into a container registry') + help='The password used to log into a container registry') register_cli_argument('acr create', 'registry_name', completer=None) register_cli_argument('acr create', 'resource_group_name', validator=validate_resource_group_name) +register_cli_argument('acr check-name', 'registry_name', completer=None) diff --git a/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/credential.py b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/credential.py index 4ba7a7231cb..2cefbc2f0ba 100644 --- a/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/credential.py +++ b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/credential.py @@ -10,7 +10,7 @@ logger = _logging.get_az_logger(__name__) def acr_credential_show(registry_name, resource_group_name=None): - '''Get login credentials for a container registry. + '''Gets the administrator login credentials for the specified container registry. :param str registry_name: The name of container registry :param str resource_group_name: The name of resource group ''' @@ -22,7 +22,7 @@ def acr_credential_show(registry_name, resource_group_name=None): return client.get_credentials(resource_group_name, registry_name) def acr_credential_renew(registry_name, resource_group_name=None): - '''Regenerate login credentials for a container registry. + '''Regenerates the administrator login credentials for the specified container registry. :param str registry_name: The name of container registry :param str resource_group_name: The name of resource group ''' diff --git a/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/custom.py b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/custom.py index 5e65b77db0e..b4d6f687dc7 100644 --- a/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/custom.py +++ b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/custom.py @@ -5,9 +5,7 @@ import uuid -from azure.cli.core.commands import ( - LongRunningOperation -) +from azure.cli.core.commands import LongRunningOperation from azure.mgmt.containerregistry.models import ( Registry, @@ -26,7 +24,7 @@ logger = _logging.get_az_logger(__name__) def acr_check_name(registry_name): - '''Check whether the container registry name is available. + '''Checks whether the container registry name is available for use. :param str registry_name: The name of container registry ''' client = get_acr_service_client().registries @@ -34,7 +32,7 @@ def acr_check_name(registry_name): return client.check_name_availability(registry_name) def acr_list(resource_group_name=None): - '''List container registries. + '''Lists all the available container registries under the current subscription. :param str resource_group_name: The name of resource group ''' client = get_acr_service_client().registries @@ -49,7 +47,7 @@ def acr_create(registry_name, #pylint: disable=too-many-arguments location, storage_account_name=None, admin_enabled=None): - '''Create a container registry. + '''Creates or updates a container registry with the specified parameters. :param str registry_name: The name of container registry :param str resource_group_name: The name of resource group :param str location: The name of location @@ -95,7 +93,7 @@ def acr_create(registry_name, #pylint: disable=too-many-arguments return registry def acr_delete(registry_name, resource_group_name=None): - '''Delete a container registry. + '''Deletes a container registry. :param str registry_name: The name of container registry :param str resource_group_name: The name of resource group ''' @@ -107,7 +105,7 @@ def acr_delete(registry_name, resource_group_name=None): return client.delete(resource_group_name, registry_name) def acr_show(registry_name, resource_group_name=None): - '''Get a container registry. + '''Gets the properties of the specified container registry. :param str registry_name: The name of container registry :param str resource_group_name: The name of resource group ''' diff --git a/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/repository.py b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/repository.py index e46979089c5..af5e4940bb9 100644 --- a/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/repository.py +++ b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/repository.py @@ -69,7 +69,7 @@ def _validate_user_credentials(registry_name, path, resultIndex, username=None, return _obtain_data_from_registry(login_server, path, resultIndex, username, password) def acr_repository_list(registry_name, username=None, password=None): - '''List repositories in a given container registry. + '''Lists repositories in the specified container registry. :param str registry_name: The name of container registry :param str username: The username used to log into the container registry :param str password: The password used to log into the container registry @@ -78,7 +78,7 @@ def acr_repository_list(registry_name, username=None, password=None): return _validate_user_credentials(registry_name, path, 'repositories', username, password) def acr_repository_show_tags(registry_name, repository, username=None, password=None): - '''Show tags of a given repository in a given container registry. + '''Shows tags of a given repository in the specified container registry. :param str registry_name: The name of container registry :param str repository: The repository to obtain tags from :param str username: The username used to log into the container registry