diff --git a/azure-mgmt-containerregistry/HISTORY.rst b/azure-mgmt-containerregistry/HISTORY.rst index e4a3076be53a..4f94ad11dea0 100644 --- a/azure-mgmt-containerregistry/HISTORY.rst +++ b/azure-mgmt-containerregistry/HISTORY.rst @@ -3,11 +3,19 @@ Release History =============== +1.0.0 (2017-09-22) +++++++++++++++++++ + +* New default API version 2017-10-01. +* New support for managed registries with three Managed SKUs. +* New support for registry webhooks and replications. +* Rename Basic SKU to Classic SKU. + 0.3.1 (2017-06-30) ++++++++++++++++++ -- support for registry SKU update (2017-06-01-preview) -- new listUsages API to get the quota usages for a container registry (2017-06-01-preview) +* Support for registry SKU update (2017-06-01-preview) +* New listUsages API to get the quota usages for a container registry (2017-06-01-preview) 0.3.0 (2017-06-15) ++++++++++++++++++ diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/container_registry_management_client.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/container_registry_management_client.py index 121176468364..d09161659c7e 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/container_registry_management_client.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/container_registry_management_client.py @@ -63,7 +63,7 @@ class ContainerRegistryManagementClient(object): :param str base_url: Service URL """ - DEFAULT_API_VERSION = '2017-03-01' + DEFAULT_API_VERSION = '2017-10-01' def __init__( self, credentials, subscription_id, api_version=DEFAULT_API_VERSION, base_url=None): @@ -81,13 +81,13 @@ def models(cls, api_version=DEFAULT_API_VERSION): """Module depends on the API version: * 2017-03-01: :mod:`v2017_03_01.models` - * 2017-06-01-preview: :mod:`v2017_06_01_preview.models` + * 2017-10-01: :mod:`v2017_10_01.models` """ if api_version == '2017-03-01': from .v2017_03_01 import models return models - elif api_version == '2017-06-01-preview': - from .v2017_06_01_preview import models + elif api_version == '2017-10-01': + from .v2017_10_01 import models return models raise NotImplementedError("APIVersion {} is not available".format(api_version)) @@ -96,12 +96,12 @@ def operations(self): """Instance depends on the API version: * 2017-03-01: :class:`Operations` - * 2017-06-01-preview: :class:`Operations` + * 2017-10-01: :class:`Operations` """ if self.api_version == '2017-03-01': from .v2017_03_01.operations import Operations as OperationClass - elif self.api_version == '2017-06-01-preview': - from .v2017_06_01_preview.operations import Operations as OperationClass + elif self.api_version == '2017-10-01': + from .v2017_10_01.operations import Operations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(self.api_version)) return OperationClass(self._client, self.config, self._serialize, self._deserialize) @@ -111,12 +111,12 @@ def registries(self): """Instance depends on the API version: * 2017-03-01: :class:`RegistriesOperations` - * 2017-06-01-preview: :class:`RegistriesOperations` + * 2017-10-01: :class:`RegistriesOperations` """ if self.api_version == '2017-03-01': from .v2017_03_01.operations import RegistriesOperations as OperationClass - elif self.api_version == '2017-06-01-preview': - from .v2017_06_01_preview.operations import RegistriesOperations as OperationClass + elif self.api_version == '2017-10-01': + from .v2017_10_01.operations import RegistriesOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(self.api_version)) return OperationClass(self._client, self.config, self._serialize, self._deserialize) @@ -125,10 +125,10 @@ def registries(self): def replications(self): """Instance depends on the API version: - * 2017-06-01-preview: :class:`ReplicationsOperations` + * 2017-10-01: :class:`ReplicationsOperations` """ - if self.api_version == '2017-06-01-preview': - from .v2017_06_01_preview.operations import ReplicationsOperations as OperationClass + if self.api_version == '2017-10-01': + from .v2017_10_01.operations import ReplicationsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(self.api_version)) return OperationClass(self._client, self.config, self._serialize, self._deserialize) @@ -137,10 +137,10 @@ def replications(self): def webhooks(self): """Instance depends on the API version: - * 2017-06-01-preview: :class:`WebhooksOperations` + * 2017-10-01: :class:`WebhooksOperations` """ - if self.api_version == '2017-06-01-preview': - from .v2017_06_01_preview.operations import WebhooksOperations as OperationClass + if self.api_version == '2017-10-01': + from .v2017_10_01.operations import WebhooksOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(self.api_version)) - return OperationClass(self._client, self.config, self._serialize, self._deserialize) \ No newline at end of file + return OperationClass(self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/models.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/models.py index 2613def712cf..73c852add883 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/models.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/models.py @@ -4,4 +4,4 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- -from .v2017_03_01.models import * \ No newline at end of file +from .v2017_10_01.models import * \ No newline at end of file diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/build.json b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/build.json index ee58ca40578e..10e96d80069a 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/build.json +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/build.json @@ -1 +1 @@ -{"autorest": "1.0.1-20170613-2300-nightly", "date": "2017-06-13T17:20:52Z", "version": ""} \ No newline at end of file +{"autorest": "1.2.2", "date": "2017-09-20T22:05:39Z", "version": ""} \ No newline at end of file diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/models/operation_definition_paged.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/models/operation_definition_paged.py index e897da81a617..d2da48d2e29b 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/models/operation_definition_paged.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/models/operation_definition_paged.py @@ -14,7 +14,7 @@ class OperationDefinitionPaged(Paged): """ - A paging container for iterating over a list of OperationDefinition object + A paging container for iterating over a list of :class:`OperationDefinition ` object """ _attribute_map = { diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/models/registry.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/models/registry.py index 25baeb1e8726..b82ac13457a0 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/models/registry.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/models/registry.py @@ -38,12 +38,13 @@ class Registry(Resource): :ivar creation_date: The creation date of the container registry in ISO8601 format. :vartype creation_date: datetime - :ivar provisioning_state: The status of the container registry at the time - the operation was called. Possible values include: 'Creating', 'Succeeded' + :ivar provisioning_state: The provisioning state of the container registry + at the time the operation was called. Possible values include: 'Creating', + 'Succeeded' :vartype provisioning_state: str or :class:`ProvisioningState ` :param admin_user_enabled: The value that indicates whether the admin user - is enabled. This value is false by default. Default value: False . + is enabled. Default value: False . :type admin_user_enabled: bool :param storage_account: The properties of the storage account for the container registry. diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/models/registry_create_parameters.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/models/registry_create_parameters.py index 8f254601a173..b33c5a8c4da7 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/models/registry_create_parameters.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/models/registry_create_parameters.py @@ -24,7 +24,7 @@ class RegistryCreateParameters(Model): :type sku: :class:`Sku ` :param admin_user_enabled: The value that indicates whether the admin user - is enabled. This value is false by default. + is enabled. Default value: False . :type admin_user_enabled: bool :param storage_account: The parameters of a storage account for the container registry. If specified, the storage account must be in the same @@ -47,7 +47,7 @@ class RegistryCreateParameters(Model): 'storage_account': {'key': 'properties.storageAccount', 'type': 'StorageAccountParameters'}, } - def __init__(self, location, sku, storage_account, tags=None, admin_user_enabled=None): + def __init__(self, location, sku, storage_account, tags=None, admin_user_enabled=False): self.tags = tags self.location = location self.sku = sku diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/models/registry_name_check_request.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/models/registry_name_check_request.py index ee1765e0d249..d83e4b3e1cd8 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/models/registry_name_check_request.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/models/registry_name_check_request.py @@ -21,13 +21,13 @@ class RegistryNameCheckRequest(Model): :param name: The name of the container registry. :type name: str :ivar type: The resource type of the container registry. This field must - be set to "Microsoft.ContainerRegistry/registries". Default value: + be set to 'Microsoft.ContainerRegistry/registries'. Default value: "Microsoft.ContainerRegistry/registries" . :vartype type: str """ _validation = { - 'name': {'required': True, 'max_length': 50, 'min_length': 5, 'pattern': '^[a-zA-Z0-9]*$'}, + 'name': {'required': True, 'max_length': 50, 'min_length': 5, 'pattern': r'^[a-zA-Z0-9]*$'}, 'type': {'required': True, 'constant': True}, } diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/models/registry_paged.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/models/registry_paged.py index d0f9a3f8a31a..09ec73b6169a 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/models/registry_paged.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/models/registry_paged.py @@ -14,7 +14,7 @@ class RegistryPaged(Paged): """ - A paging container for iterating over a list of Registry object + A paging container for iterating over a list of :class:`Registry ` object """ _attribute_map = { diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/models/registry_update_parameters.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/models/registry_update_parameters.py index b153e48ecfb7..84178650365e 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/models/registry_update_parameters.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/models/registry_update_parameters.py @@ -18,7 +18,7 @@ class RegistryUpdateParameters(Model): :param tags: The tags for the container registry. :type tags: dict :param admin_user_enabled: The value that indicates whether the admin user - is enabled. This value is false by default. + is enabled. :type admin_user_enabled: bool :param storage_account: The parameters of a storage account for the container registry. If specified, the storage account must be in the same diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/models/sku.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/models/sku.py index 3f759a26c14e..6f241348e56d 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/models/sku.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/models/sku.py @@ -18,8 +18,8 @@ class Sku(Model): Variables are only populated by the server, and will be ignored when sending a request. - :param name: The SKU name of the the container registry. Required for - registry creation. Allowed value: Basic. + :param name: The SKU name of the container registry. Required for registry + creation. Allowed value: Basic. :type name: str :ivar tier: The SKU tier based on the SKU name. Possible values include: 'Basic' diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/operations/operations.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/operations/operations.py index 935ed6a78d96..a9cb32b39998 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/operations/operations.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/operations/operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -45,6 +45,8 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`OperationDefinition + ` :rtype: :class:`OperationDefinitionPaged ` :raises: :class:`CloudError` diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/operations/registries_operations.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/operations/registries_operations.py index 9347fbe506b3..3d70f619e0bc 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/operations/registries_operations.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/operations/registries_operations.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError from msrestazure.azure_operation import AzureOperationPoller -import uuid from .. import models @@ -40,7 +40,7 @@ def check_name_availability( self, name, custom_headers=None, raw=False, **operation_config): """Checks whether the container registry name is available for use. The name must contain only alphanumeric characters, be globally unique, and - between 5 and 60 characters in length. + between 5 and 50 characters in length. :param name: The name of the container registry. :type name: str @@ -49,10 +49,13 @@ def check_name_availability( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`RegistryNameStatus + ` + or :class:`ClientRawResponse` if + raw=true :rtype: :class:`RegistryNameStatus ` - :rtype: :class:`ClientRawResponse` - if raw=true + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ registry_name_check_request = models.RegistryNameCheckRequest(name=name) @@ -116,10 +119,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`Registry + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`Registry - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL @@ -127,7 +133,7 @@ def get( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern='^[a-zA-Z0-9]*$') + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -181,12 +187,15 @@ def create( :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response - :rtype: + :return: :class:`AzureOperationPoller` instance that returns :class:`Registry - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: + :class:`AzureOperationPoller` + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL @@ -194,7 +203,7 @@ def create( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern='^[a-zA-Z0-9]*$') + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -273,9 +282,11 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL @@ -283,7 +294,7 @@ def delete( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern='^[a-zA-Z0-9]*$') + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -332,10 +343,13 @@ def update( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`Registry + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`Registry - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL @@ -343,7 +357,7 @@ def update( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern='^[a-zA-Z0-9]*$') + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -397,6 +411,8 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`Registry + ` :rtype: :class:`RegistryPaged ` :raises: :class:`CloudError` @@ -461,6 +477,8 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`Registry + ` :rtype: :class:`RegistryPaged ` :raises: :class:`CloudError` @@ -529,10 +547,13 @@ def list_credentials( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`RegistryListCredentialsResult + ` + or :class:`ClientRawResponse` if + raw=true :rtype: :class:`RegistryListCredentialsResult ` - :rtype: :class:`ClientRawResponse` - if raw=true + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL @@ -540,7 +561,7 @@ def list_credentials( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern='^[a-zA-Z0-9]*$') + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -598,10 +619,13 @@ def regenerate_credential( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`RegistryListCredentialsResult + ` + or :class:`ClientRawResponse` if + raw=true :rtype: :class:`RegistryListCredentialsResult ` - :rtype: :class:`ClientRawResponse` - if raw=true + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ regenerate_credential_parameters = models.RegenerateCredentialParameters(name=name) @@ -611,7 +635,7 @@ def regenerate_credential( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern='^[a-zA-Z0-9]*$') + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/build.json b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/build.json deleted file mode 100644 index 2712fb93e256..000000000000 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/build.json +++ /dev/null @@ -1 +0,0 @@ -{"autorest": "1.1.0", "date": "2017-06-30T21:38:07Z", "version": ""} \ No newline at end of file diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/__init__.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/__init__.py similarity index 100% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/__init__.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/__init__.py diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/build.json b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/build.json new file mode 100644 index 000000000000..85c22e7d571d --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/build.json @@ -0,0 +1 @@ +{"autorest": "1.2.2", "date": "2017-09-20T22:06:02Z", "version": ""} \ No newline at end of file diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/container_registry_management_client.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/container_registry_management_client.py similarity index 89% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/container_registry_management_client.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/container_registry_management_client.py index 7750f2b6959c..713fab4dab2d 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/container_registry_management_client.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/container_registry_management_client.py @@ -61,13 +61,13 @@ class ContainerRegistryManagementClient(object): :vartype config: ContainerRegistryManagementClientConfiguration :ivar registries: Registries operations - :vartype registries: azure.mgmt.containerregistry.v2017_06_01_preview.operations.RegistriesOperations + :vartype registries: azure.mgmt.containerregistry.v2017_10_01.operations.RegistriesOperations :ivar operations: Operations operations - :vartype operations: azure.mgmt.containerregistry.v2017_06_01_preview.operations.Operations + :vartype operations: azure.mgmt.containerregistry.v2017_10_01.operations.Operations :ivar replications: Replications operations - :vartype replications: azure.mgmt.containerregistry.v2017_06_01_preview.operations.ReplicationsOperations + :vartype replications: azure.mgmt.containerregistry.v2017_10_01.operations.ReplicationsOperations :ivar webhooks: Webhooks operations - :vartype webhooks: azure.mgmt.containerregistry.v2017_06_01_preview.operations.WebhooksOperations + :vartype webhooks: azure.mgmt.containerregistry.v2017_10_01.operations.WebhooksOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -84,7 +84,7 @@ def __init__( self._client = ServiceClient(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2017-06-01-preview' + self.api_version = '2017-10-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/__init__.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/__init__.py similarity index 96% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/__init__.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/__init__.py index cebd3948414a..4375e516b858 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/__init__.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/__init__.py @@ -24,6 +24,7 @@ from .registry_usage import RegistryUsage from .registry_usage_list_result import RegistryUsageListResult from .replication import Replication +from .replication_update_parameters import ReplicationUpdateParameters from .webhook import Webhook from .webhook_create_parameters import WebhookCreateParameters from .webhook_update_parameters import WebhookUpdateParameters @@ -69,6 +70,7 @@ 'RegistryUsage', 'RegistryUsageListResult', 'Replication', + 'ReplicationUpdateParameters', 'Webhook', 'WebhookCreateParameters', 'WebhookUpdateParameters', diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/actor.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/actor.py similarity index 100% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/actor.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/actor.py diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/callback_config.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/callback_config.py similarity index 100% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/callback_config.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/callback_config.py diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/container_registry_management_client_enums.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/container_registry_management_client_enums.py similarity index 96% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/container_registry_management_client_enums.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/container_registry_management_client_enums.py index af0df332de46..9f68386a12e3 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/container_registry_management_client_enums.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/container_registry_management_client_enums.py @@ -14,7 +14,7 @@ class SkuName(Enum): - basic = "Basic" + classic = "Classic" managed_basic = "Managed_Basic" managed_standard = "Managed_Standard" managed_premium = "Managed_Premium" @@ -22,7 +22,7 @@ class SkuName(Enum): class SkuTier(Enum): - basic = "Basic" + classic = "Classic" managed = "Managed" diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/event.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/event.py similarity index 89% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/event.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/event.py index e2db77bdf3c1..37debdad8210 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/event.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/event.py @@ -20,11 +20,11 @@ class Event(EventInfo): :param event_request_message: The event request message sent to the service URI. :type event_request_message: :class:`EventRequestMessage - ` + ` :param event_response_message: The event response message received from the service URI. :type event_response_message: :class:`EventResponseMessage - ` + ` """ _attribute_map = { diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/event_content.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/event_content.py similarity index 87% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/event_content.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/event_content.py index 46a3ce6bc5db..8ba5667bf80b 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/event_content.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/event_content.py @@ -23,18 +23,18 @@ class EventContent(Model): :type action: str :param target: The target of the event. :type target: :class:`Target - ` + ` :param request: The request that generated the event. :type request: :class:`Request - ` + ` :param actor: The agent that initiated the event. For most situations, this could be from the authorization context of the request. :type actor: :class:`Actor - ` + ` :param source: The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it. :type source: :class:`Source - ` + ` """ _attribute_map = { diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/event_info.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/event_info.py similarity index 100% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/event_info.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/event_info.py diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/event_paged.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/event_paged.py similarity index 85% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/event_paged.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/event_paged.py index 11f691018158..3260fdd5d1e7 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/event_paged.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/event_paged.py @@ -14,7 +14,7 @@ class EventPaged(Paged): """ - A paging container for iterating over a list of Event object + A paging container for iterating over a list of :class:`Event ` object """ _attribute_map = { diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/event_request_message.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/event_request_message.py similarity index 95% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/event_request_message.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/event_request_message.py index 23e6ca8897eb..d1c962ea0b38 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/event_request_message.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/event_request_message.py @@ -17,7 +17,7 @@ class EventRequestMessage(Model): :param content: The content of the event request message. :type content: :class:`EventContent - ` + ` :param headers: The headers of the event request message. :type headers: dict :param method: The HTTP method used to send the event request message. diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/event_response_message.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/event_response_message.py similarity index 100% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/event_response_message.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/event_response_message.py diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/operation_definition.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/operation_definition.py similarity index 92% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/operation_definition.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/operation_definition.py index b05a7eaad53b..37ba0a473049 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/operation_definition.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/operation_definition.py @@ -20,7 +20,7 @@ class OperationDefinition(Model): :param display: The display information for the container registry operation. :type display: :class:`OperationDisplayDefinition - ` + ` """ _attribute_map = { diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/operation_definition_paged.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/operation_definition_paged.py similarity index 84% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/operation_definition_paged.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/operation_definition_paged.py index e897da81a617..be0fce16a1be 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/operation_definition_paged.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/operation_definition_paged.py @@ -14,7 +14,7 @@ class OperationDefinitionPaged(Paged): """ - A paging container for iterating over a list of OperationDefinition object + A paging container for iterating over a list of :class:`OperationDefinition ` object """ _attribute_map = { diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/operation_display_definition.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/operation_display_definition.py similarity index 100% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/operation_display_definition.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/operation_display_definition.py diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/regenerate_credential_parameters.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/regenerate_credential_parameters.py similarity index 93% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/regenerate_credential_parameters.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/regenerate_credential_parameters.py index 43ada89901bc..3a734de7fc6d 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/regenerate_credential_parameters.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/regenerate_credential_parameters.py @@ -18,7 +18,7 @@ class RegenerateCredentialParameters(Model): :param name: Specifies name of the password which should be regenerated -- password or password2. Possible values include: 'password', 'password2' :type name: str or :class:`PasswordName - ` + ` """ _validation = { diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/registry.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry.py similarity index 91% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/registry.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry.py index fc3782f69c89..49b2cd9dad90 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/registry.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry.py @@ -31,7 +31,7 @@ class Registry(Resource): :type tags: dict :param sku: The SKU of the container registry. :type sku: :class:`Sku - ` + ` :ivar login_server: The URL that can be used to log into the container registry. :vartype login_server: str @@ -42,18 +42,18 @@ class Registry(Resource): at the time the operation was called. Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' :vartype provisioning_state: str or :class:`ProvisioningState - ` + ` :ivar status: The status of the container registry at the time the operation was called. :vartype status: :class:`Status - ` + ` :param admin_user_enabled: The value that indicates whether the admin user is enabled. Default value: False . :type admin_user_enabled: bool :param storage_account: The properties of the storage account for the - container registry. Only applicable to Basic SKU. + container registry. Only applicable to Classic SKU. :type storage_account: :class:`StorageAccountProperties - ` + ` """ _validation = { diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/registry_list_credentials_result.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry_list_credentials_result.py similarity index 93% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/registry_list_credentials_result.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry_list_credentials_result.py index fa35bad7fd24..344fda3fda31 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/registry_list_credentials_result.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry_list_credentials_result.py @@ -19,7 +19,7 @@ class RegistryListCredentialsResult(Model): :type username: str :param passwords: The list of passwords for a container registry. :type passwords: list of :class:`RegistryPassword - ` + ` """ _attribute_map = { diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/registry_name_check_request.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry_name_check_request.py similarity index 97% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/registry_name_check_request.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry_name_check_request.py index fd7c8b870c29..d83e4b3e1cd8 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/registry_name_check_request.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry_name_check_request.py @@ -27,7 +27,7 @@ class RegistryNameCheckRequest(Model): """ _validation = { - 'name': {'required': True, 'max_length': 50, 'min_length': 5, 'pattern': '^[a-zA-Z0-9]*$'}, + 'name': {'required': True, 'max_length': 50, 'min_length': 5, 'pattern': r'^[a-zA-Z0-9]*$'}, 'type': {'required': True, 'constant': True}, } diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/registry_name_status.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry_name_status.py similarity index 100% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/registry_name_status.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry_name_status.py diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/registry_paged.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry_paged.py similarity index 85% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/registry_paged.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry_paged.py index d0f9a3f8a31a..24c3ad95e37e 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/registry_paged.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry_paged.py @@ -14,7 +14,7 @@ class RegistryPaged(Paged): """ - A paging container for iterating over a list of Registry object + A paging container for iterating over a list of :class:`Registry ` object """ _attribute_map = { diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/registry_password.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry_password.py similarity index 93% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/registry_password.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry_password.py index 04fa8c05db89..ae23d6baf3d8 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/registry_password.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry_password.py @@ -18,7 +18,7 @@ class RegistryPassword(Model): :param name: The password name. Possible values include: 'password', 'password2' :type name: str or :class:`PasswordName - ` + ` :param value: The password value. :type value: str """ diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/registry_update_parameters.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry_update_parameters.py similarity index 87% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/registry_update_parameters.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry_update_parameters.py index 29b1e646a6f9..ff40c8565b0f 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/registry_update_parameters.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry_update_parameters.py @@ -19,16 +19,16 @@ class RegistryUpdateParameters(Model): :type tags: dict :param sku: The SKU of the container registry. :type sku: :class:`Sku - ` + ` :param admin_user_enabled: The value that indicates whether the admin user is enabled. :type admin_user_enabled: bool :param storage_account: The parameters of a storage account for the - container registry. Only applicable to Basic SKU. If specified, the + container registry. Only applicable to Classic SKU. If specified, the storage account must be in the same physical location as the container registry. :type storage_account: :class:`StorageAccountProperties - ` + ` """ _attribute_map = { diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/registry_usage.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry_usage.py similarity index 94% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/registry_usage.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry_usage.py index daa84bf97d16..bddd2d7eac5c 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/registry_usage.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry_usage.py @@ -24,7 +24,7 @@ class RegistryUsage(Model): :param unit: The unit of measurement. Possible values include: 'Count', 'Bytes' :type unit: str or :class:`RegistryUsageUnit - ` + ` """ _attribute_map = { diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/registry_usage_list_result.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry_usage_list_result.py similarity index 92% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/registry_usage_list_result.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry_usage_list_result.py index 49dcdafedcb3..560d1d031433 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/registry_usage_list_result.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/registry_usage_list_result.py @@ -17,7 +17,7 @@ class RegistryUsageListResult(Model): :param value: The list of container registry quota usages. :type value: list of :class:`RegistryUsage - ` + ` """ _attribute_map = { diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/replication.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/replication.py similarity index 93% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/replication.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/replication.py index 2580b536ff42..6142a0d45ac7 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/replication.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/replication.py @@ -33,11 +33,11 @@ class Replication(Resource): time the operation was called. Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' :vartype provisioning_state: str or :class:`ProvisioningState - ` + ` :ivar status: The status of the replication at the time the operation was called. :vartype status: :class:`Status - ` + ` """ _validation = { diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/replication_paged.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/replication_paged.py similarity index 85% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/replication_paged.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/replication_paged.py index b0ce75cee71d..0295ae67e860 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/replication_paged.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/replication_paged.py @@ -14,7 +14,7 @@ class ReplicationPaged(Paged): """ - A paging container for iterating over a list of Replication object + A paging container for iterating over a list of :class:`Replication ` object """ _attribute_map = { diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/replication_update_parameters.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/replication_update_parameters.py new file mode 100644 index 000000000000..e2a133dfef17 --- /dev/null +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/replication_update_parameters.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ReplicationUpdateParameters(Model): + """The parameters for updating a replication. + + :param tags: The tags for the replication. + :type tags: dict + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, tags=None): + self.tags = tags diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/request.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/request.py similarity index 100% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/request.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/request.py diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/resource.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/resource.py similarity index 100% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/resource.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/resource.py diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/sku.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/sku.py similarity index 78% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/sku.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/sku.py index b5f84a750a31..c442979b5454 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/sku.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/sku.py @@ -18,15 +18,15 @@ class Sku(Model): Variables are only populated by the server, and will be ignored when sending a request. - :param name: The SKU name of the the container registry. Required for - registry creation. Possible values include: 'Basic', 'Managed_Basic', + :param name: The SKU name of the container registry. Required for registry + creation. Possible values include: 'Classic', 'Managed_Basic', 'Managed_Standard', 'Managed_Premium' :type name: str or :class:`SkuName - ` + ` :ivar tier: The SKU tier based on the SKU name. Possible values include: - 'Basic', 'Managed' + 'Classic', 'Managed' :vartype tier: str or :class:`SkuTier - ` + ` """ _validation = { diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/source.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/source.py similarity index 100% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/source.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/source.py diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/status.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/status.py similarity index 100% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/status.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/status.py diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/storage_account_properties.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/storage_account_properties.py similarity index 96% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/storage_account_properties.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/storage_account_properties.py index 78e1b653c929..b9b4af57bfda 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/storage_account_properties.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/storage_account_properties.py @@ -14,7 +14,7 @@ class StorageAccountProperties(Model): """The properties of a storage account for a container registry. Only - applicable to Basic SKU. + applicable to Classic SKU. :param id: The resource ID of the storage account. :type id: str diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/target.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/target.py similarity index 100% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/target.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/target.py diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/webhook.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/webhook.py similarity index 92% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/webhook.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/webhook.py index 13aaff9a0d40..0604ddfb02c8 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/webhook.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/webhook.py @@ -32,7 +32,7 @@ class Webhook(Resource): :param status: The status of the webhook at the time the operation was called. Possible values include: 'enabled', 'disabled' :type status: str or :class:`WebhookStatus - ` + ` :param scope: The scope of repositories where the event can be triggered. For example, 'foo:*' means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to @@ -41,12 +41,12 @@ class Webhook(Resource): :param actions: The list of actions that trigger the webhook to post notifications. :type actions: list of str or :class:`WebhookAction - ` + ` :ivar provisioning_state: The provisioning state of the webhook at the time the operation was called. Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' :vartype provisioning_state: str or :class:`ProvisioningState - ` + ` """ _validation = { diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/webhook_create_parameters.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/webhook_create_parameters.py similarity index 94% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/webhook_create_parameters.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/webhook_create_parameters.py index 11c61ed3c71b..efdb698e558e 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/webhook_create_parameters.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/webhook_create_parameters.py @@ -28,7 +28,7 @@ class WebhookCreateParameters(Model): :param status: The status of the webhook at the time the operation was called. Possible values include: 'enabled', 'disabled' :type status: str or :class:`WebhookStatus - ` + ` :param scope: The scope of repositories where the event can be triggered. For example, 'foo:*' means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to @@ -37,7 +37,7 @@ class WebhookCreateParameters(Model): :param actions: The list of actions that trigger the webhook to post notifications. :type actions: list of str or :class:`WebhookAction - ` + ` """ _validation = { diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/webhook_paged.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/webhook_paged.py similarity index 85% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/webhook_paged.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/webhook_paged.py index f081f88ca982..a1952e2749f4 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/webhook_paged.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/webhook_paged.py @@ -14,7 +14,7 @@ class WebhookPaged(Paged): """ - A paging container for iterating over a list of Webhook object + A paging container for iterating over a list of :class:`Webhook ` object """ _attribute_map = { diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/webhook_update_parameters.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/webhook_update_parameters.py similarity index 93% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/webhook_update_parameters.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/webhook_update_parameters.py index 3822d9169990..ec6474318bb7 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/models/webhook_update_parameters.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/models/webhook_update_parameters.py @@ -25,7 +25,7 @@ class WebhookUpdateParameters(Model): :param status: The status of the webhook at the time the operation was called. Possible values include: 'enabled', 'disabled' :type status: str or :class:`WebhookStatus - ` + ` :param scope: The scope of repositories where the event can be triggered. For example, 'foo:*' means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. 'foo' is equivalent to @@ -34,7 +34,7 @@ class WebhookUpdateParameters(Model): :param actions: The list of actions that trigger the webhook to post notifications. :type actions: list of str or :class:`WebhookAction - ` + ` """ _attribute_map = { diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/operations/__init__.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/__init__.py similarity index 100% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/operations/__init__.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/__init__.py diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/operations/operations.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/operations.py similarity index 92% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/operations/operations.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/operations.py index 61d8aab91f11..44ea516cc007 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/operations/operations.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -23,7 +23,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An objec model deserializer. - :ivar api_version: The client API version. Constant value: "2017-06-01-preview". + :ivar api_version: The client API version. Constant value: "2017-10-01". """ def __init__(self, client, config, serializer, deserializer): @@ -31,7 +31,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-06-01-preview" + self.api_version = "2017-10-01" self.config = config @@ -45,8 +45,10 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`OperationDefinition + ` :rtype: :class:`OperationDefinitionPaged - ` + ` :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/operations/registries_operations.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/registries_operations.py similarity index 84% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/operations/registries_operations.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/registries_operations.py index e1f2b32d0fb7..188e096ca3d3 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/operations/registries_operations.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/registries_operations.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError from msrestazure.azure_operation import AzureOperationPoller -import uuid from .. import models @@ -24,7 +24,7 @@ class RegistriesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An objec model deserializer. - :ivar api_version: The client API version. Constant value: "2017-06-01-preview". + :ivar api_version: The client API version. Constant value: "2017-10-01". """ def __init__(self, client, config, serializer, deserializer): @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-06-01-preview" + self.api_version = "2017-10-01" self.config = config @@ -49,10 +49,13 @@ def check_name_availability( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`RegistryNameStatus + ` + or :class:`ClientRawResponse` if + raw=true :rtype: :class:`RegistryNameStatus - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ registry_name_check_request = models.RegistryNameCheckRequest(name=name) @@ -116,10 +119,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`Registry + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`Registry - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL @@ -127,7 +133,7 @@ def get( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern='^[a-zA-Z0-9]*$') + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -176,16 +182,19 @@ def create( :type registry_name: str :param registry: The parameters for creating a container registry. :type registry: :class:`Registry - ` + ` :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response - :rtype: + :return: :class:`AzureOperationPoller` instance that returns :class:`Registry - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: + :class:`AzureOperationPoller` + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL @@ -193,7 +202,7 @@ def create( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern='^[a-zA-Z0-9]*$') + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -272,11 +281,14 @@ def delete( :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response + :return: + :class:`AzureOperationPoller` + instance that returns None or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL @@ -284,7 +296,7 @@ def delete( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern='^[a-zA-Z0-9]*$') + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -350,16 +362,19 @@ def update( :param registry_update_parameters: The parameters for updating a container registry. :type registry_update_parameters: :class:`RegistryUpdateParameters - ` + ` :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :rtype: :class:`Registry - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: + :class:`AzureOperationPoller` + instance that returns :class:`Registry + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: + :class:`AzureOperationPoller` + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL @@ -367,7 +382,7 @@ def update( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern='^[a-zA-Z0-9]*$') + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -389,25 +404,50 @@ def update( body_content = self._serialize.body(registry_update_parameters, 'RegistryUpdateParameters') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, **operation_config) + def long_running_send(): - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + request = self._client.patch(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) - deserialized = None + def get_long_running_status(status_link, headers=None): - if response.status_code == 200: - deserialized = self._deserialize('Registry', response) + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Registry', response) + if response.status_code == 201: + deserialized = self._deserialize('Registry', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + response = long_running_send() + return get_long_running_output(response) - return deserialized + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -421,8 +461,10 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`Registry + ` :rtype: :class:`RegistryPaged - ` + ` :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -485,8 +527,10 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`Registry + ` :rtype: :class:`RegistryPaged - ` + ` :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -553,10 +597,13 @@ def list_credentials( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`RegistryListCredentialsResult + ` + or :class:`ClientRawResponse` if + raw=true :rtype: :class:`RegistryListCredentialsResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL @@ -564,7 +611,7 @@ def list_credentials( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern='^[a-zA-Z0-9]*$') + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -616,16 +663,19 @@ def regenerate_credential( regenerated -- password or password2. Possible values include: 'password', 'password2' :type name: str or :class:`PasswordName - ` + ` :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`RegistryListCredentialsResult + ` + or :class:`ClientRawResponse` if + raw=true :rtype: :class:`RegistryListCredentialsResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ regenerate_credential_parameters = models.RegenerateCredentialParameters(name=name) @@ -635,7 +685,7 @@ def regenerate_credential( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern='^[a-zA-Z0-9]*$') + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -691,10 +741,13 @@ def list_usages( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`RegistryUsageListResult + ` + or :class:`ClientRawResponse` if + raw=true :rtype: :class:`RegistryUsageListResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL @@ -702,7 +755,7 @@ def list_usages( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern='^[a-zA-Z0-9]*$') + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/operations/replications_operations.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/replications_operations.py similarity index 70% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/operations/replications_operations.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/replications_operations.py index 466d98450a89..f9005730eda9 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/operations/replications_operations.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/replications_operations.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError from msrestazure.azure_operation import AzureOperationPoller -import uuid from .. import models @@ -24,7 +24,7 @@ class ReplicationsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An objec model deserializer. - :ivar api_version: The client API version. Constant value: "2017-06-01-preview". + :ivar api_version: The client API version. Constant value: "2017-10-01". """ def __init__(self, client, config, serializer, deserializer): @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-06-01-preview" + self.api_version = "2017-10-01" self.config = config @@ -52,10 +52,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`Replication + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`Replication - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL @@ -63,8 +66,8 @@ def get( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern='^[a-zA-Z0-9]*$'), - 'replicationName': self._serialize.url("replication_name", replication_name, 'str', max_length=50, min_length=5, pattern='^[a-zA-Z0-9]*$') + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'replicationName': self._serialize.url("replication_name", replication_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -102,10 +105,10 @@ def get( return deserialized - def create_or_update( + def create( self, resource_group_name, registry_name, replication_name, location, tags=None, custom_headers=None, raw=False, **operation_config): - """Creates or updates a replication for a container registry with the - specified parameters. + """Creates a replication for a container registry with the specified + parameters. :param resource_group_name: The name of the resource group to which the container registry belongs. @@ -122,12 +125,15 @@ def create_or_update( :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response - :rtype: + :return: :class:`AzureOperationPoller` instance that returns :class:`Replication - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: + :class:`AzureOperationPoller` + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ replication = models.Replication(location=location, tags=tags) @@ -137,8 +143,8 @@ def create_or_update( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern='^[a-zA-Z0-9]*$'), - 'replicationName': self._serialize.url("replication_name", replication_name, 'str', max_length=50, min_length=5, pattern='^[a-zA-Z0-9]*$') + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'replicationName': self._serialize.url("replication_name", replication_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -219,11 +225,14 @@ def delete( :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response + :return: + :class:`AzureOperationPoller` + instance that returns None or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL @@ -231,8 +240,8 @@ def delete( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern='^[a-zA-Z0-9]*$'), - 'replicationName': self._serialize.url("replication_name", replication_name, 'str', max_length=50, min_length=5, pattern='^[a-zA-Z0-9]*$') + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'replicationName': self._serialize.url("replication_name", replication_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -286,6 +295,109 @@ def get_long_running_output(response): long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + def update( + self, resource_group_name, registry_name, replication_name, tags=None, custom_headers=None, raw=False, **operation_config): + """Updates a replication for a container registry with the specified + parameters. + + :param resource_group_name: The name of the resource group to which + the container registry belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param replication_name: The name of the replication. + :type replication_name: str + :param tags: The tags for the replication. + :type tags: dict + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: + :class:`AzureOperationPoller` + instance that returns :class:`Replication + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: + :class:`AzureOperationPoller` + or :class:`ClientRawResponse` + :raises: :class:`CloudError` + """ + replication_update_parameters = models.ReplicationUpdateParameters(tags=tags) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}' + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'replicationName': self._serialize.url("replication_name", replication_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(replication_update_parameters, 'ReplicationUpdateParameters') + + # Construct and send request + def long_running_send(): + + request = self._client.patch(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Replication', response) + if response.status_code == 201: + deserialized = self._deserialize('Replication', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + if raw: + response = long_running_send() + return get_long_running_output(response) + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + def list( self, resource_group_name, registry_name, custom_headers=None, raw=False, **operation_config): """Lists all the replications for the specified container registry. @@ -300,8 +412,10 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`Replication + ` :rtype: :class:`ReplicationPaged - ` + ` :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -312,7 +426,7 @@ def internal_paging(next_link=None, raw=False): path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern='^[a-zA-Z0-9]*$') + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/operations/webhooks_operations.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/webhooks_operations.py similarity index 88% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/operations/webhooks_operations.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/webhooks_operations.py index af5fe629a3f3..7d6b234c3418 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/operations/webhooks_operations.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/operations/webhooks_operations.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError from msrestazure.azure_operation import AzureOperationPoller -import uuid from .. import models @@ -24,7 +24,7 @@ class WebhooksOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An objec model deserializer. - :ivar api_version: The client API version. Constant value: "2017-06-01-preview". + :ivar api_version: The client API version. Constant value: "2017-10-01". """ def __init__(self, client, config, serializer, deserializer): @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-06-01-preview" + self.api_version = "2017-10-01" self.config = config @@ -52,10 +52,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`Webhook + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`Webhook - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL @@ -63,8 +66,8 @@ def get( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern='^[a-zA-Z0-9]*$'), - 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern='^[a-zA-Z0-9]*$') + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -117,16 +120,19 @@ def create( :param webhook_create_parameters: The parameters for creating a webhook. :type webhook_create_parameters: :class:`WebhookCreateParameters - ` + ` :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response - :rtype: + :return: :class:`AzureOperationPoller` instance that returns :class:`Webhook - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: + :class:`AzureOperationPoller` + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL @@ -134,8 +140,8 @@ def create( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern='^[a-zA-Z0-9]*$'), - 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern='^[a-zA-Z0-9]*$') + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -216,11 +222,14 @@ def delete( :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response + :return: + :class:`AzureOperationPoller` + instance that returns None or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL @@ -228,8 +237,8 @@ def delete( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern='^[a-zA-Z0-9]*$'), - 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern='^[a-zA-Z0-9]*$') + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -297,16 +306,19 @@ def update( :param webhook_update_parameters: The parameters for updating a webhook. :type webhook_update_parameters: :class:`WebhookUpdateParameters - ` + ` :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response - :rtype: + :return: :class:`AzureOperationPoller` instance that returns :class:`Webhook - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: + :class:`AzureOperationPoller` + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL @@ -314,8 +326,8 @@ def update( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern='^[a-zA-Z0-9]*$'), - 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern='^[a-zA-Z0-9]*$') + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -396,8 +408,10 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`Webhook + ` :rtype: :class:`WebhookPaged - ` + ` :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -408,7 +422,7 @@ def internal_paging(next_link=None, raw=False): path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern='^[a-zA-Z0-9]*$') + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -468,10 +482,13 @@ def ping( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`EventInfo + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`EventInfo - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL @@ -479,8 +496,8 @@ def ping( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern='^[a-zA-Z0-9]*$'), - 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern='^[a-zA-Z0-9]*$') + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -535,10 +552,13 @@ def get_callback_config( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`CallbackConfig + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`CallbackConfig - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL @@ -546,8 +566,8 @@ def get_callback_config( path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern='^[a-zA-Z0-9]*$'), - 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern='^[a-zA-Z0-9]*$') + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) @@ -601,8 +621,10 @@ def list_events( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`Event + ` :rtype: :class:`EventPaged - ` + ` :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -613,8 +635,8 @@ def internal_paging(next_link=None, raw=False): path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern='^[a-zA-Z0-9]*$'), - 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern='^[a-zA-Z0-9]*$') + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$') } url = self._client.format_url(url, **path_format_arguments) diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/version.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/version.py similarity index 93% rename from azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/version.py rename to azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/version.py index defea7d097a2..6fd4531cf9ac 100644 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview/version.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "2017-06-01-preview" +VERSION = "2017-10-01" diff --git a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/version.py b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/version.py index 54fdd938c10a..a39916c162ce 100755 --- a/azure-mgmt-containerregistry/azure/mgmt/containerregistry/version.py +++ b/azure-mgmt-containerregistry/azure/mgmt/containerregistry/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.3.1" +VERSION = "1.0.0" diff --git a/azure-mgmt-containerregistry/tests/recordings/test_mgmt_containerregistry_2017_06_01_preview.test_basic_registry.yaml b/azure-mgmt-containerregistry/tests/recordings/test_mgmt_containerregistry.test_classic_registry.yaml similarity index 55% rename from azure-mgmt-containerregistry/tests/recordings/test_mgmt_containerregistry_2017_06_01_preview.test_basic_registry.yaml rename to azure-mgmt-containerregistry/tests/recordings/test_mgmt_containerregistry.test_classic_registry.yaml index 61cb34c7c947..f483389321d5 100644 --- a/azure-mgmt-containerregistry/tests/recordings/test_mgmt_containerregistry_2017_06_01_preview.test_basic_registry.yaml +++ b/azure-mgmt-containerregistry/tests/recordings/test_mgmt_containerregistry.test_classic_registry.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"name": "pyacr5dc119a6", "type": "Microsoft.ContainerRegistry/registries"}' + body: '{"name": "pyacrff1e1477", "type": "Microsoft.ContainerRegistry/registries"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -8,17 +8,17 @@ interactions: Content-Length: ['75'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 - msrest_azure/0.4.11 containerregistrymanagementclient/0.3.1 Azure-SDK-For-Python] + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerRegistry/checkNameAvailability?api-version=2017-06-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerRegistry/checkNameAvailability?api-version=2017-10-01 response: body: {string: '{"nameAvailable":true}'} headers: cache-control: [no-cache] content-length: ['22'] content-type: [application/json; charset=utf-8] - date: ['Thu, 06 Jul 2017 00:30:00 GMT'] + date: ['Fri, 22 Sep 2017 22:19:42 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] @@ -27,87 +27,87 @@ interactions: vary: [Accept-Encoding] status: {code: 200, message: OK} - request: - body: 'b''b\''b\\\''{"location": "eastus", "sku": {"name": "Basic"}, "properties": - {"adminUserEnabled": false, "storageAccount": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_basic_registry5dc119a6/providers/Microsoft.Storage/storageAccounts/pyacrstorage5dc119a6"}}}\\\''\''''' + body: 'b''b\''b\\\''{"location": "westcentralus", "sku": {"name": "Classic"}, + "properties": {"adminUserEnabled": false, "storageAccount": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_classic_registryff1e1477/providers/Microsoft.Storage/storageAccounts/pyacrff1e1477"}}}\\\''\''''' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['327'] + Content-Length: ['312'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 - msrest_azure/0.4.11 containerregistrymanagementclient/0.3.1 Azure-SDK-For-Python] + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_basic_registry5dc119a6/providers/Microsoft.ContainerRegistry/registries/pyacr5dc119a6?api-version=2017-06-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_classic_registryff1e1477/providers/Microsoft.ContainerRegistry/registries/pyacrff1e1477?api-version=2017-10-01 response: - body: {string: '{"sku":{"name":"Basic","tier":"Basic"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_basic_registry5dc119a6/providers/Microsoft.ContainerRegistry/registries/pyacr5dc119a6","name":"pyacr5dc119a6","location":"eastus","tags":{},"properties":{"loginServer":"pyacr5dc119a6.azurecr.io","creationDate":"2017-07-06T00:30:04.1311124Z","provisioningState":"Succeeded","adminUserEnabled":false,"storageAccount":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_basic_registry5dc119a6/providers/Microsoft.Storage/storageAccounts/pyacrstorage5dc119a6"}}}'} + body: {string: '{"sku":{"name":"Classic","tier":"Classic"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_classic_registryff1e1477/providers/Microsoft.ContainerRegistry/registries/pyacrff1e1477","name":"pyacrff1e1477","location":"westcentralus","tags":{},"properties":{"loginServer":"pyacrff1e1477.azurecr.io","creationDate":"2017-09-22T22:19:44.4779692Z","provisioningState":"Succeeded","adminUserEnabled":false,"storageAccount":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_classic_registryff1e1477/providers/Microsoft.Storage/storageAccounts/pyacrff1e1477"}}}'} headers: cache-control: [no-cache] - content-length: ['744'] + content-length: ['714'] content-type: [application/json; charset=utf-8] - date: ['Thu, 06 Jul 2017 00:30:03 GMT'] + date: ['Fri, 22 Sep 2017 22:20:12 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1195'] status: {code: 200, message: OK} - request: - body: '{"properties": {"adminUserEnabled": true}}' + body: null headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['42'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 - msrest_azure/0.4.11 containerregistrymanagementclient/0.3.1 Azure-SDK-For-Python] + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] - method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_basic_registry5dc119a6/providers/Microsoft.ContainerRegistry/registries/pyacr5dc119a6?api-version=2017-06-01-preview + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_classic_registryff1e1477/providers/Microsoft.ContainerRegistry/registries?api-version=2017-10-01 response: - body: {string: '{"sku":{"name":"Basic","tier":"Basic"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_basic_registry5dc119a6/providers/Microsoft.ContainerRegistry/registries/pyacr5dc119a6","name":"pyacr5dc119a6","location":"eastus","tags":{},"properties":{"loginServer":"pyacr5dc119a6.azurecr.io","creationDate":"2017-07-06T00:30:04.1311124Z","provisioningState":"Succeeded","adminUserEnabled":true,"storageAccount":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_basic_registry5dc119a6/providers/Microsoft.Storage/storageAccounts/pyacrstorage5dc119a6"}}}'} + body: {string: '{"value":[{"sku":{"name":"Classic","tier":"Classic"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_classic_registryff1e1477/providers/Microsoft.ContainerRegistry/registries/pyacrff1e1477","name":"pyacrff1e1477","location":"westcentralus","tags":{},"properties":{"loginServer":"pyacrff1e1477.azurecr.io","creationDate":"2017-09-22T22:19:44.4779692Z","provisioningState":"Succeeded","adminUserEnabled":false,"storageAccount":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_classic_registryff1e1477/providers/Microsoft.Storage/storageAccounts/pyacrff1e1477"}}}]}'} headers: cache-control: [no-cache] - content-length: ['743'] + content-length: ['726'] content-type: [application/json; charset=utf-8] - date: ['Thu, 06 Jul 2017 00:30:05 GMT'] + date: ['Fri, 22 Sep 2017 22:20:13 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1196'] status: {code: 200, message: OK} - request: - body: null + body: '{"tags": {"key": "value"}, "properties": {"adminUserEnabled": true}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] + Content-Length: ['68'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 - msrest_azure/0.4.11 containerregistrymanagementclient/0.3.1 Azure-SDK-For-Python] + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_basic_registry5dc119a6/providers/Microsoft.ContainerRegistry/registries/pyacr5dc119a6?api-version=2017-06-01-preview + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_classic_registryff1e1477/providers/Microsoft.ContainerRegistry/registries/pyacrff1e1477?api-version=2017-10-01 response: - body: {string: '{"sku":{"name":"Basic","tier":"Basic"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_basic_registry5dc119a6/providers/Microsoft.ContainerRegistry/registries/pyacr5dc119a6","name":"pyacr5dc119a6","location":"eastus","tags":{},"properties":{"loginServer":"pyacr5dc119a6.azurecr.io","creationDate":"2017-07-06T00:30:05.3634346Z","provisioningState":"Succeeded","adminUserEnabled":true,"storageAccount":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_basic_registry5dc119a6/providers/Microsoft.Storage/storageAccounts/pyacrstorage5dc119a6"}}}'} + body: {string: '{"sku":{"name":"Classic","tier":"Classic"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_classic_registryff1e1477/providers/Microsoft.ContainerRegistry/registries/pyacrff1e1477","name":"pyacrff1e1477","location":"westcentralus","tags":{"key":"value"},"properties":{"loginServer":"pyacrff1e1477.azurecr.io","creationDate":"2017-09-22T22:19:44.4779692Z","provisioningState":"Succeeded","adminUserEnabled":true,"storageAccount":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_classic_registryff1e1477/providers/Microsoft.Storage/storageAccounts/pyacrff1e1477"}}}'} headers: cache-control: [no-cache] - content-length: ['743'] + content-length: ['726'] content-type: [application/json; charset=utf-8] - date: ['Thu, 06 Jul 2017 00:30:06 GMT'] + date: ['Fri, 22 Sep 2017 22:20:15 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 200, message: OK} - request: body: null @@ -117,17 +117,17 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 - msrest_azure/0.4.11 containerregistrymanagementclient/0.3.1 Azure-SDK-For-Python] + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_basic_registry5dc119a6/providers/Microsoft.ContainerRegistry/registries?api-version=2017-06-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_classic_registryff1e1477/providers/Microsoft.ContainerRegistry/registries/pyacrff1e1477?api-version=2017-10-01 response: - body: {string: '{"value":[{"sku":{"name":"Basic","tier":"Basic"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_basic_registry5dc119a6/providers/Microsoft.ContainerRegistry/registries/pyacr5dc119a6","name":"pyacr5dc119a6","location":"eastus","tags":{},"properties":{"loginServer":"pyacr5dc119a6.azurecr.io","creationDate":"2017-07-06T00:30:05.3634346Z","provisioningState":"Succeeded","adminUserEnabled":true,"storageAccount":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_basic_registry5dc119a6/providers/Microsoft.Storage/storageAccounts/pyacrstorage5dc119a6"}}}]}'} + body: {string: '{"sku":{"name":"Classic","tier":"Classic"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_classic_registryff1e1477/providers/Microsoft.ContainerRegistry/registries/pyacrff1e1477","name":"pyacrff1e1477","location":"westcentralus","tags":{"key":"value"},"properties":{"loginServer":"pyacrff1e1477.azurecr.io","creationDate":"2017-09-22T22:19:44.4779692Z","provisioningState":"Succeeded","adminUserEnabled":true,"storageAccount":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_classic_registryff1e1477/providers/Microsoft.Storage/storageAccounts/pyacrff1e1477"}}}'} headers: cache-control: [no-cache] - content-length: ['755'] + content-length: ['726'] content-type: [application/json; charset=utf-8] - date: ['Thu, 06 Jul 2017 00:30:07 GMT'] + date: ['Fri, 22 Sep 2017 22:20:16 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] @@ -144,24 +144,24 @@ interactions: Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 - msrest_azure/0.4.11 containerregistrymanagementclient/0.3.1 Azure-SDK-For-Python] + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_basic_registry5dc119a6/providers/Microsoft.ContainerRegistry/registries/pyacr5dc119a6/listCredentials?api-version=2017-06-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_classic_registryff1e1477/providers/Microsoft.ContainerRegistry/registries/pyacrff1e1477/listCredentials?api-version=2017-10-01 response: - body: {string: '{"username":"pyacr5dc119a6","passwords":[{"name":"password","value":"mN=Z0HKE7cwJiqzIH/lC7=MjgG6M=09l"},{"name":"password2","value":"/=++ua++/R/=X=/AG=/=SisQPgQf=UTY"}]}'} + body: {string: '{"username":"pyacrff1e1477","passwords":[{"name":"password","value":"/8v2uD7QF6tzuZQHjmTSIMnjJG1BWGo/"},{"name":"password2","value":"7Ed+VFm=LMcP2lvTg3/MM3sma0NC3D0d"}]}'} headers: cache-control: [no-cache] content-length: ['169'] content-type: [application/json; charset=utf-8] - date: ['Thu, 06 Jul 2017 00:30:07 GMT'] + date: ['Fri, 22 Sep 2017 22:20:17 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: body: '{"name": "password"}' @@ -172,24 +172,24 @@ interactions: Content-Length: ['20'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 - msrest_azure/0.4.11 containerregistrymanagementclient/0.3.1 Azure-SDK-For-Python] + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_basic_registry5dc119a6/providers/Microsoft.ContainerRegistry/registries/pyacr5dc119a6/regenerateCredential?api-version=2017-06-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_classic_registryff1e1477/providers/Microsoft.ContainerRegistry/registries/pyacrff1e1477/regenerateCredential?api-version=2017-10-01 response: - body: {string: '{"username":"pyacr5dc119a6","passwords":[{"name":"password","value":"u2zjy/6pNxAlBeek26UkLNIeqUY=eCKW"},{"name":"password2","value":"/=++ua++/R/=X=/AG=/=SisQPgQf=UTY"}]}'} + body: {string: '{"username":"pyacrff1e1477","passwords":[{"name":"password","value":"=R=muud+===2G3nY82kSs=MEydSDKL9f"},{"name":"password2","value":"7Ed+VFm=LMcP2lvTg3/MM3sma0NC3D0d"}]}'} headers: cache-control: [no-cache] content-length: ['169'] content-type: [application/json; charset=utf-8] - date: ['Thu, 06 Jul 2017 00:30:09 GMT'] + date: ['Fri, 22 Sep 2017 22:20:19 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: body: null @@ -200,20 +200,20 @@ interactions: Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 - msrest_azure/0.4.11 containerregistrymanagementclient/0.3.1 Azure-SDK-For-Python] + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_basic_registry5dc119a6/providers/Microsoft.ContainerRegistry/registries/pyacr5dc119a6?api-version=2017-06-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_classic_registryff1e1477/providers/Microsoft.ContainerRegistry/registries/pyacrff1e1477?api-version=2017-10-01 response: body: {string: ''} headers: cache-control: [no-cache] content-length: ['0'] - date: ['Thu, 06 Jul 2017 00:30:12 GMT'] + date: ['Fri, 22 Sep 2017 22:20:22 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] strict-transport-security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} version: 1 diff --git a/azure-mgmt-containerregistry/tests/recordings/test_mgmt_containerregistry_2017_06_01_preview.test_managed_registry.yaml b/azure-mgmt-containerregistry/tests/recordings/test_mgmt_containerregistry.test_managed_registry.yaml similarity index 62% rename from azure-mgmt-containerregistry/tests/recordings/test_mgmt_containerregistry_2017_06_01_preview.test_managed_registry.yaml rename to azure-mgmt-containerregistry/tests/recordings/test_mgmt_containerregistry.test_managed_registry.yaml index b8429d25cbf3..72bb841218c6 100644 --- a/azure-mgmt-containerregistry/tests/recordings/test_mgmt_containerregistry_2017_06_01_preview.test_managed_registry.yaml +++ b/azure-mgmt-containerregistry/tests/recordings/test_mgmt_containerregistry.test_managed_registry.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"name": "pyacr91ce1a71", "type": "Microsoft.ContainerRegistry/registries"}' + body: '{"name": "pyacrfe331462", "type": "Microsoft.ContainerRegistry/registries"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -8,17 +8,17 @@ interactions: Content-Length: ['75'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 - msrest_azure/0.4.11 containerregistrymanagementclient/0.3.1 Azure-SDK-For-Python] + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerRegistry/checkNameAvailability?api-version=2017-06-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerRegistry/checkNameAvailability?api-version=2017-10-01 response: body: {string: '{"nameAvailable":true}'} headers: cache-control: [no-cache] content-length: ['22'] content-type: [application/json; charset=utf-8] - date: ['Thu, 06 Jul 2017 00:30:20 GMT'] + date: ['Fri, 22 Sep 2017 22:20:30 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] @@ -27,26 +27,26 @@ interactions: vary: [Accept-Encoding] status: {code: 200, message: OK} - request: - body: '{"location": "eastus", "sku": {"name": "Managed_Standard"}, "properties": + body: '{"location": "westcentralus", "sku": {"name": "Managed_Premium"}, "properties": {"adminUserEnabled": false}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['102'] + Content-Length: ['108'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 - msrest_azure/0.4.11 containerregistrymanagementclient/0.3.1 Azure-SDK-For-Python] + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_managed_registry91ce1a71/providers/Microsoft.ContainerRegistry/registries/pyacr91ce1a71?api-version=2017-06-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_managed_registryfe331462/providers/Microsoft.ContainerRegistry/registries/pyacrfe331462?api-version=2017-10-01 response: - body: {string: '{"sku":{"name":"Managed_Standard","tier":"Managed"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_managed_registry91ce1a71/providers/Microsoft.ContainerRegistry/registries/pyacr91ce1a71","name":"pyacr91ce1a71","location":"eastus","tags":{},"properties":{"loginServer":"pyacr91ce1a71.azurecr.io","creationDate":"2017-07-06T00:30:24.156605Z","provisioningState":"Succeeded","adminUserEnabled":false}}'} + body: {string: '{"sku":{"name":"Managed_Premium","tier":"Managed"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_managed_registryfe331462/providers/Microsoft.ContainerRegistry/registries/pyacrfe331462","name":"pyacrfe331462","location":"westcentralus","tags":{},"properties":{"loginServer":"pyacrfe331462.azurecr.io","creationDate":"2017-09-22T22:20:31.9498551Z","provisioningState":"Succeeded","adminUserEnabled":false}}'} headers: cache-control: [no-cache] - content-length: ['525'] + content-length: ['513'] content-type: [application/json; charset=utf-8] - date: ['Thu, 06 Jul 2017 00:30:23 GMT'] + date: ['Fri, 22 Sep 2017 22:20:33 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] @@ -56,58 +56,58 @@ interactions: x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: - body: '{"properties": {"adminUserEnabled": true}}' + body: null headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['42'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 - msrest_azure/0.4.11 containerregistrymanagementclient/0.3.1 Azure-SDK-For-Python] + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] - method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_managed_registry91ce1a71/providers/Microsoft.ContainerRegistry/registries/pyacr91ce1a71?api-version=2017-06-01-preview + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_managed_registryfe331462/providers/Microsoft.ContainerRegistry/registries?api-version=2017-10-01 response: - body: {string: '{"sku":{"name":"Managed_Standard","tier":"Managed"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_managed_registry91ce1a71/providers/Microsoft.ContainerRegistry/registries/pyacr91ce1a71","name":"pyacr91ce1a71","location":"eastus","tags":{},"properties":{"loginServer":"pyacr91ce1a71.azurecr.io","creationDate":"2017-07-06T00:30:24.156605Z","provisioningState":"Succeeded","adminUserEnabled":true}}'} + body: {string: '{"value":[{"sku":{"name":"Managed_Premium","tier":"Managed"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_managed_registryfe331462/providers/Microsoft.ContainerRegistry/registries/pyacrfe331462","name":"pyacrfe331462","location":"westcentralus","tags":{},"properties":{"loginServer":"pyacrfe331462.azurecr.io","creationDate":"2017-09-22T22:20:31.9498551Z","provisioningState":"Succeeded","adminUserEnabled":false}}]}'} headers: cache-control: [no-cache] - content-length: ['524'] + content-length: ['525'] content-type: [application/json; charset=utf-8] - date: ['Thu, 06 Jul 2017 00:30:24 GMT'] + date: ['Fri, 22 Sep 2017 22:20:34 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 200, message: OK} - request: - body: null + body: '{"tags": {"key": "value"}, "properties": {"adminUserEnabled": true}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] + Content-Length: ['68'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 - msrest_azure/0.4.11 containerregistrymanagementclient/0.3.1 Azure-SDK-For-Python] + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_managed_registry91ce1a71/providers/Microsoft.ContainerRegistry/registries/pyacr91ce1a71/listUsages?api-version=2017-06-01-preview + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_managed_registryfe331462/providers/Microsoft.ContainerRegistry/registries/pyacrfe331462?api-version=2017-10-01 response: - body: {string: '{"value":[{"name":"Size","limit":107374182400,"currentValue":0,"unit":"Bytes"},{"name":"Webhooks","limit":10,"currentValue":0,"unit":"Count"}]}'} + body: {string: '{"sku":{"name":"Managed_Premium","tier":"Managed"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_managed_registryfe331462/providers/Microsoft.ContainerRegistry/registries/pyacrfe331462","name":"pyacrfe331462","location":"westcentralus","tags":{"key":"value"},"properties":{"loginServer":"pyacrfe331462.azurecr.io","creationDate":"2017-09-22T22:20:31.9498551Z","provisioningState":"Succeeded","adminUserEnabled":true}}'} headers: cache-control: [no-cache] - content-length: ['143'] + content-length: ['525'] content-type: [application/json; charset=utf-8] - date: ['Thu, 06 Jul 2017 00:30:25 GMT'] + date: ['Fri, 22 Sep 2017 22:20:35 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: body: null @@ -117,17 +117,17 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 - msrest_azure/0.4.11 containerregistrymanagementclient/0.3.1 Azure-SDK-For-Python] + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_managed_registry91ce1a71/providers/Microsoft.ContainerRegistry/registries/pyacr91ce1a71?api-version=2017-06-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_managed_registryfe331462/providers/Microsoft.ContainerRegistry/registries/pyacrfe331462?api-version=2017-10-01 response: - body: {string: '{"sku":{"name":"Managed_Standard","tier":"Managed"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_managed_registry91ce1a71/providers/Microsoft.ContainerRegistry/registries/pyacr91ce1a71","name":"pyacr91ce1a71","location":"eastus","tags":{},"properties":{"loginServer":"pyacr91ce1a71.azurecr.io","creationDate":"2017-07-06T00:30:24.8178817Z","provisioningState":"Succeeded","adminUserEnabled":true}}'} + body: {string: '{"sku":{"name":"Managed_Premium","tier":"Managed"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_managed_registryfe331462/providers/Microsoft.ContainerRegistry/registries/pyacrfe331462","name":"pyacrfe331462","location":"westcentralus","tags":{"key":"value"},"properties":{"loginServer":"pyacrfe331462.azurecr.io","creationDate":"2017-09-22T22:20:31.9498551Z","provisioningState":"Succeeded","adminUserEnabled":true}}'} headers: cache-control: [no-cache] content-length: ['525'] content-type: [application/json; charset=utf-8] - date: ['Thu, 06 Jul 2017 00:30:25 GMT'] + date: ['Fri, 22 Sep 2017 22:20:37 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] @@ -141,81 +141,81 @@ interactions: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] + Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 - msrest_azure/0.4.11 containerregistrymanagementclient/0.3.1 Azure-SDK-For-Python] + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_managed_registry91ce1a71/providers/Microsoft.ContainerRegistry/registries?api-version=2017-06-01-preview + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_managed_registryfe331462/providers/Microsoft.ContainerRegistry/registries/pyacrfe331462/listCredentials?api-version=2017-10-01 response: - body: {string: '{"value":[{"sku":{"name":"Managed_Standard","tier":"Managed"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_managed_registry91ce1a71/providers/Microsoft.ContainerRegistry/registries/pyacr91ce1a71","name":"pyacr91ce1a71","location":"eastus","tags":{},"properties":{"loginServer":"pyacr91ce1a71.azurecr.io","creationDate":"2017-07-06T00:30:24.8178817Z","provisioningState":"Succeeded","adminUserEnabled":true}}]}'} + body: {string: '{"username":"pyacrfe331462","passwords":[{"name":"password","value":"Qe+8o/aFpcNBbE=+NL//8BrCGKx+4uOq"},{"name":"password2","value":"/A/=+/jH=3TO+C+KOI=8/CsN/9vEQZJw"}]}'} headers: cache-control: [no-cache] - content-length: ['537'] + content-length: ['169'] content-type: [application/json; charset=utf-8] - date: ['Thu, 06 Jul 2017 00:30:26 GMT'] + date: ['Fri, 22 Sep 2017 22:20:37 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 200, message: OK} - request: - body: null + body: '{"name": "password"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['0'] + Content-Length: ['20'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 - msrest_azure/0.4.11 containerregistrymanagementclient/0.3.1 Azure-SDK-For-Python] + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_managed_registry91ce1a71/providers/Microsoft.ContainerRegistry/registries/pyacr91ce1a71/listCredentials?api-version=2017-06-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_managed_registryfe331462/providers/Microsoft.ContainerRegistry/registries/pyacrfe331462/regenerateCredential?api-version=2017-10-01 response: - body: {string: '{"username":"pyacr91ce1a71","passwords":[{"name":"password","value":"+++DA==Dvd6///+r+AT0ez5=KS+33VHs"},{"name":"password2","value":"=e++=ofzkWMj/SxA1EGtnQMW4/nOEecQ"}]}'} + body: {string: '{"username":"pyacrfe331462","passwords":[{"name":"password","value":"//=3L=5C+/qA7=l52GY/R+6uRwDc/eB9"},{"name":"password2","value":"/A/=+/jH=3TO+C+KOI=8/CsN/9vEQZJw"}]}'} headers: cache-control: [no-cache] content-length: ['169'] content-type: [application/json; charset=utf-8] - date: ['Thu, 06 Jul 2017 00:30:27 GMT'] + date: ['Fri, 22 Sep 2017 22:20:38 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1196'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: - body: '{"name": "password"}' + body: null headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['20'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 - msrest_azure/0.4.11 containerregistrymanagementclient/0.3.1 Azure-SDK-For-Python] + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_managed_registry91ce1a71/providers/Microsoft.ContainerRegistry/registries/pyacr91ce1a71/regenerateCredential?api-version=2017-06-01-preview + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_managed_registryfe331462/providers/Microsoft.ContainerRegistry/registries/pyacrfe331462/listUsages?api-version=2017-10-01 response: - body: {string: '{"username":"pyacr91ce1a71","passwords":[{"name":"password","value":"I8rz=+dTXVLhauEXSeq0qOh1tjRPlcpG"},{"name":"password2","value":"=e++=ofzkWMj/SxA1EGtnQMW4/nOEecQ"}]}'} + body: {string: '{"value":[{"name":"Size","limit":536870912000,"currentValue":0,"unit":"Bytes"},{"name":"Webhooks","limit":100,"currentValue":0,"unit":"Count"}]}'} headers: cache-control: [no-cache] - content-length: ['169'] + content-length: ['144'] content-type: [application/json; charset=utf-8] - date: ['Thu, 06 Jul 2017 00:30:28 GMT'] + date: ['Fri, 22 Sep 2017 22:20:40 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] status: {code: 200, message: OK} - request: body: null @@ -226,20 +226,20 @@ interactions: Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 - msrest_azure/0.4.11 containerregistrymanagementclient/0.3.1 Azure-SDK-For-Python] + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_managed_registry91ce1a71/providers/Microsoft.ContainerRegistry/registries/pyacr91ce1a71?api-version=2017-06-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_managed_registryfe331462/providers/Microsoft.ContainerRegistry/registries/pyacrfe331462?api-version=2017-10-01 response: body: {string: ''} headers: cache-control: [no-cache] content-length: ['0'] - date: ['Thu, 06 Jul 2017 00:30:31 GMT'] + date: ['Fri, 22 Sep 2017 22:20:42 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] strict-transport-security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1195'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} version: 1 diff --git a/azure-mgmt-containerregistry/tests/recordings/test_mgmt_containerregistry.test_replication.yaml b/azure-mgmt-containerregistry/tests/recordings/test_mgmt_containerregistry.test_replication.yaml new file mode 100644 index 000000000000..3ce947e05534 --- /dev/null +++ b/azure-mgmt-containerregistry/tests/recordings/test_mgmt_containerregistry.test_replication.yaml @@ -0,0 +1,291 @@ +interactions: +- request: + body: '{"location": "westcentralus", "sku": {"name": "Managed_Premium"}, "properties": + {"adminUserEnabled": false}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['108'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_replication9dee1257/providers/Microsoft.ContainerRegistry/registries/pyacr9dee1257?api-version=2017-10-01 + response: + body: {string: '{"sku":{"name":"Managed_Premium","tier":"Managed"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_replication9dee1257/providers/Microsoft.ContainerRegistry/registries/pyacr9dee1257","name":"pyacr9dee1257","location":"westcentralus","tags":{},"properties":{"loginServer":"pyacr9dee1257.azurecr.io","creationDate":"2017-09-22T22:20:48.8274627Z","provisioningState":"Succeeded","adminUserEnabled":false}}'} + headers: + cache-control: [no-cache] + content-length: ['508'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 22 Sep 2017 22:20:51 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 200, message: OK} +- request: + body: '{"location": "southcentralus"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['30'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_replication9dee1257/providers/Microsoft.ContainerRegistry/registries/pyacr9dee1257/replications/southcentralus?api-version=2017-10-01 + response: + body: {string: '{"type":"Microsoft.ContainerRegistry/registries/replications","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_replication9dee1257/providers/Microsoft.ContainerRegistry/registries/pyacr9dee1257/replications/southcentralus","name":"southcentralus","location":"southcentralus","tags":{},"properties":{"provisioningState":"Creating","status":{"timestamp":"2017-09-22T22:20:54.48902Z"}}}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_replication9dee1257/providers/Microsoft.ContainerRegistry/registries/pyacr9dee1257/replications/southcentralus/operationStatuses/replications-d98c077f-5435-4917-a62a-1724bf37e384?api-version=2017-10-01'] + cache-control: [no-cache] + content-length: ['440'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 22 Sep 2017 22:20:54 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_replication9dee1257/providers/Microsoft.ContainerRegistry/registries/pyacr9dee1257/replications/southcentralus/operationStatuses/replications-d98c077f-5435-4917-a62a-1724bf37e384?api-version=2017-10-01 + response: + body: {string: '{"status":"Succeeded"}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_replication9dee1257/providers/Microsoft.ContainerRegistry/registries/pyacr9dee1257/replications/southcentralus/operationStatuses/replications-d98c077f-5435-4917-a62a-1724bf37e384?api-version=2017-10-01'] + cache-control: [no-cache] + content-length: ['22'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 22 Sep 2017 22:21:05 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_replication9dee1257/providers/Microsoft.ContainerRegistry/registries/pyacr9dee1257/replications/southcentralus?api-version=2017-10-01 + response: + body: {string: '{"type":"Microsoft.ContainerRegistry/registries/replications","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_replication9dee1257/providers/Microsoft.ContainerRegistry/registries/pyacr9dee1257/replications/southcentralus","name":"southcentralus","location":"southcentralus","tags":{},"properties":{"provisioningState":"Succeeded","status":{"displayStatus":"Ready","timestamp":"2017-09-22T22:21:06.3384011Z"}}}'} + headers: + cache-control: [no-cache] + content-length: ['467'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 22 Sep 2017 22:21:07 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_replication9dee1257/providers/Microsoft.ContainerRegistry/registries/pyacr9dee1257/replications?api-version=2017-10-01 + response: + body: {string: '{"value":[{"type":"Microsoft.ContainerRegistry/registries/replications","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_replication9dee1257/providers/Microsoft.ContainerRegistry/registries/pyacr9dee1257/replications/southcentralus","name":"southcentralus","location":"southcentralus","tags":{},"properties":{"provisioningState":"Succeeded","status":{"displayStatus":"Ready","timestamp":"2017-09-22T22:21:06.3384011Z"}}},{"type":"Microsoft.ContainerRegistry/registries/replications","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_replication9dee1257/providers/Microsoft.ContainerRegistry/registries/pyacr9dee1257/replications/westcentralus","name":"westcentralus","location":"westcentralus","tags":{},"properties":{"provisioningState":"Succeeded","status":{"displayStatus":"Ready","timestamp":"2017-09-22T22:20:58.2891323Z"}}}]}'} + headers: + cache-control: [no-cache] + content-length: ['944'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 22 Sep 2017 22:21:08 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: '{"tags": {"key": "value"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['26'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] + accept-language: [en-US] + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_replication9dee1257/providers/Microsoft.ContainerRegistry/registries/pyacr9dee1257/replications/southcentralus?api-version=2017-10-01 + response: + body: {string: '{"type":"Microsoft.ContainerRegistry/registries/replications","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_replication9dee1257/providers/Microsoft.ContainerRegistry/registries/pyacr9dee1257/replications/southcentralus","name":"southcentralus","location":"southcentralus","tags":{"key":"value"},"properties":{"provisioningState":"Succeeded","status":{"displayStatus":"Ready","timestamp":"2017-09-22T22:21:06.3384011Z"}}}'} + headers: + cache-control: [no-cache] + content-length: ['480'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 22 Sep 2017 22:21:10 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_replication9dee1257/providers/Microsoft.ContainerRegistry/registries/pyacr9dee1257/replications/southcentralus?api-version=2017-10-01 + response: + body: {string: '{"type":"Microsoft.ContainerRegistry/registries/replications","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_replication9dee1257/providers/Microsoft.ContainerRegistry/registries/pyacr9dee1257/replications/southcentralus","name":"southcentralus","location":"southcentralus","tags":{"key":"value"},"properties":{"provisioningState":"Succeeded","status":{"displayStatus":"Ready","timestamp":"2017-09-22T22:21:06.3384011Z"}}}'} + headers: + cache-control: [no-cache] + content-length: ['480'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 22 Sep 2017 22:21:11 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_replication9dee1257/providers/Microsoft.ContainerRegistry/registries/pyacr9dee1257/replications/southcentralus?api-version=2017-10-01 + response: + body: {string: 'null'} + headers: + cache-control: [no-cache] + content-length: ['4'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 22 Sep 2017 22:21:12 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerRegistry/locations/southcentralus/operationResults/replications-37d61719-d0d0-4313-af36-8a035d34eb9a?api-version=2017-10-01'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerRegistry/locations/southcentralus/operationResults/replications-37d61719-d0d0-4313-af36-8a035d34eb9a?api-version=2017-10-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Fri, 22 Sep 2017 22:21:23 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_replication9dee1257/providers/Microsoft.ContainerRegistry/registries/pyacr9dee1257?api-version=2017-10-01 + response: + body: {string: 'null'} + headers: + cache-control: [no-cache] + content-length: ['4'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 22 Sep 2017 22:21:29 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerRegistry/locations/westcentralus/operationResults/registries-7dbf47ab-7815-4de3-ad49-4c9e3e385967?api-version=2017-10-01'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-ms-ratelimit-remaining-subscription-writes: ['1195'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerRegistry/locations/westcentralus/operationResults/registries-7dbf47ab-7815-4de3-ad49-4c9e3e385967?api-version=2017-10-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Fri, 22 Sep 2017 22:21:39 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + status: {code: 200, message: OK} +version: 1 diff --git a/azure-mgmt-containerregistry/tests/recordings/test_mgmt_containerregistry_2017_06_01_preview.test_webhook.yaml b/azure-mgmt-containerregistry/tests/recordings/test_mgmt_containerregistry.test_webhook.yaml similarity index 65% rename from azure-mgmt-containerregistry/tests/recordings/test_mgmt_containerregistry_2017_06_01_preview.test_webhook.yaml rename to azure-mgmt-containerregistry/tests/recordings/test_mgmt_containerregistry.test_webhook.yaml index cc0d3d8fd66b..f499dbee920d 100644 --- a/azure-mgmt-containerregistry/tests/recordings/test_mgmt_containerregistry_2017_06_01_preview.test_webhook.yaml +++ b/azure-mgmt-containerregistry/tests/recordings/test_mgmt_containerregistry.test_webhook.yaml @@ -1,25 +1,25 @@ interactions: - request: - body: '{"location": "eastus", "sku": {"name": "Managed_Standard"}, "properties": + body: '{"location": "westcentralus", "sku": {"name": "Managed_Premium"}, "properties": {"adminUserEnabled": false}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['102'] + Content-Length: ['108'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 - msrest_azure/0.4.11 containerregistrymanagementclient/0.3.1 Azure-SDK-For-Python] + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_webhookb42916bb/providers/Microsoft.ContainerRegistry/registries/pyacrb42916bb?api-version=2017-06-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_webhook572410ac/providers/Microsoft.ContainerRegistry/registries/pyacr572410ac?api-version=2017-10-01 response: - body: {string: '{"sku":{"name":"Managed_Standard","tier":"Managed"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_webhookb42916bb/providers/Microsoft.ContainerRegistry/registries/pyacrb42916bb","name":"pyacrb42916bb","location":"eastus","tags":{},"properties":{"loginServer":"pyacrb42916bb.azurecr.io","creationDate":"2017-07-06T00:30:38.9681287Z","provisioningState":"Succeeded","adminUserEnabled":false}}'} + body: {string: '{"sku":{"name":"Managed_Premium","tier":"Managed"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_webhook572410ac/providers/Microsoft.ContainerRegistry/registries/pyacr572410ac","name":"pyacr572410ac","location":"westcentralus","tags":{},"properties":{"loginServer":"pyacr572410ac.azurecr.io","creationDate":"2017-09-22T22:21:48.508157Z","provisioningState":"Succeeded","adminUserEnabled":false}}'} headers: cache-control: [no-cache] - content-length: ['517'] + content-length: ['503'] content-type: [application/json; charset=utf-8] - date: ['Thu, 06 Jul 2017 00:30:38 GMT'] + date: ['Fri, 22 Sep 2017 22:21:50 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] @@ -29,87 +29,88 @@ interactions: x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 200, message: OK} - request: - body: '{"location": "eastus", "properties": {"serviceUri": "http://www.microsoft.com", + body: '{"location": "westcentralus", "properties": {"serviceUri": "http://www.microsoft.com", "actions": ["push"]}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['101'] + Content-Length: ['108'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 - msrest_azure/0.4.11 containerregistrymanagementclient/0.3.1 Azure-SDK-For-Python] + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_webhookb42916bb/providers/Microsoft.ContainerRegistry/registries/pyacrb42916bb/webhooks/pyacrwebhookb42916bb?api-version=2017-06-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_webhook572410ac/providers/Microsoft.ContainerRegistry/registries/pyacr572410ac/webhooks/pyacr572410ac?api-version=2017-10-01 response: - body: {string: '{"type":"Microsoft.ContainerRegistry/registries/webhooks","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_webhookb42916bb/providers/Microsoft.ContainerRegistry/registries/pyacrb42916bb/webhooks/pyacrwebhookb42916bb","name":"pyacrwebhookb42916bb","location":"eastus","tags":{},"properties":{"status":"enabled","actions":["push"],"provisioningState":"Succeeded"}}'} + body: {string: '{"type":"Microsoft.ContainerRegistry/registries/webhooks","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_webhook572410ac/providers/Microsoft.ContainerRegistry/registries/pyacr572410ac/webhooks/pyacr572410ac","name":"pyacr572410ac","location":"westcentralus","tags":{},"properties":{"status":"enabled","actions":["push"],"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] - content-length: ['438'] + content-length: ['412'] content-type: [application/json; charset=utf-8] - date: ['Thu, 06 Jul 2017 00:30:41 GMT'] + date: ['Fri, 22 Sep 2017 22:21:52 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: - body: '{"properties": {"customHeaders": {"key": "value"}, "scope": "hello-world"}}' + body: null headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['75'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 - msrest_azure/0.4.11 containerregistrymanagementclient/0.3.1 Azure-SDK-For-Python] + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] - method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_webhookb42916bb/providers/Microsoft.ContainerRegistry/registries/pyacrb42916bb/webhooks/pyacrwebhookb42916bb?api-version=2017-06-01-preview + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_webhook572410ac/providers/Microsoft.ContainerRegistry/registries/pyacr572410ac/webhooks?api-version=2017-10-01 response: - body: {string: '{"type":"Microsoft.ContainerRegistry/registries/webhooks","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_webhookb42916bb/providers/Microsoft.ContainerRegistry/registries/pyacrb42916bb/webhooks/pyacrwebhookb42916bb","name":"pyacrwebhookb42916bb","location":"eastus","tags":{},"properties":{"status":"enabled","scope":"hello-world","actions":["push"],"provisioningState":"Succeeded"}}'} + body: {string: '{"value":[{"type":"Microsoft.ContainerRegistry/registries/webhooks","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_webhook572410ac/providers/Microsoft.ContainerRegistry/registries/pyacr572410ac/webhooks/pyacr572410ac","name":"pyacr572410ac","location":"westcentralus","tags":{},"properties":{"status":"enabled","actions":["push"],"provisioningState":"Succeeded"}}]}'} headers: cache-control: [no-cache] - content-length: ['460'] + content-length: ['424'] content-type: [application/json; charset=utf-8] - date: ['Thu, 06 Jul 2017 00:30:42 GMT'] + date: ['Fri, 22 Sep 2017 22:21:52 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1196'] status: {code: 200, message: OK} - request: - body: null + body: '{"tags": {"key": "value"}, "properties": {"customHeaders": {"key": "value"}, + "scope": "hello-world"}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] + Content-Length: ['101'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 - msrest_azure/0.4.11 containerregistrymanagementclient/0.3.1 Azure-SDK-For-Python] + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_webhookb42916bb/providers/Microsoft.ContainerRegistry/registries/pyacrb42916bb/webhooks/pyacrwebhookb42916bb?api-version=2017-06-01-preview + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_webhook572410ac/providers/Microsoft.ContainerRegistry/registries/pyacr572410ac/webhooks/pyacr572410ac?api-version=2017-10-01 response: - body: {string: '{"type":"Microsoft.ContainerRegistry/registries/webhooks","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_webhookb42916bb/providers/Microsoft.ContainerRegistry/registries/pyacrb42916bb/webhooks/pyacrwebhookb42916bb","name":"pyacrwebhookb42916bb","location":"eastus","tags":{},"properties":{"status":"enabled","scope":"hello-world","actions":["push"],"provisioningState":"Succeeded"}}'} + body: {string: '{"type":"Microsoft.ContainerRegistry/registries/webhooks","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_webhook572410ac/providers/Microsoft.ContainerRegistry/registries/pyacr572410ac/webhooks/pyacr572410ac","name":"pyacr572410ac","location":"westcentralus","tags":{"key":"value"},"properties":{"status":"enabled","scope":"hello-world","actions":["push"],"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] - content-length: ['460'] + content-length: ['447'] content-type: [application/json; charset=utf-8] - date: ['Thu, 06 Jul 2017 00:30:42 GMT'] + date: ['Fri, 22 Sep 2017 22:21:54 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: body: null @@ -117,27 +118,25 @@ interactions: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 - msrest_azure/0.4.11 containerregistrymanagementclient/0.3.1 Azure-SDK-For-Python] + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_webhookb42916bb/providers/Microsoft.ContainerRegistry/registries/pyacrb42916bb/webhooks/pyacrwebhookb42916bb/getCallbackConfig?api-version=2017-06-01-preview + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_webhook572410ac/providers/Microsoft.ContainerRegistry/registries/pyacr572410ac/webhooks/pyacr572410ac?api-version=2017-10-01 response: - body: {string: '{"serviceUri":"http://www.microsoft.com","customHeaders":{"key":"value"}}'} + body: {string: '{"type":"Microsoft.ContainerRegistry/registries/webhooks","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_webhook572410ac/providers/Microsoft.ContainerRegistry/registries/pyacr572410ac/webhooks/pyacr572410ac","name":"pyacr572410ac","location":"westcentralus","tags":{"key":"value"},"properties":{"status":"enabled","scope":"hello-world","actions":["push"],"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] - content-length: ['73'] + content-length: ['447'] content-type: [application/json; charset=utf-8] - date: ['Thu, 06 Jul 2017 00:30:43 GMT'] + date: ['Fri, 22 Sep 2017 22:21:55 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 200, message: OK} - request: body: null @@ -145,25 +144,27 @@ interactions: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] + Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 - msrest_azure/0.4.11 containerregistrymanagementclient/0.3.1 Azure-SDK-For-Python] + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_webhookb42916bb/providers/Microsoft.ContainerRegistry/registries/pyacrb42916bb/webhooks?api-version=2017-06-01-preview + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_webhook572410ac/providers/Microsoft.ContainerRegistry/registries/pyacr572410ac/webhooks/pyacr572410ac/getCallbackConfig?api-version=2017-10-01 response: - body: {string: '{"value":[{"type":"Microsoft.ContainerRegistry/registries/webhooks","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_webhookb42916bb/providers/Microsoft.ContainerRegistry/registries/pyacrb42916bb/webhooks/pyacrwebhookb42916bb","name":"pyacrwebhookb42916bb","location":"eastus","tags":{},"properties":{"status":"enabled","scope":"hello-world","actions":["push"],"provisioningState":"Succeeded"}}]}'} + body: {string: '{"serviceUri":"http://www.microsoft.com","customHeaders":{"key":"value"}}'} headers: cache-control: [no-cache] - content-length: ['472'] + content-length: ['73'] content-type: [application/json; charset=utf-8] - date: ['Thu, 06 Jul 2017 00:30:44 GMT'] + date: ['Fri, 22 Sep 2017 22:21:56 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 200, message: OK} - request: body: null @@ -174,24 +175,24 @@ interactions: Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 - msrest_azure/0.4.11 containerregistrymanagementclient/0.3.1 Azure-SDK-For-Python] + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_webhookb42916bb/providers/Microsoft.ContainerRegistry/registries/pyacrb42916bb/webhooks/pyacrwebhookb42916bb/ping?api-version=2017-06-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_webhook572410ac/providers/Microsoft.ContainerRegistry/registries/pyacr572410ac/webhooks/pyacr572410ac/ping?api-version=2017-10-01 response: - body: {string: '{"id":"97dead1a5d2842f68084ebac6c4ec6fa"}'} + body: {string: '{"id":"3c519219-4c43-41cc-a8bb-7a589626712a"}'} headers: cache-control: [no-cache] - content-length: ['41'] + content-length: ['45'] content-type: [application/json; charset=utf-8] - date: ['Thu, 06 Jul 2017 00:30:45 GMT'] + date: ['Fri, 22 Sep 2017 22:21:57 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1196'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: body: null @@ -202,21 +203,21 @@ interactions: Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 - msrest_azure/0.4.11 containerregistrymanagementclient/0.3.1 Azure-SDK-For-Python] + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_webhookb42916bb/providers/Microsoft.ContainerRegistry/registries/pyacrb42916bb/webhooks/pyacrwebhookb42916bb?api-version=2017-06-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_webhook572410ac/providers/Microsoft.ContainerRegistry/registries/pyacr572410ac/webhooks/pyacr572410ac?api-version=2017-10-01 response: body: {string: ''} headers: cache-control: [no-cache] content-length: ['0'] - date: ['Thu, 06 Jul 2017 00:30:47 GMT'] + date: ['Fri, 22 Sep 2017 22:21:58 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] strict-transport-security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] status: {code: 200, message: OK} - request: body: null @@ -227,20 +228,20 @@ interactions: Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 - msrest_azure/0.4.11 containerregistrymanagementclient/0.3.1 Azure-SDK-For-Python] + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_06_01_preview_test_webhookb42916bb/providers/Microsoft.ContainerRegistry/registries/pyacrb42916bb?api-version=2017-06-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_webhook572410ac/providers/Microsoft.ContainerRegistry/registries/pyacr572410ac?api-version=2017-10-01 response: body: {string: ''} headers: cache-control: [no-cache] content-length: ['0'] - date: ['Thu, 06 Jul 2017 00:30:49 GMT'] + date: ['Fri, 22 Sep 2017 22:22:01 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] strict-transport-security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1194'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 200, message: OK} version: 1 diff --git a/azure-mgmt-containerregistry/tests/recordings/test_mgmt_containerregistry.test_registry.yaml b/azure-mgmt-containerregistry/tests/recordings/test_mgmt_containerregistry_2017_03_01.test_basic_registry.yaml similarity index 64% rename from azure-mgmt-containerregistry/tests/recordings/test_mgmt_containerregistry.test_registry.yaml rename to azure-mgmt-containerregistry/tests/recordings/test_mgmt_containerregistry_2017_03_01.test_basic_registry.yaml index 8e19e090e060..84ad10b6648c 100644 --- a/azure-mgmt-containerregistry/tests/recordings/test_mgmt_containerregistry.test_registry.yaml +++ b/azure-mgmt-containerregistry/tests/recordings/test_mgmt_containerregistry_2017_03_01.test_basic_registry.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"name": "pyacr68711136", "type": "Microsoft.ContainerRegistry/registries"}' + body: '{"name": "pyacr99e51642", "type": "Microsoft.ContainerRegistry/registries"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -8,7 +8,7 @@ interactions: Content-Length: ['75'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 - msrest_azure/0.4.11 containerregistrymanagementclient/0.3.1 Azure-SDK-For-Python] + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerRegistry/checkNameAvailability?api-version=2017-03-01 @@ -18,7 +18,7 @@ interactions: cache-control: [no-cache] content-length: ['22'] content-type: [application/json; charset=utf-8] - date: ['Thu, 06 Jul 2017 00:29:25 GMT'] + date: ['Fri, 22 Sep 2017 22:23:06 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] @@ -27,87 +27,87 @@ interactions: vary: [Accept-Encoding] status: {code: 200, message: OK} - request: - body: '{"location": "westus", "sku": {"name": "Basic"}, "properties": {"storageAccount": - {"name": "pyacrstorage68711136", "accessKey": "MxZyb/tzWPmzjMpP1wLQxQDXb3WL5wkv6/jfNGvnft3fhC3dItNhM8c8/ftLEmsurK1j709k2o4x5JcKWXlkMw=="}}}' + body: '{"location": "westcentralus", "sku": {"name": "Basic"}, "properties": {"adminUserEnabled": + false, "storageAccount": {"name": "pyacr99e51642", "accessKey": "qT8cLsnOvYtyvayca7sr/fbtBI2ACH0rfwtFSr9hpRqv8MSAed986NRNelfcCl/kEbyeUOv98UWnDW/gcAyqQQ=="}}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['221'] + Content-Length: ['248'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 - msrest_azure/0.4.11 containerregistrymanagementclient/0.3.1 Azure-SDK-For-Python] + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_registry68711136/providers/Microsoft.ContainerRegistry/registries/pyacr68711136?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_03_01_test_basic_registry99e51642/providers/Microsoft.ContainerRegistry/registries/pyacr99e51642?api-version=2017-03-01 response: - body: {string: '{"sku":{"name":"Basic","tier":"Basic"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_mgmt_containerregistry_test_registry68711136/providers/Microsoft.ContainerRegistry/registries/pyacr68711136","name":"pyacr68711136","location":"westus","tags":{},"properties":{"loginServer":"pyacr68711136.azurecr.io","creationDate":"2017-07-06T00:29:26.8712025Z","provisioningState":"Succeeded","adminUserEnabled":false,"storageAccount":{"name":"pyacrstorage68711136"}}}'} + body: {string: '{"sku":{"name":"Basic","tier":"Basic"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_03_01_test_basic_registry99e51642/providers/Microsoft.ContainerRegistry/registries/pyacr99e51642","name":"pyacr99e51642","location":"westcentralus","tags":{},"properties":{"loginServer":"pyacr99e51642.azurecr.io","creationDate":"2017-09-22T22:23:08.8648573Z","provisioningState":"Succeeded","adminUserEnabled":false,"storageAccount":{"name":"pyacr99e51642"}}}'} headers: cache-control: [no-cache] - content-length: ['535'] + content-length: ['552'] content-type: [application/json; charset=utf-8] - date: ['Thu, 06 Jul 2017 00:29:28 GMT'] + date: ['Fri, 22 Sep 2017 22:23:10 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] status: {code: 200, message: OK} - request: - body: '{"properties": {"adminUserEnabled": true}}' + body: null headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['42'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 - msrest_azure/0.4.11 containerregistrymanagementclient/0.3.1 Azure-SDK-For-Python] + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] - method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_registry68711136/providers/Microsoft.ContainerRegistry/registries/pyacr68711136?api-version=2017-03-01 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_03_01_test_basic_registry99e51642/providers/Microsoft.ContainerRegistry/registries?api-version=2017-03-01 response: - body: {string: '{"sku":{"name":"Basic","tier":"Basic"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_mgmt_containerregistry_test_registry68711136/providers/Microsoft.ContainerRegistry/registries/pyacr68711136","name":"pyacr68711136","location":"westus","tags":{},"properties":{"loginServer":"pyacr68711136.azurecr.io","creationDate":"2017-07-06T00:29:29.5516994Z","provisioningState":"Succeeded","adminUserEnabled":true,"storageAccount":{"name":"pyacrstorage68711136"}}}'} + body: {string: '{"value":[{"sku":{"name":"Basic","tier":"Basic"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_03_01_test_basic_registry99e51642/providers/Microsoft.ContainerRegistry/registries/pyacr99e51642","name":"pyacr99e51642","location":"westcentralus","tags":{},"properties":{"loginServer":"pyacr99e51642.azurecr.io","creationDate":"2017-09-22T22:23:08.8648573Z","provisioningState":"Succeeded","adminUserEnabled":false,"storageAccount":{"name":"pyacr99e51642"}}}]}'} headers: cache-control: [no-cache] - content-length: ['534'] + content-length: ['564'] content-type: [application/json; charset=utf-8] - date: ['Thu, 06 Jul 2017 00:29:29 GMT'] + date: ['Fri, 22 Sep 2017 22:23:11 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 200, message: OK} - request: - body: null + body: '{"tags": {"key": "value"}, "properties": {"adminUserEnabled": true}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] + Content-Length: ['68'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 - msrest_azure/0.4.11 containerregistrymanagementclient/0.3.1 Azure-SDK-For-Python] + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_registry68711136/providers/Microsoft.ContainerRegistry/registries/pyacr68711136?api-version=2017-03-01 + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_03_01_test_basic_registry99e51642/providers/Microsoft.ContainerRegistry/registries/pyacr99e51642?api-version=2017-03-01 response: - body: {string: '{"sku":{"name":"Basic","tier":"Basic"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_mgmt_containerregistry_test_registry68711136/providers/Microsoft.ContainerRegistry/registries/pyacr68711136","name":"pyacr68711136","location":"westus","tags":{},"properties":{"loginServer":"pyacr68711136.azurecr.io","creationDate":"2017-07-06T00:29:30.6624726Z","provisioningState":"Succeeded","adminUserEnabled":true,"storageAccount":{"name":"pyacrstorage68711136"}}}'} + body: {string: '{"sku":{"name":"Basic","tier":"Basic"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_03_01_test_basic_registry99e51642/providers/Microsoft.ContainerRegistry/registries/pyacr99e51642","name":"pyacr99e51642","location":"westcentralus","tags":{"key":"value"},"properties":{"loginServer":"pyacr99e51642.azurecr.io","creationDate":"2017-09-22T22:23:08.8648573Z","provisioningState":"Succeeded","adminUserEnabled":true,"storageAccount":{"name":"pyacr99e51642"}}}'} headers: cache-control: [no-cache] - content-length: ['534'] + content-length: ['564'] content-type: [application/json; charset=utf-8] - date: ['Thu, 06 Jul 2017 00:29:29 GMT'] + date: ['Fri, 22 Sep 2017 22:23:13 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: body: null @@ -117,17 +117,17 @@ interactions: Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 - msrest_azure/0.4.11 containerregistrymanagementclient/0.3.1 Azure-SDK-For-Python] + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_registry68711136/providers/Microsoft.ContainerRegistry/registries?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_03_01_test_basic_registry99e51642/providers/Microsoft.ContainerRegistry/registries/pyacr99e51642?api-version=2017-03-01 response: - body: {string: '{"value":[{"sku":{"name":"Basic","tier":"Basic"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_mgmt_containerregistry_test_registry68711136/providers/Microsoft.ContainerRegistry/registries/pyacr68711136","name":"pyacr68711136","location":"westus","tags":{},"properties":{"loginServer":"pyacr68711136.azurecr.io","creationDate":"2017-07-06T00:29:30.6624726Z","provisioningState":"Succeeded","adminUserEnabled":true,"storageAccount":{"name":"pyacrstorage68711136"}}}]}'} + body: {string: '{"sku":{"name":"Basic","tier":"Basic"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_03_01_test_basic_registry99e51642/providers/Microsoft.ContainerRegistry/registries/pyacr99e51642","name":"pyacr99e51642","location":"westcentralus","tags":{"key":"value"},"properties":{"loginServer":"pyacr99e51642.azurecr.io","creationDate":"2017-09-22T22:23:08.8648573Z","provisioningState":"Succeeded","adminUserEnabled":true,"storageAccount":{"name":"pyacr99e51642"}}}'} headers: cache-control: [no-cache] - content-length: ['546'] + content-length: ['564'] content-type: [application/json; charset=utf-8] - date: ['Thu, 06 Jul 2017 00:29:30 GMT'] + date: ['Fri, 22 Sep 2017 22:23:13 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] @@ -144,24 +144,24 @@ interactions: Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 - msrest_azure/0.4.11 containerregistrymanagementclient/0.3.1 Azure-SDK-For-Python] + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_registry68711136/providers/Microsoft.ContainerRegistry/registries/pyacr68711136/listCredentials?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_03_01_test_basic_registry99e51642/providers/Microsoft.ContainerRegistry/registries/pyacr99e51642/listCredentials?api-version=2017-03-01 response: - body: {string: '{"username":"pyacr68711136","passwords":[{"name":"password","value":"pV+/lRGi=XZdG=tZkPvRnfcT2iaYTk2Y"},{"name":"password2","value":"E4B=gMLLUnU+4SipQKSsRzVIVLNevMp="}]}'} + body: {string: '{"username":"pyacr99e51642","passwords":[{"name":"password","value":"=+L///+e/==+3b+/+S=qh2+yffcujM=S"},{"name":"password2","value":"T+w=+e/V1i+1fnm/nkql+RhbAI0tAlbd"}]}'} headers: cache-control: [no-cache] content-length: ['169'] content-type: [application/json; charset=utf-8] - date: ['Thu, 06 Jul 2017 00:29:31 GMT'] + date: ['Fri, 22 Sep 2017 22:23:14 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 200, message: OK} - request: body: '{"name": "password"}' @@ -172,24 +172,24 @@ interactions: Content-Length: ['20'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 - msrest_azure/0.4.11 containerregistrymanagementclient/0.3.1 Azure-SDK-For-Python] + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_registry68711136/providers/Microsoft.ContainerRegistry/registries/pyacr68711136/regenerateCredential?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_03_01_test_basic_registry99e51642/providers/Microsoft.ContainerRegistry/registries/pyacr99e51642/regenerateCredential?api-version=2017-03-01 response: - body: {string: '{"username":"pyacr68711136","passwords":[{"name":"password","value":"/2+/rE=6+=Dn+=Da+x+=7aASAz=t//Mt"},{"name":"password2","value":"E4B=gMLLUnU+4SipQKSsRzVIVLNevMp="}]}'} + body: {string: '{"username":"pyacr99e51642","passwords":[{"name":"password","value":"+C++/q=p=+++A=KzCfL+f+MZ=W0+Kwmc"},{"name":"password2","value":"T+w=+e/V1i+1fnm/nkql+RhbAI0tAlbd"}]}'} headers: cache-control: [no-cache] content-length: ['169'] content-type: [application/json; charset=utf-8] - date: ['Thu, 06 Jul 2017 00:29:32 GMT'] + date: ['Fri, 22 Sep 2017 22:23:15 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: [Accept-Encoding] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 200, message: OK} - request: body: null @@ -200,20 +200,20 @@ interactions: Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.1 (Windows-10-10.0.14393-SP0) requests/2.18.1 msrest/0.4.11 - msrest_azure/0.4.11 containerregistrymanagementclient/0.3.1 Azure-SDK-For-Python] + msrest_azure/0.4.11 containerregistrymanagementclient/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_test_registry68711136/providers/Microsoft.ContainerRegistry/registries/pyacr68711136?api-version=2017-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerregistry_2017_03_01_test_basic_registry99e51642/providers/Microsoft.ContainerRegistry/registries/pyacr99e51642?api-version=2017-03-01 response: body: {string: ''} headers: cache-control: [no-cache] content-length: ['0'] - date: ['Thu, 06 Jul 2017 00:29:34 GMT'] + date: ['Fri, 22 Sep 2017 22:23:19 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] strict-transport-security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 200, message: OK} version: 1 diff --git a/azure-mgmt-containerregistry/tests/test_mgmt_containerregistry.py b/azure-mgmt-containerregistry/tests/test_mgmt_containerregistry.py index b38d3799ba4a..d07904fbc01e 100644 --- a/azure-mgmt-containerregistry/tests/test_mgmt_containerregistry.py +++ b/azure-mgmt-containerregistry/tests/test_mgmt_containerregistry.py @@ -7,7 +7,20 @@ #-------------------------------------------------------------------------- import unittest -import azure.mgmt.containerregistry +from azure.mgmt.containerregistry.v2017_10_01.models import ( + Registry, + RegistryUpdateParameters, + StorageAccountProperties, + Sku, + SkuName, + SkuTier, + ProvisioningState, + PasswordName, + WebhookCreateParameters, + WebhookUpdateParameters, + WebhookAction, + WebhookStatus +) import azure.mgmt.storage from devtools_testutils import ( @@ -17,10 +30,18 @@ FAKE_STORAGE = FakeStorageAccount( - name='pyacrstorage', + name='pyacr', id='' ) +DEFAULT_LOCATION = 'westcentralus' +DEFAULT_REPLICATION_LOCATION = 'southcentralus' +DEFAULT_WEBHOOK_SERVICE_URI = 'http://www.microsoft.com' +DEFAULT_WEBHOOK_SCOPE = 'hello-world' +DEFAULT_KEY_VALUE_PAIR = { + 'key': 'value' +} + class MgmtACRTest(AzureMgmtTestCase): @@ -30,60 +51,208 @@ def setUp(self): azure.mgmt.containerregistry.ContainerRegistryManagementClient ) - @ResourceGroupPreparer() - @StorageAccountPreparer(name_prefix='pyacrstorage', playback_fake_resource=FAKE_STORAGE) - def test_registry(self, resource_group, location, storage_account, storage_account_key): + + @ResourceGroupPreparer(location=DEFAULT_LOCATION) + @StorageAccountPreparer(name_prefix='pyacr', location=DEFAULT_LOCATION, playback_fake_resource=FAKE_STORAGE) + def test_classic_registry(self, resource_group, location, storage_account): registry_name = self.get_resource_name('pyacr') name_status = self.client.registries.check_name_availability(registry_name) self.assertTrue(name_status.name_available) - async_registry_creation = self.client.registries.create( - resource_group.name, - registry_name, - { - 'location': location, - 'sku': { - 'name': 'Basic' - }, - 'storage_account': { - 'name': storage_account.name, - 'access_key': storage_account_key, - } - } - ) - registry = async_registry_creation.result() + # Create a classic registry + registry = self.client.registries.create( + resource_group_name=resource_group.name, + registry_name=registry_name, + registry=Registry( + location=location, + sku=Sku( + name=SkuName.classic + ), + storage_account=StorageAccountProperties( + id=storage_account.id + ) + ) + ).result() self.assertEqual(registry.name, registry_name) self.assertEqual(registry.location, location) - self.assertEqual(registry.sku.name, 'Basic') - self.assertEqual(registry.sku.tier, 'Basic') + self.assertEqual(registry.sku.name, SkuName.classic.value) + self.assertEqual(registry.sku.tier, SkuTier.classic.value) + self.assertEqual(registry.provisioning_state, ProvisioningState.succeeded.value) self.assertEqual(registry.admin_user_enabled, False) + self._core_registry_scenario(registry_name, resource_group.name) + + + @ResourceGroupPreparer(location=DEFAULT_LOCATION) + def test_managed_registry(self, resource_group, location): + registry_name = self.get_resource_name('pyacr') + + name_status = self.client.registries.check_name_availability(registry_name) + self.assertTrue(name_status.name_available) + + # Create a managed registry + self._create_managed_registry(registry_name, resource_group.name, location) + self._core_registry_scenario(registry_name, resource_group.name) + + + def _core_registry_scenario(self, registry_name, resource_group_name): + registries = list(self.client.registries.list_by_resource_group(resource_group_name)) + self.assertEqual(len(registries), 1) + + # Update the registry with new tags and enable admin user registry = self.client.registries.update( - resource_group.name, - registry_name, - { - 'admin_user_enabled': True - } - ) + resource_group_name=resource_group_name, + registry_name=registry_name, + registry_update_parameters=RegistryUpdateParameters( + tags=DEFAULT_KEY_VALUE_PAIR, + admin_user_enabled=True + ) + ).result() self.assertEqual(registry.name, registry_name) + self.assertEqual(registry.tags, DEFAULT_KEY_VALUE_PAIR) self.assertEqual(registry.admin_user_enabled, True) - registry = self.client.registries.get(resource_group.name, registry_name) + registry = self.client.registries.get(resource_group_name, registry_name) self.assertEqual(registry.name, registry_name) + self.assertEqual(registry.tags, DEFAULT_KEY_VALUE_PAIR) self.assertEqual(registry.admin_user_enabled, True) - registries = list(self.client.registries.list_by_resource_group(resource_group.name)) - self.assertEqual(len(registries), 1) - - credentials = self.client.registries.list_credentials(resource_group.name, registry_name) + credentials = self.client.registries.list_credentials(resource_group_name, registry_name) self.assertEqual(len(credentials.passwords), 2) credentials = self.client.registries.regenerate_credential( - resource_group.name, registry_name, 'password') + resource_group_name, registry_name, PasswordName.password) self.assertEqual(len(credentials.passwords), 2) - self.client.registries.delete(resource_group.name, registry_name) + if registry.sku.tier == SkuTier.managed.value: + usages = self.client.registries.list_usages(resource_group_name, registry_name) + self.assertTrue(len(usages.value) > 1) + + self.client.registries.delete(resource_group_name, registry_name).wait() + + + def _create_managed_registry(self, registry_name, resource_group_name, location): + registry = self.client.registries.create( + resource_group_name=resource_group_name, + registry_name=registry_name, + registry=Registry( + location=location, + sku=Sku( + name=SkuName.managed_premium + ) + ) + ).result() + self.assertEqual(registry.name, registry_name) + self.assertEqual(registry.location, location) + self.assertEqual(registry.sku.name, SkuName.managed_premium.value) + self.assertEqual(registry.sku.tier, SkuTier.managed.value) + self.assertEqual(registry.provisioning_state, ProvisioningState.succeeded.value) + self.assertEqual(registry.admin_user_enabled, False) + self.assertEqual(registry.storage_account, None) + + + @ResourceGroupPreparer(location=DEFAULT_LOCATION) + def test_webhook(self, resource_group, location): + registry_name = self.get_resource_name('pyacr') + webhook_name = self.get_resource_name('pyacr') + + # Create a managed registry + self._create_managed_registry(registry_name, resource_group.name, location) + + # Create a webhook + webhook = self.client.webhooks.create( + resource_group_name=resource_group.name, + registry_name=registry_name, + webhook_name=webhook_name, + webhook_create_parameters=WebhookCreateParameters( + location=location, + service_uri=DEFAULT_WEBHOOK_SERVICE_URI, + actions=[WebhookAction.push] + ) + ).result() + self.assertEqual(webhook.name, webhook_name) + self.assertEqual(webhook.location, location) + self.assertEqual(webhook.provisioning_state, ProvisioningState.succeeded.value) + self.assertEqual(webhook.actions, [WebhookAction.push.value]) + self.assertEqual(webhook.status, WebhookStatus.enabled.value) + + webhooks = list(self.client.webhooks.list(resource_group.name, registry_name)) + self.assertEqual(len(webhooks), 1) + + # Update the webhook with custom headers, scope, and new tags + webhook = self.client.webhooks.update( + resource_group_name=resource_group.name, + registry_name=registry_name, + webhook_name=webhook_name, + webhook_update_parameters=WebhookUpdateParameters( + tags=DEFAULT_KEY_VALUE_PAIR, + custom_headers=DEFAULT_KEY_VALUE_PAIR, + scope=DEFAULT_WEBHOOK_SCOPE + ) + ).result() + self.assertEqual(webhook.name, webhook_name) + self.assertEqual(webhook.tags, DEFAULT_KEY_VALUE_PAIR) + self.assertEqual(webhook.scope, DEFAULT_WEBHOOK_SCOPE) + + webhook = self.client.webhooks.get(resource_group.name, registry_name, webhook_name) + self.assertEqual(webhook.name, webhook_name) + self.assertEqual(webhook.tags, DEFAULT_KEY_VALUE_PAIR) + self.assertEqual(webhook.scope, DEFAULT_WEBHOOK_SCOPE) + + webhook_config = self.client.webhooks.get_callback_config( + resource_group.name, + registry_name, + webhook_name + ) + self.assertEqual(webhook_config.service_uri, DEFAULT_WEBHOOK_SERVICE_URI) + self.assertEqual(webhook_config.custom_headers, DEFAULT_KEY_VALUE_PAIR) + + self.client.webhooks.ping(resource_group.name, registry_name, webhook_name) + self.client.webhooks.list_events(resource_group.name, registry_name, webhook_name) + + self.client.webhooks.delete(resource_group.name, registry_name, webhook_name).wait() + self.client.registries.delete(resource_group.name, registry_name).wait() + + + @ResourceGroupPreparer(location=DEFAULT_LOCATION) + def test_replication(self, resource_group, location): + registry_name = self.get_resource_name('pyacr') + replication_name = DEFAULT_REPLICATION_LOCATION + + # Create a managed registry + self._create_managed_registry(registry_name, resource_group.name, location) + + # Create a replication + replication = self.client.replications.create( + resource_group_name=resource_group.name, + registry_name=registry_name, + replication_name=replication_name, + location=DEFAULT_REPLICATION_LOCATION + ).result() + self.assertEqual(replication.name, replication_name) + self.assertEqual(replication.location, DEFAULT_REPLICATION_LOCATION) + self.assertEqual(replication.provisioning_state, ProvisioningState.succeeded.value) + + replications = list(self.client.replications.list(resource_group.name, registry_name)) + self.assertEqual(len(replications), 2) # 2 because a replication in home region is auto created + + # Update the replication with new tags + replication = self.client.replications.update( + resource_group_name=resource_group.name, + registry_name=registry_name, + replication_name=replication_name, + tags=DEFAULT_KEY_VALUE_PAIR + ).result() + self.assertEqual(replication.name, replication_name) + self.assertEqual(replication.tags, DEFAULT_KEY_VALUE_PAIR) + + replication = self.client.replications.get(resource_group.name, registry_name, replication_name) + self.assertEqual(replication.name, replication_name) + self.assertEqual(replication.tags, DEFAULT_KEY_VALUE_PAIR) + + self.client.replications.delete(resource_group.name, registry_name, replication_name).wait() + self.client.registries.delete(resource_group.name, registry_name).wait() #------------------------------------------------------------------------------ diff --git a/azure-mgmt-containerregistry/tests/test_mgmt_containerregistry_2017_03_01.py b/azure-mgmt-containerregistry/tests/test_mgmt_containerregistry_2017_03_01.py new file mode 100644 index 000000000000..57551acfcc82 --- /dev/null +++ b/azure-mgmt-containerregistry/tests/test_mgmt_containerregistry_2017_03_01.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- +import unittest + +from azure.mgmt.containerregistry.v2017_03_01.models import ( + RegistryCreateParameters, + RegistryUpdateParameters, + StorageAccountParameters, + Sku, + SkuTier, + ProvisioningState, + PasswordName +) +import azure.mgmt.storage + +from devtools_testutils import ( + AzureMgmtTestCase, FakeStorageAccount, + ResourceGroupPreparer, StorageAccountPreparer +) + + +FAKE_STORAGE = FakeStorageAccount( + name='pyacr', + id='' +) + +DEFAULT_LOCATION = 'westcentralus' +DEFAULT_SKU_NAME = 'Basic' +DEFAULT_KEY_VALUE_PAIR = { + 'key': 'value' +} + + +class MgmtACRTest20170301(AzureMgmtTestCase): + + def setUp(self): + super(MgmtACRTest20170301, self).setUp() + self.client = self.create_mgmt_client( + azure.mgmt.containerregistry.ContainerRegistryManagementClient, + api_version='2017-03-01' + ) + + + @ResourceGroupPreparer(location=DEFAULT_LOCATION) + @StorageAccountPreparer(name_prefix='pyacr', location=DEFAULT_LOCATION, playback_fake_resource=FAKE_STORAGE) + def test_basic_registry(self, resource_group, location, storage_account, storage_account_key): + registry_name = self.get_resource_name('pyacr') + + name_status = self.client.registries.check_name_availability(registry_name) + self.assertTrue(name_status.name_available) + + # Create a Basic registry + registry = self.client.registries.create( + resource_group_name=resource_group.name, + registry_name=registry_name, + registry_create_parameters=RegistryCreateParameters( + location=location, + sku=Sku( + name=DEFAULT_SKU_NAME + ), + storage_account=StorageAccountParameters( + name=storage_account.name, + access_key=storage_account_key + ) + ) + ).result() + self.assertEqual(registry.name, registry_name) + self.assertEqual(registry.location, location) + self.assertEqual(registry.sku.name, DEFAULT_SKU_NAME) + self.assertEqual(registry.sku.tier, SkuTier.basic.value) + self.assertEqual(registry.provisioning_state.value, ProvisioningState.succeeded.value) + self.assertEqual(registry.admin_user_enabled, False) + + registries = list(self.client.registries.list_by_resource_group(resource_group.name)) + self.assertEqual(len(registries), 1) + + # Update the registry with new tags and enable admin user + registry = self.client.registries.update( + resource_group_name=resource_group.name, + registry_name=registry_name, + registry_update_parameters=RegistryUpdateParameters( + tags=DEFAULT_KEY_VALUE_PAIR, + admin_user_enabled=True + ) + ) + self.assertEqual(registry.name, registry_name) + self.assertEqual(registry.tags, DEFAULT_KEY_VALUE_PAIR) + self.assertEqual(registry.admin_user_enabled, True) + + registry = self.client.registries.get(resource_group.name, registry_name) + self.assertEqual(registry.name, registry_name) + self.assertEqual(registry.tags, DEFAULT_KEY_VALUE_PAIR) + self.assertEqual(registry.admin_user_enabled, True) + + credentials = self.client.registries.list_credentials(resource_group.name, registry_name) + self.assertEqual(len(credentials.passwords), 2) + + credentials = self.client.registries.regenerate_credential( + resource_group.name, registry_name, PasswordName.password) + self.assertEqual(len(credentials.passwords), 2) + + self.client.registries.delete(resource_group.name, registry_name) + + +#------------------------------------------------------------------------------ +if __name__ == '__main__': + unittest.main() diff --git a/azure-mgmt-containerregistry/tests/test_mgmt_containerregistry_2017_06_01_preview.py b/azure-mgmt-containerregistry/tests/test_mgmt_containerregistry_2017_06_01_preview.py deleted file mode 100644 index e03fe3363893..000000000000 --- a/azure-mgmt-containerregistry/tests/test_mgmt_containerregistry_2017_06_01_preview.py +++ /dev/null @@ -1,207 +0,0 @@ -# coding: utf-8 - -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- -import unittest - -import azure.mgmt.containerregistry -import azure.mgmt.storage - -from devtools_testutils import ( - AzureMgmtTestCase, FakeStorageAccount, - ResourceGroupPreparer, StorageAccountPreparer -) - - -FAKE_STORAGE = FakeStorageAccount( - name='pyacrstorage', - id='' -) - - -class MgmtACRTest20170601Preview(AzureMgmtTestCase): - - def setUp(self): - super(MgmtACRTest20170601Preview, self).setUp() - self.client = self.create_mgmt_client( - azure.mgmt.containerregistry.ContainerRegistryManagementClient, - api_version='2017-06-01-preview' - ) - - @ResourceGroupPreparer(location='eastus') - @StorageAccountPreparer(name_prefix='pyacrstorage', location='eastus', playback_fake_resource=FAKE_STORAGE) - def test_basic_registry(self, resource_group, location, storage_account): - registry_name = self.get_resource_name('pyacr') - - name_status = self.client.registries.check_name_availability(registry_name) - self.assertTrue(name_status.name_available) - - async_registry_creation = self.client.registries.create( - resource_group.name, - registry_name, - { - 'location': location, - 'sku': { - 'name': 'Basic' - }, - 'storage_account': { - 'id': storage_account.id - } - } - ) - registry = async_registry_creation.result() - self.assertEqual(registry.name, registry_name) - self.assertEqual(registry.location, location) - self.assertEqual(registry.sku.name, 'Basic') - self.assertEqual(registry.sku.tier, 'Basic') - self.assertEqual(registry.admin_user_enabled, False) - - self._core_registry_scenario(registry_name, resource_group.name) - - - @ResourceGroupPreparer(location='eastus') - def test_managed_registry(self, resource_group, location): - registry_name = self.get_resource_name('pyacr') - - name_status = self.client.registries.check_name_availability(registry_name) - self.assertTrue(name_status.name_available) - - async_registry_creation = self.client.registries.create( - resource_group.name, - registry_name, - { - 'location': location, - 'sku': { - 'name': 'Managed_Standard' - } - } - ) - registry = async_registry_creation.result() - self.assertEqual(registry.name, registry_name) - self.assertEqual(registry.location, location) - self.assertEqual(registry.sku.name, 'Managed_Standard') - self.assertEqual(registry.sku.tier, 'Managed') - self.assertEqual(registry.provisioning_state, 'Succeeded') - self.assertEqual(registry.admin_user_enabled, False) - self.assertEqual(registry.storage_account, None) - - self._core_registry_scenario(registry_name, resource_group.name) - - - def _core_registry_scenario(self, registry_name, resource_group_name): - registry = self.client.registries.update( - resource_group_name, - registry_name, - { - 'admin_user_enabled': True - } - ) - self.assertEqual(registry.name, registry_name) - self.assertEqual(registry.admin_user_enabled, True) - - if registry.sku.tier == 'Managed': - usages = self.client.registries.list_usages(resource_group_name, registry_name) - self.assertTrue(len(usages.value) > 1) - - registry = self.client.registries.get(resource_group_name, registry_name) - self.assertEqual(registry.name, registry_name) - self.assertEqual(registry.admin_user_enabled, True) - - registries = list(self.client.registries.list_by_resource_group(resource_group_name)) - self.assertEqual(len(registries), 1) - - credentials = self.client.registries.list_credentials(resource_group_name, registry_name) - self.assertEqual(len(credentials.passwords), 2) - - credentials = self.client.registries.regenerate_credential( - resource_group_name, registry_name, 'password') - self.assertEqual(len(credentials.passwords), 2) - - self.client.registries.delete(resource_group_name, registry_name) - - - @ResourceGroupPreparer(location='eastus') - def test_webhook(self, resource_group, location): - registry_name = self.get_resource_name('pyacr') - webhook_name = self.get_resource_name('pyacrwebhook') - - async_registry_creation = self.client.registries.create( - resource_group.name, - registry_name, - { - 'location': location, - 'sku': { - 'name': 'Managed_Standard' - } - } - ) - registry = async_registry_creation.result() - self.assertEqual(registry.name, registry_name) - self.assertEqual(registry.location, location) - self.assertEqual(registry.sku.name, 'Managed_Standard') - self.assertEqual(registry.sku.tier, 'Managed') - self.assertEqual(registry.provisioning_state, 'Succeeded') - self.assertEqual(registry.admin_user_enabled, False) - - async_webhook_creation = self.client.webhooks.create( - resource_group.name, - registry_name, - webhook_name, - { - 'location': location, - 'service_uri': 'http://www.microsoft.com', - 'actions': ['push'] - } - ) - webhook = async_webhook_creation.result() - self.assertEqual(webhook.name, webhook_name) - self.assertEqual(webhook.location, location) - self.assertEqual(webhook.actions, ['push']) - self.assertEqual(webhook.status, 'enabled') - - async_webhook_update = self.client.webhooks.update( - resource_group.name, - registry_name, - webhook_name, - { - 'custom_headers': { - 'key': 'value' - }, - 'scope': 'hello-world' - } - ) - webhook = async_webhook_update.result() - self.assertEqual(webhook.name, webhook_name) - self.assertEqual(webhook.scope, 'hello-world') - - webhook = self.client.webhooks.get(resource_group.name, registry_name, webhook_name) - self.assertEqual(webhook.name, webhook_name) - self.assertEqual(webhook.scope, 'hello-world') - - webhook_config = self.client.webhooks.get_callback_config( - resource_group.name, - registry_name, - webhook_name - ) - - self.assertEqual(webhook_config.service_uri, 'http://www.microsoft.com') - self.assertEqual(webhook_config.custom_headers, { - 'key': 'value' - }) - - webhooks = list(self.client.webhooks.list(resource_group.name, registry_name)) - self.assertEqual(len(webhooks), 1) - - self.client.webhooks.ping(resource_group.name, registry_name, webhook_name) - self.client.webhooks.list_events(resource_group.name, registry_name, webhook_name) - - self.client.webhooks.delete(resource_group.name, registry_name, webhook_name) - self.client.registries.delete(resource_group.name, registry_name) - - -#------------------------------------------------------------------------------ -if __name__ == '__main__': - unittest.main() diff --git a/package_service_mapping.json b/package_service_mapping.json index bf34b9feba3e..87ff27e13145 100644 --- a/package_service_mapping.json +++ b/package_service_mapping.json @@ -117,7 +117,7 @@ "category ": "Management", "namespaces": [ "azure.mgmt.containerregistry.v2017_03_01", - "azure.mgmt.containerregistry.v2017_06_01_preview" + "azure.mgmt.containerregistry.v2017_10_01" ] }, "azure-mgmt-datafactory": { diff --git a/swagger_to_sdk_config.json b/swagger_to_sdk_config.json index 0fe2c3122ed4..de797c67bc3a 100644 --- a/swagger_to_sdk_config.json +++ b/swagger_to_sdk_config.json @@ -149,15 +149,15 @@ "build_dir": "azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01", "generated_relative_base_directory": "azure/mgmt/containerregistry/v2017_03_01" }, - "containerregistry.2017-06-01-preview": { + "containerregistry.2017-10-01": { "markdown": "specification/containerregistry/resource-manager/readme.md", "autorest_options": { - "tag": "package-2017-06-preview", - "namespace": "azure.mgmt.containerregistry.v2017_06_01_preview" + "tag": "package-2017-10", + "namespace": "azure.mgmt.containerregistry.v2017_10_01" }, - "output_dir": "azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview", - "build_dir": "azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_06_01_preview", - "generated_relative_base_directory": "azure/mgmt/containerregistry/v2017_06_01_preview" + "output_dir": "azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01", + "build_dir": "azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01", + "generated_relative_base_directory": "azure/mgmt/containerregistry/v2017_10_01" }, "datafactory": { "markdown": "specification/datafactory/resource-manager/readme.md",