diff --git a/src/command_modules/azure-cli-acr/README.rst b/src/command_modules/azure-cli-acr/README.rst new file mode 100644 index 00000000000..eb38f1e1ae9 --- /dev/null +++ b/src/command_modules/azure-cli-acr/README.rst @@ -0,0 +1,205 @@ +Microsoft Azure CLI 'acr' Command Module +================================== + +This package has [not] been tested [much] with Python 2.7, 3.4 and 3.5. + +Commands to manage Azure container registries +------------- +:: + + Group + az acr: Commands to manage Azure container registries. + + Commands: + catalog: The catalog of repositories in the specified registry. + create : Create a container registry. + delete : Delete a container registry. + list : List container registries. + show : Get a container registry. + tags : The list of tags for a given repository in the specified registry. + update : Update a container registry. + +List container registries +------------- +:: + + Command + az acr list: List container registries. + + Arguments + --resource-group -g: Name of resource group. + + Global Arguments + --debug : Increase logging verbosity to show all debug logs. + --help -h : Show this help message and exit. + --output -o : Output format. Allowed values: json, jsonc, list, table, tsv. Default: + json. + --query : JMESPath query string. See http://jmespath.org/ for more information and + examples. + --verbose : Increase logging verbosity. Use --debug for full debug logs. + + Examples + List container registries and show result in a table + az acr list -o table + List container registries in a resource group and show result in a table + az acr list -g -o table + +Create a container registry +------------- +:: + + Command + az acr create: Create a container registry. + + Arguments + --location -l [Required]: Location. + --name -n [Required]: The primary resource name. + --resource-group -g [Required]: Name of resource group. + --storage-account-key -k : Key of storage account. + --storage-account-name -s : Name of storage account. + + Global Arguments + --debug : Increase logging verbosity to show all debug logs. + --help -h : Show this help message and exit. + --output -o : Output format. Allowed values: json, jsonc, list, table, tsv. + Default: json. + --query : JMESPath query string. See http://jmespath.org/ for more + information and examples. + --verbose : Increase logging verbosity. Use --debug for full debug logs. + + Examples + Create a container registry with managed storage account + az acr create -n -g -l + Create a container registry with new/existing storage account in the current subscription + az acr create -n -g -l -s + Create a container registry with your own storage account + az acr create -n -g -l -s + -k + +Delete a container registry +------------- +:: + + Command + az acr delete: Delete a container registry. + + Arguments + --name -n [Required]: The primary resource name. + + Global Arguments + --debug : Increase logging verbosity to show all debug logs. + --help -h : Show this help message and exit. + --output -o : Output format. Allowed values: json, jsonc, list, table, tsv. Default: + json. + --query : JMESPath query string. See http://jmespath.org/ for more information and + examples. + --verbose : Increase logging verbosity. Use --debug for full debug logs. + + Examples + Delete a container registry + az acr delete -n + +Get a container registry +------------- +:: + + Command + az acr show: Get a container registry. + + Arguments + --name -n [Required]: The primary resource name. + + Global Arguments + --debug : Increase logging verbosity to show all debug logs. + --help -h : Show this help message and exit. + --output -o : Output format. Allowed values: json, jsonc, list, table, tsv. Default: + json. + --query : JMESPath query string. See http://jmespath.org/ for more information and + examples. + --verbose : Increase logging verbosity. Use --debug for full debug logs. + + Examples + Get a container registry and show result in a table + az acr show -n -o table + +Update a container registry +------------- +:: + + Command + az acr update: Update a container registry. + + Arguments + --name -n [Required]: The primary resource name. + --tags : Multiple semicolon separated tags in 'key[=value]' format. Use "" to + clear existing tags. + + Global Arguments + --debug : Increase logging verbosity to show all debug logs. + --help -h : Show this help message and exit. + --output -o : Output format. Allowed values: json, jsonc, list, table, tsv. Default: + json. + --query : JMESPath query string. See http://jmespath.org/ for more information and + examples. + --verbose : Increase logging verbosity. Use --debug for full debug logs. + + Examples + Update tags of a container registry and show result in a table + az acr update -n --tags key1=value1;key2=value2 -o table + +The catalog of repositories in the specified registry +------------- +:: + + Command + az acr catalog: The catalog of repositories in the specified registry. + + Arguments + --name -n [Required]: The primary resource name. + --password : The password used to log into the container registry. + --username : The username used to log into the container registry. + + Global Arguments + --debug : Increase logging verbosity to show all debug logs. + --help -h : Show this help message and exit. + --output -o : Output format. Allowed values: json, jsonc, list, table, tsv. Default: + json. + --query : JMESPath query string. See http://jmespath.org/ for more information and + examples. + --verbose : Increase logging verbosity. Use --debug for full debug logs. + + Examples + The catalog of repositories in a registry under the current subscription + az acr catalog -n + The catalog of repositories in any registry with credentials + az acr catalog -n --username --password + +The list of tags for a given repository in the specified registry +------------- +:: + + Command + az acr tags: The list of tags for a given repository in the specified registry. + + Arguments + --name -n [Required]: The primary resource name. + --repository [Required]: The repository to obtain tags from. + --password : The password used to log into the container registry. + --username : The username used to log into the container registry. + + Global Arguments + --debug : Increase logging verbosity to show all debug logs. + --help -h : Show this help message and exit. + --output -o : Output format. Allowed values: json, jsonc, list, table, tsv. + Default: json. + --query : JMESPath query string. See http://jmespath.org/ for more information + and examples. + --verbose : Increase logging verbosity. Use --debug for full debug logs. + + Examples + The list of tags for a given repository in a registry under the current subscription + az acr tags -n --repository + The list of tags for a given repository in any registry with credentials + az acr tags -n --repository --username --password + + diff --git a/src/command_modules/azure-cli-registry/azure/__init__.py b/src/command_modules/azure-cli-acr/azure/__init__.py similarity index 100% rename from src/command_modules/azure-cli-registry/azure/__init__.py rename to src/command_modules/azure-cli-acr/azure/__init__.py diff --git a/src/command_modules/azure-cli-registry/azure/cli/__init__.py b/src/command_modules/azure-cli-acr/azure/cli/__init__.py similarity index 100% rename from src/command_modules/azure-cli-registry/azure/cli/__init__.py rename to src/command_modules/azure-cli-acr/azure/cli/__init__.py diff --git a/src/command_modules/azure-cli-registry/azure/cli/command_modules/__init__.py b/src/command_modules/azure-cli-acr/azure/cli/command_modules/__init__.py similarity index 100% rename from src/command_modules/azure-cli-registry/azure/cli/command_modules/__init__.py rename to src/command_modules/azure-cli-acr/azure/cli/command_modules/__init__.py diff --git a/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/__init__.py b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/__init__.py similarity index 65% rename from src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/__init__.py rename to src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/__init__.py index 8c9de016d40..8afb4b4f2aa 100644 --- a/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/__init__.py +++ b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/__init__.py @@ -5,7 +5,7 @@ # pylint: disable=unused-import -import azure.cli.command_modules.registry._help -import azure.cli.command_modules.registry._params -import azure.cli.command_modules.registry.custom -import azure.cli.command_modules.registry.repository +import azure.cli.command_modules.acr._help +import azure.cli.command_modules.acr._params +import azure.cli.command_modules.acr.custom +import azure.cli.command_modules.acr.repository diff --git a/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/_arm_utils.py b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_arm_utils.py similarity index 53% rename from src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/_arm_utils.py rename to src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_arm_utils.py index a42adc70a05..30773024550 100644 --- a/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/_arm_utils.py +++ b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_arm_utils.py @@ -3,16 +3,13 @@ # Licensed under the MIT License. See License.txt in the project root for license information. #--------------------------------------------------------------------------------------------- -from azure.cli.command_modules.registry.mgmt_cr.models import RegistryParameters +from azure.cli.command_modules.acr.containerregistry.models import RegistryParameters -from ._factory import ( - get_arm_service_client, - get_storage_end_point_url -) +from ._factory import get_arm_service_client -from azure.cli.command_modules.registry.mgmt_cr import VERSION +from azure.cli.command_modules.acr.containerregistry import VERSION -resource_type = 'Microsoft.Krater/registries' +resource_type = 'Microsoft.ContainerRegistry/registries' def arm_get_registries_in_subscription(): '''Returns the list of container registries in the current subscription. @@ -47,52 +44,29 @@ def arm_get_registry_by_name(registry_name): else: raise ValueError('More than one container registries are found with name: ' + registry_name) -def arm_deploy_template_dedicated(resource_group, registry_name, location, - storage_account_name, deployment_name): +def arm_deploy_template(resource_group, registry_name, location, storage_account_name, deployment_name, mode='incremental'): '''Deploys ARM template to create a container registry using the storage account in the current subscription. :param str resource_group: The name of resource group :param str registry_name: The name of container registry :param str location: The name of location :param str storage_account_name: The name of storage account :param str deployment_name: The name of deployment - ''' - parameters = _parameters_dedicated(registry_name, location, storage_account_name) - return _arm_deploy_template(resource_group, deployment_name, 'template.dedicated.json', parameters) - -def arm_deploy_template_byos(resource_group, registry_name, location, - storage_account_name, storage_account_key, deployment_name): - '''Deploys ARM template to create a container registry using the user's own storage account. - :param str resource_group: The name of resource group - :param str registry_name: The name of container registry - :param str location: The name of location - :param str storage_account_name: The name of storage account - :param str storage_account_key: The key of storage account - :param str deployment_name: The name of deployment - ''' - parameters = _parameters_byos(registry_name, location, storage_account_name, storage_account_key) - return _arm_deploy_template(resource_group, deployment_name, 'template.byos.json', parameters) - -def _arm_deploy_template(resource_group, deployment_name, template_path, parameters, mode='incremental'): - '''Deploys ARM template to create a container registry. - :param str resource_group: The name of resource group - :param str deployment_name: The name of deployment - :param str template_path: The template file path - :param dict parameters: The parameters for this deployment :param str mode: The mode of deployment ''' from azure.mgmt.resource.resources.models import DeploymentProperties - from azure.cli._util import get_file_json + from azure.cli.core._util import get_file_json import os - file_path = os.path.join(os.path.dirname(__file__), template_path) + file_path = os.path.join(os.path.dirname(__file__), 'template.json') template = get_file_json(file_path) + parameters = _parameters(registry_name, location, storage_account_name) properties = DeploymentProperties(template=template, parameters=parameters, mode=mode) client = get_arm_service_client() return client.deployments.create_or_update(resource_group, deployment_name, properties) -def _parameters_dedicated(registry_name, location, storage_account_name): +def _parameters(registry_name, location, storage_account_name): '''Returns a dict of deployment parameters :param str registry_name: The name of container registry :param str location: The name of location @@ -107,20 +81,3 @@ def _parameters_dedicated(registry_name, location, storage_account_name): 'storageAccountApiVersion': {'value': '2015-05-01-preview'} } return parameters - -def _parameters_byos(registry_name, location, storage_account_name, storage_account_key): - '''Returns a dict of deployment parameters - :param str registry_name: The name of container registry - :param str location: The name of location - :param str storage_account_name: The name of storage account - :param str storage_account_key: The key of storage account - ''' - parameters = { - 'registryName': {'value': registry_name}, - 'registryLocation': {'value': location}, - 'registryApiVersion': {'value': VERSION}, - 'storageAccountName': {'value': storage_account_name}, - 'storageAccountKey': {'value': storage_account_key}, - 'storageEndPointUrl': {'value': get_storage_end_point_url(storage_account_name)} - } - return parameters diff --git a/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/_factory.py b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_factory.py similarity index 62% rename from src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/_factory.py rename to src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_factory.py index 71529095c5a..f85b5b008c4 100644 --- a/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/_factory.py +++ b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_factory.py @@ -3,24 +3,20 @@ # Licensed under the MIT License. See License.txt in the project root for license information. #--------------------------------------------------------------------------------------------- -from azure.cli._profile import Profile -from azure.cli.commands.client_factory import ( +from azure.cli.core._profile import Profile +from azure.cli.core.commands.client_factory import ( configure_common_settings, get_mgmt_service_client ) -from azure.cli._azure_env import ( - get_env, - ENDPOINT_URLS -) - -from azure.cli.command_modules.registry.mgmt_cr import ( +from azure.cli.command_modules.acr.containerregistry import ( ContainerRegistry, ContainerRegistryConfiguration, VERSION ) from azure.mgmt.resource.resources import ResourceManagementClient +from azure.storage._constants import SERVICE_HOST_BASE def get_arm_service_client(): '''Returns the client for managing ARM resources. @@ -31,17 +27,16 @@ def get_registry_service_client(): '''Returns the client for managing container registries. ''' profile = Profile() - cred, subscription_id, _ = profile.get_login_credentials() + credentials, subscription_id, _ = profile.get_login_credentials() - config = ContainerRegistryConfiguration(subscription_id, VERSION, cred, base_url=get_env()[ENDPOINT_URLS.RESOURCE_MANAGER]) + config = ContainerRegistryConfiguration(subscription_id, VERSION, credentials) client = ContainerRegistry(config) configure_common_settings(client) return client.registries -def get_storage_end_point_url(storage_account_name): - '''Returns the end point url for the storage account name - :param str storage_account_name: The name of storage account +def get_storage_end_point_suffix(): + '''Returns storage account end point suffix ''' - return 'https://' + storage_account_name + '.' + get_env()[ENDPOINT_URLS.STORAGE_END_POINT_SUFFIX] + return SERVICE_HOST_BASE diff --git a/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/_format.py b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_format.py similarity index 98% rename from src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/_format.py rename to src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_format.py index 93fd4a000a8..09f0e5ad0b8 100644 --- a/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/_format.py +++ b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_format.py @@ -56,7 +56,7 @@ def _format(item): ''' if isinstance(item, dict) and 'id' in item and '/providers/Microsoft.Resources/deployments/' in item['id']: return _format_deployment(item) - elif isinstance(item, dict) and 'id' in item and '/providers/Microsoft.Krater/registries/' in item['id']: + elif isinstance(item, dict) and 'id' in item and '/providers/Microsoft.ContainerRegistry/registries/' in item['id']: return _format_registry(item) else: raise ValueError('Unknown item: ' + str(item)) diff --git a/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/_help.py b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_help.py similarity index 63% rename from src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/_help.py rename to src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_help.py index 6663b82635d..8a87d7e5693 100644 --- a/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/_help.py +++ b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_help.py @@ -3,89 +3,89 @@ # Licensed under the MIT License. See License.txt in the project root for license information. #--------------------------------------------------------------------------------------------- -from azure.cli.help_files import helps +from azure.cli.core.help_files import helps #pylint: disable=line-too-long -helps['registry'] = """ +helps['acr'] = """ type: group short-summary: Commands to manage Azure container registries. """ -helps['registry list'] = """ +helps['acr list'] = """ type: command short-summary: List container registries. examples: - name: List container registries and show result in a table text: - az registry list -o table + az acr list -o table - name: List container registries in a resource group and show result in a table text: - az registry list -g -o table + az acr list -g -o table """ -helps['registry create'] = """ +helps['acr create'] = """ type: command short-summary: Create a container registry. examples: - name: Create a container registry with managed storage account text: - az registry create -n -g -l - - name: Create a container registry with dedicated storage account (new or existing) + az acr create -n -g -l + - name: Create a container registry with new/existing storage account in the current subscription text: - az registry create -n -g -l --storage-account-name - - name: Create a container registry with your own storage account + az acr create -n -g -l -s + - name: Create a container registry with your own storage account in any subscription text: - az registry create -n -g -l --storage-account-name --storage-account-key + az acr create -n -g -l -s -k """ -helps['registry delete'] = """ +helps['acr delete'] = """ type: command short-summary: Delete a container registry. examples: - name: Delete a container registry text: - az registry delete -n + az acr delete -n """ -helps['registry show'] = """ +helps['acr show'] = """ type: command short-summary: Get a container registry. examples: - name: Get a container registry and show result in a table text: - az registry show -n -o table + az acr show -n -o table """ -helps['registry update'] = """ +helps['acr update'] = """ type: command short-summary: Update a container registry. examples: - name: Update tags of a container registry and show result in a table text: - az registry update -n --tags key1=value1;key2=value2 -o table + az acr update -n --tags key1=value1;key2=value2 -o table """ -helps['registry catalog'] = """ +helps['acr catalog'] = """ type: command short-summary: The catalog of repositories in the specified registry. examples: - name: The catalog of repositories in a registry under the current subscription text: - az registry catalog -n + az acr catalog -n - name: The catalog of repositories in any registry with credentials text: - az registry catalog -n --username --password + az acr catalog -n --username --password """ -helps['registry tags'] = """ +helps['acr tags'] = """ type: command short-summary: The list of tags for a given repository in the specified registry. examples: - name: The list of tags for a given repository in a registry under the current subscription text: - az registry tags -n --repository + az acr tags -n --repository - name: The list of tags for a given repository in any registry with credentials text: - az registry tags -n --repository --username --password + az acr tags -n --repository --username --password """ diff --git a/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/_params.py b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_params.py similarity index 50% rename from src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/_params.py rename to src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_params.py index f7f848bd674..278e3ba3066 100644 --- a/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/_params.py +++ b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_params.py @@ -3,12 +3,12 @@ # Licensed under the MIT License. See License.txt in the project root for license information. #--------------------------------------------------------------------------------------------- -from azure.cli.commands import ( +from azure.cli.core.commands import ( register_cli_argument, CliArgumentType ) -from azure.cli.commands.parameters import ( +from azure.cli.core.commands.parameters import ( name_type, resource_group_name_type, location_type, @@ -16,16 +16,18 @@ ) storage_account_name_type = CliArgumentType( + options_list=('--storage-account-name', '-s'), help='Name of storage account.' ) storage_account_key_type = CliArgumentType( + options_list=('--storage-account-key', '-k'), help='Key of storage account.' ) -register_cli_argument('registry', 'registry_name', arg_type=name_type) -register_cli_argument('registry', 'resource_group', arg_type=resource_group_name_type) -register_cli_argument('registry', 'location', arg_type=location_type) -register_cli_argument('registry', 'tags', arg_type=tags_type) -register_cli_argument('registry', 'storage_account_name', arg_type=storage_account_name_type) -register_cli_argument('registry', 'storage_account_key', arg_type=storage_account_key_type) +register_cli_argument('acr', 'registry_name', arg_type=name_type) +register_cli_argument('acr', 'resource_group', arg_type=resource_group_name_type) +register_cli_argument('acr', 'location', arg_type=location_type) +register_cli_argument('acr', 'tags', arg_type=tags_type) +register_cli_argument('acr', 'storage_account_name', arg_type=storage_account_name_type) +register_cli_argument('acr', 'storage_account_key', arg_type=storage_account_key_type) diff --git a/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/_utils.py b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_utils.py similarity index 96% rename from src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/_utils.py rename to src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_utils.py index e173d17f18d..f57a8e950a8 100644 --- a/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/_utils.py +++ b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_utils.py @@ -5,11 +5,11 @@ import re -from azure.cli.command_modules.registry.mgmt_cr.models import RegistryParameters +from azure.cli.command_modules.acr.containerregistry.models import RegistryParameters from ._factory import get_registry_service_client -import azure.cli._logging as _logging +import azure.cli.core._logging as _logging logger = _logging.get_az_logger(__name__) def _get_registries_in_subscription(): diff --git a/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/mgmt_cr/__init__.py b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/containerregistry/__init__.py similarity index 100% rename from src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/mgmt_cr/__init__.py rename to src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/containerregistry/__init__.py diff --git a/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/mgmt_cr/container_registry.py b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/containerregistry/container_registry.py similarity index 97% rename from src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/mgmt_cr/container_registry.py rename to src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/containerregistry/container_registry.py index 93d47171931..c4d5b351461 100644 --- a/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/mgmt_cr/container_registry.py +++ b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/containerregistry/container_registry.py @@ -45,7 +45,7 @@ def __init__( if credentials is None: raise ValueError("Parameter 'credentials' must not be None.") if not base_url: - base_url = 'http://krater-rp-dogfood.azurewebsites.net' + base_url = 'https://management.azure.com' super(ContainerRegistryConfiguration, self).__init__(base_url, filepath) diff --git a/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/mgmt_cr/credentials.py b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/containerregistry/credentials.py similarity index 100% rename from src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/mgmt_cr/credentials.py rename to src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/containerregistry/credentials.py diff --git a/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/mgmt_cr/exceptions.py b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/containerregistry/exceptions.py similarity index 100% rename from src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/mgmt_cr/exceptions.py rename to src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/containerregistry/exceptions.py diff --git a/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/mgmt_cr/models/__init__.py b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/containerregistry/models/__init__.py similarity index 86% rename from src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/mgmt_cr/models/__init__.py rename to src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/containerregistry/models/__init__.py index e8bde026d7b..775f2378087 100644 --- a/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/mgmt_cr/models/__init__.py +++ b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/containerregistry/models/__init__.py @@ -7,12 +7,12 @@ from .registry_parameters import RegistryParameters from .registry_properties import RegistryProperties -from .storage_properties import StorageProperties +from .storage_account_properties import StorageAccountProperties from .resource_list_registry_parameters import ResourceListRegistryParameters __all__ = [ 'RegistryParameters', 'RegistryProperties', - 'StorageProperties', + 'StorageAccountProperties', 'ResourceListRegistryParameters', ] diff --git a/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/mgmt_cr/models/registry_parameters.py b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/containerregistry/models/registry_parameters.py similarity index 100% rename from src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/mgmt_cr/models/registry_parameters.py rename to src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/containerregistry/models/registry_parameters.py diff --git a/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/mgmt_cr/models/registry_properties.py b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/containerregistry/models/registry_properties.py similarity index 89% rename from src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/mgmt_cr/models/registry_properties.py rename to src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/containerregistry/models/registry_properties.py index 0bcebfaee33..fd46989437a 100644 --- a/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/mgmt_cr/models/registry_properties.py +++ b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/containerregistry/models/registry_properties.py @@ -12,8 +12,8 @@ class RegistryProperties(Model): """RegistryProperties :param storage_account: - :type storage_account: :class:`StorageProperties - ` + :type storage_account: :class:`StorageAccountProperties + ` :param login_server: :type login_server: str :param username: @@ -25,7 +25,7 @@ class RegistryProperties(Model): """ _attribute_map = { - 'storage_account': {'key': 'storageAccount', 'type': 'StorageProperties'}, + 'storage_account': {'key': 'storageAccount', 'type': 'StorageAccountProperties'}, 'login_server': {'key': 'loginServer', 'type': 'str'}, 'username': {'key': 'username', 'type': 'str'}, 'key': {'key': 'key', 'type': 'str'}, diff --git a/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/mgmt_cr/models/resource_list_registry_parameters.py b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/containerregistry/models/resource_list_registry_parameters.py similarity index 100% rename from src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/mgmt_cr/models/resource_list_registry_parameters.py rename to src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/containerregistry/models/resource_list_registry_parameters.py diff --git a/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/mgmt_cr/models/storage_properties.py b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/containerregistry/models/storage_account_properties.py similarity index 56% rename from src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/mgmt_cr/models/storage_properties.py rename to src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/containerregistry/models/storage_account_properties.py index 95a6821db4e..90c68237151 100644 --- a/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/mgmt_cr/models/storage_properties.py +++ b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/containerregistry/models/storage_account_properties.py @@ -8,20 +8,28 @@ from msrest.serialization import Model -class StorageProperties(Model): - """StorageProperties +class StorageAccountProperties(Model): + """StorageAccountProperties :param name: :type name: str :param access_key: :type access_key: str + :param end_point_url: + :type end_point_url: str + :param endpoint_suffix: + :type endpoint_suffix: str """ _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'access_key': {'key': 'accessKey', 'type': 'str'}, + 'end_point_url': {'key': 'endPointUrl', 'type': 'str'}, + 'endpoint_suffix': {'key': 'endpointSuffix', 'type': 'str'}, } - def __init__(self, name=None, access_key=None): + def __init__(self, name=None, access_key=None, end_point_url=None, endpoint_suffix=None): self.name = name self.access_key = access_key + self.end_point_url = end_point_url + self.endpoint_suffix = endpoint_suffix diff --git a/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/mgmt_cr/operations/__init__.py b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/containerregistry/operations/__init__.py similarity index 100% rename from src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/mgmt_cr/operations/__init__.py rename to src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/containerregistry/operations/__init__.py diff --git a/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/mgmt_cr/operations/registries.py b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/containerregistry/operations/registries.py similarity index 97% rename from src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/mgmt_cr/operations/registries.py rename to src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/containerregistry/operations/registries.py index d4e02520fce..4dae7e14076 100644 --- a/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/mgmt_cr/operations/registries.py +++ b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/containerregistry/operations/registries.py @@ -47,7 +47,7 @@ def get_properties( if raw=true """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroup}/providers/Microsoft.Krater/registries/{registryName}' + url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroup}/providers/Microsoft.ContainerRegistry/registries/{registryName}' path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), @@ -104,7 +104,7 @@ def create( if raw=true """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroup}/providers/Microsoft.Krater/registries/{registryName}' + url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroup}/providers/Microsoft.ContainerRegistry/registries/{registryName}' path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), @@ -162,7 +162,7 @@ def delete( if raw=true """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroup}/providers/Microsoft.Krater/registries/{registryName}' + url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroup}/providers/Microsoft.ContainerRegistry/registries/{registryName}' path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), @@ -219,7 +219,7 @@ def update( if raw=true """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroup}/providers/Microsoft.Krater/registries/{registryName}' + url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroup}/providers/Microsoft.ContainerRegistry/registries/{registryName}' path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), @@ -276,7 +276,7 @@ def list_by_resource_group( if raw=true """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroup}/providers/Microsoft.Krater/registries' + url = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroup}/providers/Microsoft.ContainerRegistry/registries' path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str') @@ -326,7 +326,7 @@ def list( if raw=true """ # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Krater/registries' + url = '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerRegistry/registries' path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } diff --git a/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/mgmt_cr/version.py b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/containerregistry/version.py similarity index 100% rename from src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/mgmt_cr/version.py rename to src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/containerregistry/version.py diff --git a/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/custom.py b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/custom.py similarity index 68% rename from src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/custom.py rename to src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/custom.py index 60df868f633..bd3b6e35e5d 100644 --- a/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/custom.py +++ b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/custom.py @@ -3,18 +3,24 @@ # Licensed under the MIT License. See License.txt in the project root for license information. #--------------------------------------------------------------------------------------------- -from azure.cli.commands import cli_command +from azure.cli.core.commands import cli_command -from azure.cli.command_modules.registry.mgmt_cr.models import RegistryParameters +from azure.cli.command_modules.acr.containerregistry.models import ( + RegistryParameters, + RegistryProperties, + StorageAccountProperties +) -from ._factory import get_registry_service_client +from ._factory import ( + get_registry_service_client, + get_storage_end_point_suffix +) from ._arm_utils import ( arm_get_registries_in_subscription, arm_get_registries_in_resource_group, arm_get_registry_by_name, - arm_deploy_template_dedicated, - arm_deploy_template_byos + arm_deploy_template ) from ._utils import ( @@ -25,10 +31,10 @@ from ._format import output_format -import azure.cli._logging as _logging +import azure.cli.core._logging as _logging logger = _logging.get_az_logger(__name__) -def cr_list(resource_group=None): +def acr_list(resource_group=None): '''Returns the list of container registries. :param str resource_group: The name of resource group ''' @@ -37,7 +43,7 @@ def cr_list(resource_group=None): else: return arm_get_registries_in_subscription() -def cr_create(resource_group, registry_name, location, storage_account_name=None, storage_account_key=None, deployment_name="Microsoft.ContainerRegistry"): +def acr_create(resource_group, registry_name, location, storage_account_name=None, storage_account_key=None, deployment_name="Microsoft.ContainerRegistry"): '''Returns the created container registry. :param str resource_group: The name of resource group :param str registry_name: The name of container registry @@ -49,13 +55,16 @@ def cr_create(resource_group, registry_name, location, storage_account_name=None validate_registry_name(registry_name) if storage_account_name: if storage_account_key: - return arm_deploy_template_byos(resource_group, registry_name, location, storage_account_name, storage_account_key, deployment_name) + storage_account_properties = StorageAccountProperties(name=storage_account_name, access_key=storage_account_key, endpoint_suffix=get_storage_end_point_suffix()) + registry_properties = RegistryProperties(storage_account=storage_account_properties) + registry_parameters = RegistryParameters(location=location, properties=registry_properties) + return get_registry_service_client().create(resource_group, registry_name, registry_parameters) else: - return arm_deploy_template_dedicated(resource_group, registry_name, location, storage_account_name, deployment_name) + return arm_deploy_template(resource_group, registry_name, location, storage_account_name, deployment_name) else: return get_registry_service_client().create(resource_group, registry_name, RegistryParameters(location=location)) -def cr_delete(registry_name): +def acr_delete(registry_name): '''Deletes the container registry that matches the registry name :param str registry_name: The name of container registry ''' @@ -68,7 +77,7 @@ def cr_delete(registry_name): resource_group = get_resource_group_by_registry(registry) return get_registry_service_client().delete(resource_group, registry_name) -def cr_show(registry_name): +def acr_show(registry_name): '''Returns the container registry that matches the registry name. :param str registry_name: The name of container registry ''' @@ -81,7 +90,7 @@ def cr_show(registry_name): resource_group = get_resource_group_by_registry(registry) return get_registry_service_client().get_properties(resource_group, registry_name) -def cr_update(registry_name, tags=None): +def acr_update(registry_name, tags=None): '''Returns the updated container registry that matches the registry name. :param str registry_name: The name of container registry ''' @@ -107,8 +116,8 @@ def cr_update(registry_name, tags=None): return get_registry_service_client().update(resource_group, registry_name, RegistryParameters(location=registry.location, tags=newTags)) -cli_command('registry list', cr_list, simple_output_query=output_format) -cli_command('registry create', cr_create, simple_output_query=output_format) -cli_command('registry delete', cr_delete, simple_output_query=output_format) -cli_command('registry show', cr_show, simple_output_query=output_format) -cli_command('registry update', cr_update, simple_output_query=output_format) +cli_command('acr list', acr_list, table_transformer=output_format) +cli_command('acr create', acr_create, table_transformer=output_format) +cli_command('acr delete', acr_delete, table_transformer=output_format) +cli_command('acr show', acr_show, table_transformer=output_format) +cli_command('acr update', acr_update, table_transformer=output_format) diff --git a/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/repository.py b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/repository.py similarity index 91% rename from src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/repository.py rename to src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/repository.py index 639469f6286..e1d39fcb559 100644 --- a/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/repository.py +++ b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/repository.py @@ -5,14 +5,14 @@ import requests -from azure.cli.commands import cli_command +from azure.cli.core.commands import cli_command from ._utils import ( get_registry_by_name, validate_registry_name ) -import azure.cli._logging as _logging +import azure.cli.core._logging as _logging logger = _logging.get_az_logger(__name__) def _obtain_data_from_registry(registry_name, path, resultIndex, username, password): @@ -57,7 +57,7 @@ def _validate_user_credentials(registry_name, path, resultIndex, username=None, logger.error('Please switch subscription or enter username/password') raise SystemExit(1) -def cr_catalog(registry_name, username=None, password=None): +def acr_catalog(registry_name, username=None, password=None): '''Returns the catalog of repositories in the specified registry. :param str registry_name: The name of your Azure container registry :param str username: The username used to log into the container registry @@ -67,7 +67,7 @@ def cr_catalog(registry_name, username=None, password=None): path = '/v2/_catalog' return _validate_user_credentials(registry_name, path, 'repositories', username, password) -def cr_tags(registry_name, repository, username=None, password=None): +def acr_tags(registry_name, repository, username=None, password=None): '''Returns the list of tags for a given repository in the specified registry. :param str registry_name: The name of your Azure container registry :param str repository: The repository to obtain tags from @@ -78,5 +78,5 @@ def cr_tags(registry_name, repository, username=None, password=None): path = '/v2/' + repository + '/tags/list' return _validate_user_credentials(registry_name, path, 'tags', username, password) -cli_command('registry catalog', cr_catalog) -cli_command('registry tags', cr_tags) +cli_command('acr catalog', acr_catalog) +cli_command('acr tags', acr_tags) diff --git a/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/template.dedicated.json b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/template.json similarity index 95% rename from src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/template.dedicated.json rename to src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/template.json index dfeed312999..4fca20cdbcd 100644 --- a/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/template.dedicated.json +++ b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/template.json @@ -53,7 +53,7 @@ { "comments": "# Registry", "name": "[parameters('registryName')]", - "type": "Microsoft.Krater/registries", + "type": "Microsoft.ContainerRegistry/registries", "location": "[parameters('registryLocation')]", "apiVersion": "[parameters('registryApiVersion')]", "dependsOn": [ @@ -68,7 +68,7 @@ } }, { - "type": "Microsoft.Krater/registries/providers/links", + "type": "Microsoft.ContainerRegistry/registries/providers/links", "apiVersion": "2015-01-01", "name": "[concat(parameters('registryName'),'/Microsoft.Resources/RegistryToStorage')]", "dependsOn": [ diff --git a/src/command_modules/azure-cli-registry/requirements.txt b/src/command_modules/azure-cli-acr/requirements.txt similarity index 100% rename from src/command_modules/azure-cli-registry/requirements.txt rename to src/command_modules/azure-cli-acr/requirements.txt diff --git a/src/command_modules/azure-cli-registry/setup.py b/src/command_modules/azure-cli-acr/setup.py similarity index 80% rename from src/command_modules/azure-cli-registry/setup.py rename to src/command_modules/azure-cli-acr/setup.py index 3423e350af1..dae1adc3c74 100644 --- a/src/command_modules/azure-cli-registry/setup.py +++ b/src/command_modules/azure-cli-acr/setup.py @@ -31,7 +31,7 @@ README = f.read() setup( - name='azure-cli-registry', + name='azure-cli-acr', version=VERSION, description='Microsoft Azure Command-Line Tools', long_description=README, @@ -46,11 +46,11 @@ 'azure.cli.command_modules', ], packages=[ - 'azure.cli.command_modules.registry', - 'azure.cli.command_modules.registry.mgmt_cr', - 'azure.cli.command_modules.registry.mgmt_cr.models', - 'azure.cli.command_modules.registry.mgmt_cr.operations', + 'azure.cli.command_modules.acr', + 'azure.cli.command_modules.acr.containerregistry', + 'azure.cli.command_modules.acr.containerregistry.models', + 'azure.cli.command_modules.acr.containerregistry.operations', ], install_requires=DEPENDENCIES, - package_data={'azure.cli.command_modules.registry': ['template.dedicated.json', 'template.byos.json']}, + package_data={'azure.cli.command_modules.acr': ['template.json']}, ) diff --git a/src/command_modules/azure-cli-registry/README.md b/src/command_modules/azure-cli-registry/README.md deleted file mode 100644 index 3310151c9fd..00000000000 --- a/src/command_modules/azure-cli-registry/README.md +++ /dev/null @@ -1,194 +0,0 @@ -# Microsoft Azure CLI 'registry' Command Module - -## Commands to manage Azure container registries -``` -Group - az registry: Commands to manage Azure container registries. - -Commands: - catalog: The catalog of repositories in the specified registry. - create : Create a container registry. - delete : Delete a container registry. - list : List container registries. - show : Get a container registry. - tags : The list of tags for a given repository in the specified registry. - update : Update a container registry. -``` - -## List container registries -``` -Command - az registry list: List container registries. - -Arguments - --resource-group -g: Name of resource group. - -Global Arguments - --debug : Increase logging verbosity to show all debug logs. - --help -h : Show this help message and exit. - --output -o : Output format. Allowed values: json, tsv, list, table, jsonc. Default: - json. - --query : JMESPath query string. See http://jmespath.org/ for more information and - examples. - --verbose : Increase logging verbosity. Use --debug for full debug logs. - -Examples - List container registries and show result in a table - az registry list -o table - List container registries in a resource group and show result in a table - az registry list -g -o table -``` - -## Create a container registry -``` -Command - az registry create: Create a container registry. - -Arguments - --location -l [Required]: Location. - --name -n [Required]: The primary resource name. - --resource-group -g [Required]: Name of resource group. - --storage-account-key : Key of storage account. - --storage-account-name : Name of storage account. - -Global Arguments - --debug : Increase logging verbosity to show all debug logs. - --help -h : Show this help message and exit. - --output -o : Output format. Allowed values: json, tsv, list, table, jsonc. - Default: json. - --query : JMESPath query string. See http://jmespath.org/ for more - information and examples. - --verbose : Increase logging verbosity. Use --debug for full debug logs. - -Examples - Create a container registry with managed storage account - az registry create -n -g -l - Create a container registry with dedicated storage account (new or existing) - az registry create -n -g -l --storage-account- - name - Create a container registry with your own storage account - az registry create -n -g -l --storage-account- - name --storage-account-key -``` - -## Delete a container registry -``` -Command - az registry delete: Delete a container registry. - -Arguments - --name -n [Required]: The primary resource name. - -Global Arguments - --debug : Increase logging verbosity to show all debug logs. - --help -h : Show this help message and exit. - --output -o : Output format. Allowed values: json, tsv, list, table, jsonc. Default: - json. - --query : JMESPath query string. See http://jmespath.org/ for more information and - examples. - --verbose : Increase logging verbosity. Use --debug for full debug logs. - -Examples - Delete a container registry - az registry delete -n -``` - -## Get a container registry -``` -Command - az registry show: Get a container registry. - -Arguments - --name -n [Required]: The primary resource name. - -Global Arguments - --debug : Increase logging verbosity to show all debug logs. - --help -h : Show this help message and exit. - --output -o : Output format. Allowed values: json, tsv, list, table, jsonc. Default: - json. - --query : JMESPath query string. See http://jmespath.org/ for more information and - examples. - --verbose : Increase logging verbosity. Use --debug for full debug logs. - -Examples - Get a container registry and show result in a table - az registry show -n -o table -``` - -## Update a container registry -``` -Command - az registry update: Update a container registry. - -Arguments - --name -n [Required]: The primary resource name. - --tags : Multiple semicolon separated tags in 'key[=value]' format. Use "" to - clear existing tags. - -Global Arguments - --debug : Increase logging verbosity to show all debug logs. - --help -h : Show this help message and exit. - --output -o : Output format. Allowed values: json, tsv, list, table, jsonc. Default: - json. - --query : JMESPath query string. See http://jmespath.org/ for more information and - examples. - --verbose : Increase logging verbosity. Use --debug for full debug logs. - -Examples - Update tags of a container registry and show result in a table - az registry update -n --tags key1=value1;key2=value2 -o table -``` - -## The catalog of repositories in the specified registry -``` -Command - az registry catalog: The catalog of repositories in the specified registry. - -Arguments - --name -n [Required]: The primary resource name. - --password : The password used to log into the container registry. - --username : The username used to log into the container registry. - -Global Arguments - --debug : Increase logging verbosity to show all debug logs. - --help -h : Show this help message and exit. - --output -o : Output format. Allowed values: json, tsv, list, table, jsonc. Default: - json. - --query : JMESPath query string. See http://jmespath.org/ for more information and - examples. - --verbose : Increase logging verbosity. Use --debug for full debug logs. - -Examples - The catalog of repositories in a registry under the current subscription - az registry catalog -n - The catalog of repositories in any registry with credentials - az registry catalog -n --username --password -``` - -## The list of tags for a given repository in the specified registry -``` -Command - az registry tags: The list of tags for a given repository in the specified registry. - -Arguments - --name -n [Required]: The primary resource name. - --repository [Required]: The repository to obtain tags from. - --password : The password used to log into the container registry. - --username : The username used to log into the container registry. - -Global Arguments - --debug : Increase logging verbosity to show all debug logs. - --help -h : Show this help message and exit. - --output -o : Output format. Allowed values: json, tsv, list, table, jsonc. - Default: json. - --query : JMESPath query string. See http://jmespath.org/ for more information - and examples. - --verbose : Increase logging verbosity. Use --debug for full debug logs. - -Examples - The list of tags for a given repository in a registry under the current subscription - az registry tags -n --repository - The list of tags for a given repository in any registry with credentials - az registry tags -n --repository --username - --password -``` \ No newline at end of file diff --git a/src/command_modules/azure-cli-registry/README.rst b/src/command_modules/azure-cli-registry/README.rst deleted file mode 100644 index c093576cbdb..00000000000 --- a/src/command_modules/azure-cli-registry/README.rst +++ /dev/null @@ -1,7 +0,0 @@ -Microsoft Azure CLI 'registry' Command Module -================================== - -This package is for the 'registry' module. -i.e. 'az registry' - -This package has [not] been tested [much] with Python 2.7, 3.4 and 3.5. diff --git a/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/template.byos.json b/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/template.byos.json deleted file mode 100644 index c75b37de368..00000000000 --- a/src/command_modules/azure-cli-registry/azure/cli/command_modules/registry/template.byos.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "registryName": { - "type": "string", - "metadata": { - "description": "Name of the registry service" - } - }, - "registryLocation": { - "type": "string", - "metadata": { - "description": "Location of the registry service" - } - }, - "registryApiVersion": { - "type": "string", - "metadata": { - "description": "Api version of the registry service" - } - }, - "storageAccountName": { - "type": "string", - "metadata": { - "description": "Name of the storage account" - } - }, - "storageAccountKey": { - "type": "string", - "metadata": { - "description": "Key of the storage account" - } - }, - "storageEndPointUrl": { - "type": "string", - "metadata": { - "description": "End point URL of the storage account" - } - } - }, - "resources": [ - { - "comments": "# Registry", - "name": "[parameters('registryName')]", - "type": "Microsoft.Krater/registries", - "location": "[parameters('registryLocation')]", - "apiVersion": "[parameters('registryApiVersion')]", - "properties": { - "storageAccount": { - "name": "[parameters('storageAccountName')]", - "accessKey": "[parameters('storageAccountKey')]", - "endPointUrl": "[parameters('storageEndPointUrl')]" - } - } - } - ] -} \ No newline at end of file