diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_container_registry_client.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_container_registry_client.py index 8d437b7f507a..69679c0bb9fb 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_container_registry_client.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_container_registry_client.py @@ -4,7 +4,9 @@ # Licensed under the MIT License. # ------------------------------------ from typing import TYPE_CHECKING + from azure.core.paging import ItemPaged +from azure.core.tracing.decorator import distributed_trace from ._base_client import ContainerRegistryBaseClient from ._container_repository_client import ContainerRepositoryClient @@ -33,6 +35,7 @@ def __init__(self, endpoint, credential, **kwargs): self._credential = credential super(ContainerRegistryClient, self).__init__(endpoint=endpoint, credential=credential, **kwargs) + @distributed_trace def delete_repository(self, repository, **kwargs): # type: (str, Dict[str, Any]) -> DeletedRepositoryResult """Delete a repository @@ -42,11 +45,11 @@ def delete_repository(self, repository, **kwargs): :returns: None :raises: :class:~azure.core.exceptions.ResourceNotFoundError """ - # NOTE: DELETE `/acr/v1/{name}` return DeletedRepositoryResult._from_generated( # pylint: disable=protected-access self._client.container_registry.delete_repository(repository, **kwargs) ) + @distributed_trace def list_repositories(self, **kwargs): # type: (Dict[str, Any]) -> ItemPaged[str] """List all repositories @@ -62,6 +65,7 @@ def list_repositories(self, **kwargs): last=kwargs.pop("last", None), n=kwargs.pop("max", None), **kwargs ) + @distributed_trace def get_repository_client(self, repository, **kwargs): # type: (str, Dict[str, Any]) -> ContainerRepositoryClient """Get a repository client @@ -69,5 +73,6 @@ def get_repository_client(self, repository, **kwargs): :param repository: The repository to create a client for :type repository: str :returns: :class:~azure.containerregistry.ContainerRepositoryClient + :raises: None """ return ContainerRepositoryClient(self._endpoint, repository, credential=self._credential, **kwargs) diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_container_repository_client.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_container_repository_client.py index 1c43ac22bcd6..1bea7c443f36 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_container_repository_client.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_container_repository_client.py @@ -5,6 +5,8 @@ # ------------------------------------ from typing import TYPE_CHECKING +from azure.core.tracing.decorator import distributed_trace + from ._base_client import ContainerRegistryBaseClient from ._helpers import _is_tag from ._models import RepositoryProperties, TagProperties, RegistryArtifactProperties @@ -41,6 +43,7 @@ def _get_digest_from_tag(self, tag): tag_props = self.get_tag_properties(tag) return tag_props.digest + @distributed_trace def delete(self, **kwargs): # type: (...) -> None """Delete a repository @@ -50,17 +53,19 @@ def delete(self, **kwargs): """ self._client.container_registry.delete_repository(self.repository, **kwargs) + @distributed_trace def delete_registry_artifact(self, digest, **kwargs): # type: (str) -> None - """Delete a registry artifact + """Delete a registry artifact. A registry artifact can only be deleted from the digest :param digest: The digest of the artifact to be deleted :type digest: str :returns: None :raises: :class:~azure.core.exceptions.ResourceNotFoundError """ - raise NotImplementedError("Has not been implemented") + self._client.container_registry_repository.delete_manifest(self.repository, digest, **kwargs) + @distributed_trace def delete_tag(self, tag, **kwargs): # type: (str) -> None """Delete a tag from a repository @@ -72,6 +77,7 @@ def delete_tag(self, tag, **kwargs): """ self._client.container_registry_repository.delete_tag(self.repository, tag, **kwargs) + @distributed_trace def get_properties(self, **kwargs): # type: (...) -> RepositoryProperties """Get the properties of a repository @@ -84,6 +90,7 @@ def get_properties(self, **kwargs): self._client.container_registry_repository.get_properties(self.repository, **kwargs) ) + @distributed_trace def get_registry_artifact_properties(self, tag_or_digest, **kwargs): # type: (str, Dict[str, Any]) -> RegistryArtifactProperties """Get the properties of a registry artifact @@ -102,6 +109,7 @@ def get_registry_artifact_properties(self, tag_or_digest, **kwargs): ) ) + @distributed_trace def get_tag_properties(self, tag, **kwargs): # type: (str, Dict[str, Any]) -> TagProperties """Get the properties for a tag @@ -115,6 +123,7 @@ def get_tag_properties(self, tag, **kwargs): self._client.container_registry_repository.get_tag_properties(self.repository, tag, **kwargs) ) + @distributed_trace def list_registry_artifacts(self, **kwargs): # type: (...) -> ItemPaged[RegistryArtifactProperties] """List the artifacts for a repository @@ -142,6 +151,7 @@ def list_registry_artifacts(self, **kwargs): ], ) + @distributed_trace def list_tags(self, **kwargs): # type: (...) -> ItemPaged[TagProperties] """List the tags for a repository @@ -163,6 +173,7 @@ def list_tags(self, **kwargs): **kwargs ) + @distributed_trace def set_manifest_properties(self, digest, permissions, **kwargs): # type: (str, ContentPermissions) -> None """Set the properties for a manifest @@ -179,6 +190,7 @@ def set_manifest_properties(self, digest, permissions, **kwargs): self.repository, digest, value=permissions._to_generated(), **kwargs # pylint: disable=protected-access ) + @distributed_trace def set_tag_properties(self, tag_or_digest, permissions, **kwargs): # type: (str, ContentPermissions) -> None """Set the properties for a tag diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_models.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_models.py index 44f679dcd544..28cae309b29f 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_models.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_models.py @@ -61,10 +61,10 @@ def __init__(self, **kwargs): self.digest = kwargs.get("digest", None) self.last_updated_on = kwargs.get("last_updated_on", None) self.operating_system = kwargs.get("operating_system", None) - self.registry_artifacts = kwargs.get("registry_artifacts", None) + self.references = kwargs.get("references", None) self.size = kwargs.get("size", None) self.tags = kwargs.get("tags", None) - self.content_permissions = kwargs.get("manifest_properties", None) + self.content_permissions = kwargs.get("content_permissions", None) if self.content_permissions: self.content_permissions = ContentPermissions._from_generated(self.content_permissions) diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/aio/_async_container_registry_client.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/aio/_async_container_registry_client.py index 5757d03ec512..3984e63cae85 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/aio/_async_container_registry_client.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/aio/_async_container_registry_client.py @@ -6,6 +6,8 @@ from typing import Any, Dict, TYPE_CHECKING from azure.core.async_paging import AsyncItemPaged +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async from ._async_base_client import ContainerRegistryBaseClient from ._async_container_repository_client import ContainerRepositoryClient @@ -32,6 +34,7 @@ def __init__(self, endpoint: str, credential: "AsyncTokenCredential", **kwargs: self._credential = credential super(ContainerRegistryClient, self).__init__(endpoint=endpoint, credential=credential, **kwargs) + @distributed_trace_async async def delete_repository(self, repository: str, **kwargs: Dict[str, Any]) -> DeletedRepositoryResult: """Delete a repository @@ -43,12 +46,14 @@ async def delete_repository(self, repository: str, **kwargs: Dict[str, Any]) -> result = await self._client.container_registry.delete_repository(repository, **kwargs) return DeletedRepositoryResult._from_generated(result) # pylint: disable=protected-access + @distributed_trace def list_repositories(self, **kwargs) -> AsyncItemPaged[str]: return self._client.container_registry.get_repositories( last=kwargs.pop("last", None), n=kwargs.pop("page_size", None), **kwargs ) + @distributed_trace_async def get_repository_client(self, name: str, **kwargs) -> ContainerRepositoryClient: return ContainerRepositoryClient(self._endpoint, name, self._credential, **kwargs) diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/aio/_async_container_repository_client.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/aio/_async_container_repository_client.py index a819be96dcfb..2c154897a4cb 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/aio/_async_container_repository_client.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/aio/_async_container_repository_client.py @@ -6,6 +6,8 @@ from typing import TYPE_CHECKING, Dict, Any from azure.core.async_paging import AsyncItemPaged +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async from ._async_base_client import ContainerRegistryBaseClient from .._helpers import _is_tag @@ -44,6 +46,7 @@ async def _get_digest_from_tag(self, tag: str) -> None: tag_props = await self.get_tag_properties(tag) return tag_props.digest + @distributed_trace_async async def delete(self, **kwargs: Dict[str, Any]) -> None: """Delete a repository @@ -52,6 +55,7 @@ async def delete(self, **kwargs: Dict[str, Any]) -> None: """ await self._client.container_registry.delete_repository(self.repository, **kwargs) + @distributed_trace_async async def delete_registry_artifact(self, digest: str, **kwargs) -> None: """Delete a registry artifact @@ -60,8 +64,9 @@ async def delete_registry_artifact(self, digest: str, **kwargs) -> None: :returns: None :raises: :class:~azure.core.exceptions.ResourceNotFoundError """ - raise NotImplementedError("Has not been implemented") + await self._client.container_registry_repository.delete_manifest(self.repository, digest, **kwargs) + @distributed_trace_async async def delete_tag(self, tag: str, **kwargs) -> None: """Delete a tag from a repository @@ -72,6 +77,7 @@ async def delete_tag(self, tag: str, **kwargs) -> None: """ await self._client.container_registry_repository.delete_tag(self.repository, tag, **kwargs) + @distributed_trace_async async def get_properties(self, **kwargs) -> RepositoryProperties: """Get the properties of a repository @@ -82,6 +88,7 @@ async def get_properties(self, **kwargs) -> RepositoryProperties: await self._client.container_registry_repository.get_properties(self.repository, **kwargs) ) + @distributed_trace_async async def get_registry_artifact_properties(self, tag_or_digest: str, **kwargs) -> RegistryArtifactProperties: """Get the properties of a registry artifact @@ -99,6 +106,7 @@ async def get_registry_artifact_properties(self, tag_or_digest: str, **kwargs) - ) ) + @distributed_trace_async async def get_tag_properties(self, tag: str, **kwargs) -> TagProperties: """Get the properties for a tag @@ -111,7 +119,8 @@ async def get_tag_properties(self, tag: str, **kwargs) -> TagProperties: await self._client.container_registry_repository.get_tag_properties(self.repository, tag, **kwargs) ) - async def list_registry_artifacts(self, **kwargs) -> AsyncItemPaged[RegistryArtifactProperties]: + @distributed_trace + def list_registry_artifacts(self, **kwargs) -> AsyncItemPaged[RegistryArtifactProperties]: """List the artifacts for a repository :keyword last: Query parameter for the last item in the previous query @@ -126,7 +135,7 @@ async def list_registry_artifacts(self, **kwargs) -> AsyncItemPaged[RegistryArti last = kwargs.pop("last", None) n = kwargs.pop("page_size", None) orderby = kwargs.pop("order_by", None) - return await self._client.container_registry_repository.get_manifests( + return self._client.container_registry_repository.get_manifests( self.repository, last=last, n=n, @@ -137,7 +146,8 @@ async def list_registry_artifacts(self, **kwargs) -> AsyncItemPaged[RegistryArti **kwargs ) - async def list_tags(self, **kwargs) -> AsyncItemPaged[TagProperties]: + @distributed_trace + def list_tags(self, **kwargs) -> AsyncItemPaged[TagProperties]: """List the tags for a repository :param last: Query parameter for the last item in the previous call. Ensuing @@ -147,7 +157,7 @@ async def list_tags(self, **kwargs) -> AsyncItemPaged[TagProperties]: :returns: ~azure.core.paging.AsyncItemPaged[TagProperties] :raises: None """ - return await self._client.container_registry_repository.get_tags( + return self._client.container_registry_repository.get_tags( self.repository, last=kwargs.pop("last", None), n=kwargs.pop("top", None), @@ -157,6 +167,7 @@ async def list_tags(self, **kwargs) -> AsyncItemPaged[TagProperties]: **kwargs ) + @distributed_trace_async async def set_manifest_properties(self, digest: str, permissions: ContentPermissions, **kwargs) -> None: """Set the properties for a manifest @@ -172,6 +183,7 @@ async def set_manifest_properties(self, digest: str, permissions: ContentPermiss self.repository, digest, value=permissions._to_generated(), **kwargs # pylint: disable=protected-access ) + @distributed_trace_async async def set_tag_properties(self, tag_or_digest: str, permissions: ContentPermissions, **kwargs) -> None: """Set the properties for a tag diff --git a/sdk/containerregistry/azure-containerregistry/tests/constants.py b/sdk/containerregistry/azure-containerregistry/tests/constants.py new file mode 100644 index 000000000000..d6b88099c489 --- /dev/null +++ b/sdk/containerregistry/azure-containerregistry/tests/constants.py @@ -0,0 +1,8 @@ +# coding=utf-8 +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ + +TO_BE_DELETED = "to_be_deleted" +DOES_NOT_EXIST = "does_not_exist" \ No newline at end of file diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_client.test_delete_repository.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_client.test_delete_repository.yaml index e897cbf7ea04..9a50174e2e9b 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_client.test_delete_repository.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_client.test_delete_repository.yaml @@ -33,7 +33,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:23:23 GMT + - Fri, 02 Apr 2021 16:54:26 GMT docker-distribution-api-version: - registry/2.0 server: @@ -73,7 +73,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:23:25 GMT + - Fri, 02 Apr 2021 16:54:28 GMT server: - openresty strict-transport-security: @@ -81,7 +81,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.216667' + - '333.283333' status: code: 200 message: OK @@ -111,7 +111,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:23:25 GMT + - Fri, 02 Apr 2021 16:54:28 GMT server: - openresty strict-transport-security: @@ -119,7 +119,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.2' + - '333.266667' status: code: 200 message: OK @@ -156,7 +156,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:23:26 GMT + - Fri, 02 Apr 2021 16:54:30 GMT docker-distribution-api-version: - registry/2.0 server: @@ -203,7 +203,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:23:32 GMT + - Fri, 02 Apr 2021 16:54:35 GMT docker-distribution-api-version: - registry/2.0 server: @@ -243,7 +243,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:23:32 GMT + - Fri, 02 Apr 2021 16:54:35 GMT server: - openresty strict-transport-security: @@ -251,7 +251,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.183333' + - '333.25' status: code: 200 message: OK @@ -281,7 +281,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:23:32 GMT + - Fri, 02 Apr 2021 16:54:35 GMT server: - openresty strict-transport-security: @@ -289,7 +289,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.116667' + - '332.833333' status: code: 200 message: OK @@ -324,7 +324,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:23:32 GMT + - Fri, 02 Apr 2021 16:54:35 GMT docker-distribution-api-version: - registry/2.0 server: diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_client.test_delete_repository_does_not_exist.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_client.test_delete_repository_does_not_exist.yaml index e823c5438670..d9ede9ced432 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_client.test_delete_repository_does_not_exist.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_client.test_delete_repository_does_not_exist.yaml @@ -33,7 +33,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:23:33 GMT + - Fri, 02 Apr 2021 16:54:36 GMT docker-distribution-api-version: - registry/2.0 server: @@ -73,7 +73,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:23:34 GMT + - Fri, 02 Apr 2021 16:54:37 GMT server: - openresty strict-transport-security: @@ -81,7 +81,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.216667' + - '333.133333' status: code: 200 message: OK @@ -111,7 +111,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:23:34 GMT + - Fri, 02 Apr 2021 16:54:37 GMT server: - openresty strict-transport-security: @@ -119,7 +119,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.016667' + - '333.116667' status: code: 200 message: OK @@ -157,7 +157,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:23:34 GMT + - Fri, 02 Apr 2021 16:54:38 GMT docker-distribution-api-version: - registry/2.0 server: diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_client.test_list_repositories.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_client.test_list_repositories.yaml index b2109f203cf1..3222de0209aa 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_client.test_list_repositories.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_client.test_list_repositories.yaml @@ -31,7 +31,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:10:14 GMT + - Fri, 02 Apr 2021 16:54:38 GMT docker-distribution-api-version: - registry/2.0 server: @@ -71,7 +71,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:10:15 GMT + - Fri, 02 Apr 2021 16:54:39 GMT server: - openresty strict-transport-security: @@ -79,7 +79,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.283333' + - '333.316667' status: code: 200 message: OK @@ -109,7 +109,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:10:15 GMT + - Fri, 02 Apr 2021 16:54:40 GMT server: - openresty strict-transport-security: @@ -117,7 +117,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.266667' + - '333.3' status: code: 200 message: OK @@ -152,7 +152,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:10:15 GMT + - Fri, 02 Apr 2021 16:54:40 GMT docker-distribution-api-version: - registry/2.0 server: diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_client_async.test_delete_repository.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_client_async.test_delete_repository.yaml index 8eb367226fa8..531593efb422 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_client_async.test_delete_repository.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_client_async.test_delete_repository.yaml @@ -19,7 +19,7 @@ interactions: connection: keep-alive content-length: '208' content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:23:50 GMT + date: Fri, 02 Apr 2021 16:54:55 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains @@ -47,11 +47,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:23:51 GMT + date: Fri, 02 Apr 2021 16:54:55 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '332.866667' + x-ms-ratelimit-remaining-calls-per-second: '333.033333' status: code: 200 message: OK @@ -75,11 +75,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:23:51 GMT + date: Fri, 02 Apr 2021 16:54:56 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '332.85' + x-ms-ratelimit-remaining-calls-per-second: '333.016667' status: code: 200 message: OK @@ -103,7 +103,7 @@ interactions: connection: keep-alive content-length: '788' content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:23:53 GMT + date: Fri, 02 Apr 2021 16:54:57 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains @@ -133,7 +133,7 @@ interactions: connection: keep-alive content-length: '196' content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:23:58 GMT + date: Fri, 02 Apr 2021 16:55:02 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains @@ -161,11 +161,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:23:58 GMT + date: Fri, 02 Apr 2021 16:55:03 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '332.833333' + x-ms-ratelimit-remaining-calls-per-second: '332.983333' status: code: 200 message: OK @@ -189,11 +189,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:23:58 GMT + date: Fri, 02 Apr 2021 16:55:03 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '332.816667' + x-ms-ratelimit-remaining-calls-per-second: '332.733333' status: code: 200 message: OK @@ -217,7 +217,7 @@ interactions: connection: keep-alive content-length: '146' content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:23:58 GMT + date: Fri, 02 Apr 2021 16:55:03 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_client_async.test_delete_repository_does_not_exist.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_client_async.test_delete_repository_does_not_exist.yaml index b2c8e984e582..22f83177db07 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_client_async.test_delete_repository_does_not_exist.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_client_async.test_delete_repository_does_not_exist.yaml @@ -19,7 +19,7 @@ interactions: connection: keep-alive content-length: '209' content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:23:59 GMT + date: Fri, 02 Apr 2021 16:55:03 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains @@ -47,11 +47,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:24:00 GMT + date: Fri, 02 Apr 2021 16:55:04 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '333.183333' + x-ms-ratelimit-remaining-calls-per-second: '333.266667' status: code: 200 message: OK @@ -75,11 +75,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:24:00 GMT + date: Fri, 02 Apr 2021 16:55:05 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '333.066667' + x-ms-ratelimit-remaining-calls-per-second: '333.1' status: code: 200 message: OK @@ -104,7 +104,7 @@ interactions: connection: keep-alive content-length: '121' content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:24:00 GMT + date: Fri, 02 Apr 2021 16:55:05 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_client_async.test_list_repositories.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_client_async.test_list_repositories.yaml index 241e9d7a9a9b..8627f8673ce2 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_client_async.test_list_repositories.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_client_async.test_list_repositories.yaml @@ -19,7 +19,7 @@ interactions: connection: keep-alive content-length: '196' content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:10:35 GMT + date: Fri, 02 Apr 2021 16:55:05 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains @@ -47,11 +47,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:10:36 GMT + date: Fri, 02 Apr 2021 16:55:06 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '332.683333' + x-ms-ratelimit-remaining-calls-per-second: '332.6' status: code: 200 message: OK @@ -75,11 +75,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:10:36 GMT + date: Fri, 02 Apr 2021 16:55:06 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '332.466667' + x-ms-ratelimit-remaining-calls-per-second: '332.583333' status: code: 200 message: OK @@ -103,7 +103,7 @@ interactions: connection: keep-alive content-length: '146' content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:10:36 GMT + date: Fri, 02 Apr 2021 16:55:06 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_delete_registry_artifact.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_delete_registry_artifact.yaml new file mode 100644 index 000000000000..0c45ae2e9392 --- /dev/null +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_delete_registry_artifact.yaml @@ -0,0 +1,502 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://fake_url.azurecr.io/acr/v1/to_be_deleted/_manifests + response: + body: + string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, + visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"repository","Name":"to_be_deleted","Action":"metadata_read"}]}]} + + ' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '216' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 02 Apr 2021 16:55:22 GMT + docker-distribution-api-version: + - registry/2.0 + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + - max-age=31536000; includeSubDomains + www-authenticate: Bearer realm="https://fake_url.azurecr.io/oauth2/token",service="fake_url.azurecr.io",scope="fake_scope",error="invalid_token" + x-content-type-options: + - nosniff + status: + code: 401 + message: Unauthorized +- request: + body: grant_type=access_token&service=seankane.azurecr.io&access_token=REDACTED + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '1343' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://fake_url.azurecr.io/oauth2/exchange + response: + body: + string: '{"refresh_token": "REDACTED"}' + headers: + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Fri, 02 Apr 2021 16:55:24 GMT + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + x-ms-ratelimit-remaining-calls-per-second: + - '333.3' + status: + code: 200 + message: OK +- request: + body: grant_type=refresh_token&service=seankane.azurecr.io&scope=repository%3Ato_be_deleted%3Ametadata_read&refresh_token=REDACTED + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '1081' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://fake_url.azurecr.io/oauth2/token + response: + body: + string: '{"access_token": "REDACTED"}' + headers: + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Fri, 02 Apr 2021 16:55:24 GMT + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + x-ms-ratelimit-remaining-calls-per-second: + - '333.133333' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://fake_url.azurecr.io/acr/v1/to_be_deleted/_manifests + response: + body: + string: '{"registry":"fake_url.azurecr.io","imageName":"to_be_deleted","manifests":[{"digest":"sha256:1b26826f602946860c279fce658f31050cff2c596583af237d971f4629b57792","imageSize":0,"createdTime":"2021-04-02T16:55:14.1239823Z","lastUpdateTime":"2021-04-02T16:55:14.1239823Z","architecture":"amd64","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:308866a43596e83578c7dfa15e27a73011bdd402185a84c5cd7f32a88b501a24","imageSize":0,"createdTime":"2021-04-02T16:55:13.528967Z","lastUpdateTime":"2021-04-02T16:55:13.528967Z","mediaType":"application/vnd.docker.distribution.manifest.list.v2+json","tags":["to_be_deleted"],"changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true}},{"digest":"sha256:50b8560ad574c779908da71f7ce370c0a2471c098d44d1c8f6b513c5a55eeeb1","imageSize":0,"createdTime":"2021-04-02T16:55:14.0192829Z","lastUpdateTime":"2021-04-02T16:55:14.0192829Z","architecture":"arm","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:88b2e00179bd6c4064612403c8d42a13de7ca809d61fee966ce9e129860a8a90","imageSize":0,"createdTime":"2021-04-02T16:55:15.1496744Z","lastUpdateTime":"2021-04-02T16:55:15.1496744Z","architecture":"mips64le","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:963612c5503f3f1674f315c67089dee577d8cc6afc18565e0b4183ae355fb343","imageSize":0,"createdTime":"2021-04-02T16:55:14.1732373Z","lastUpdateTime":"2021-04-02T16:55:14.1732373Z","architecture":"arm64","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:b0408a0f1d74eced127a2658429f336ed8fa48e36d59878f155b19865e5dbd70","imageSize":0,"createdTime":"2021-04-02T16:55:14.5006564Z","lastUpdateTime":"2021-04-02T16:55:14.5006564Z","architecture":"amd64","os":"windows","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:bb7ab0fa94fdd78aca84b27a1bd46c4b811051f9b69905d81f5f267fc6546a9d","imageSize":0,"createdTime":"2021-04-02T16:55:14.8259933Z","lastUpdateTime":"2021-04-02T16:55:14.8259933Z","architecture":"ppc64le","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:cb55d8f7347376e1ba38ca740904b43c9a52f66c7d2ae1ef1a0de1bc9f40df98","imageSize":0,"createdTime":"2021-04-02T16:55:14.2288139Z","lastUpdateTime":"2021-04-02T16:55:14.2288139Z","architecture":"386","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:e49abad529e5d9bd6787f3abeab94e09ba274fe34731349556a850b9aebbf7bf","imageSize":0,"createdTime":"2021-04-02T16:55:14.4515366Z","lastUpdateTime":"2021-04-02T16:55:14.4515366Z","architecture":"s390x","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:e5785cb0c62cebbed4965129bae371f0589cadd6d84798fb58c2c5f9e237efd9","imageSize":0,"createdTime":"2021-04-02T16:55:14.0920352Z","lastUpdateTime":"2021-04-02T16:55:14.0920352Z","architecture":"arm","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}}]} + + ' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Fri, 02 Apr 2021 16:55:25 GMT + docker-distribution-api-version: + - registry/2.0 + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://fake_url.azurecr.io/v2/to_be_deleted/manifests/sha256%3A1b26826f602946860c279fce658f31050cff2c596583af237d971f4629b57792 + response: + body: + string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, + visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"repository","Name":"to_be_deleted","Action":"delete"}]}]} + + ' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '209' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 02 Apr 2021 16:55:25 GMT + docker-distribution-api-version: + - registry/2.0 + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + - max-age=31536000; includeSubDomains + www-authenticate: Bearer realm="https://fake_url.azurecr.io/oauth2/token",service="fake_url.azurecr.io",scope="fake_scope",error="invalid_token" + x-content-type-options: + - nosniff + status: + code: 401 + message: Unauthorized +- request: + body: grant_type=access_token&service=seankane.azurecr.io&access_token=REDACTED + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '1343' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://fake_url.azurecr.io/oauth2/exchange + response: + body: + string: '{"refresh_token": "REDACTED"}' + headers: + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Fri, 02 Apr 2021 16:55:25 GMT + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + x-ms-ratelimit-remaining-calls-per-second: + - '333.116667' + status: + code: 200 + message: OK +- request: + body: grant_type=refresh_token&service=seankane.azurecr.io&scope=repository%3Ato_be_deleted%3Adelete&refresh_token=REDACTED + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '1074' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://fake_url.azurecr.io/oauth2/token + response: + body: + string: '{"access_token": "REDACTED"}' + headers: + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Fri, 02 Apr 2021 16:55:25 GMT + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + x-ms-ratelimit-remaining-calls-per-second: + - '333.1' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://fake_url.azurecr.io/v2/to_be_deleted/manifests/sha256%3A1b26826f602946860c279fce658f31050cff2c596583af237d971f4629b57792 + response: + body: + string: '' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '0' + date: + - Fri, 02 Apr 2021 16:55:25 GMT + docker-distribution-api-version: + - registry/2.0 + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-calls-per-second: + - '32.000000' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://fake_url.azurecr.io/acr/v1/to_be_deleted/_manifests + response: + body: + string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, + visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"repository","Name":"to_be_deleted","Action":"metadata_read"}]}]} + + ' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '216' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 02 Apr 2021 16:55:25 GMT + docker-distribution-api-version: + - registry/2.0 + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + - max-age=31536000; includeSubDomains + www-authenticate: Bearer realm="https://fake_url.azurecr.io/oauth2/token",service="fake_url.azurecr.io",scope="fake_scope",error="invalid_token" + x-content-type-options: + - nosniff + status: + code: 401 + message: Unauthorized +- request: + body: grant_type=access_token&service=seankane.azurecr.io&access_token=REDACTED + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '1343' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://fake_url.azurecr.io/oauth2/exchange + response: + body: + string: '{"refresh_token": "REDACTED"}' + headers: + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Fri, 02 Apr 2021 16:55:26 GMT + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + x-ms-ratelimit-remaining-calls-per-second: + - '333.083333' + status: + code: 200 + message: OK +- request: + body: grant_type=refresh_token&service=seankane.azurecr.io&scope=repository%3Ato_be_deleted%3Ametadata_read&refresh_token=REDACTED + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '1081' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://fake_url.azurecr.io/oauth2/token + response: + body: + string: '{"access_token": "REDACTED"}' + headers: + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Fri, 02 Apr 2021 16:55:26 GMT + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + x-ms-ratelimit-remaining-calls-per-second: + - '333.066667' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://fake_url.azurecr.io/acr/v1/to_be_deleted/_manifests + response: + body: + string: '{"registry":"fake_url.azurecr.io","imageName":"to_be_deleted","manifests":[{"digest":"sha256:308866a43596e83578c7dfa15e27a73011bdd402185a84c5cd7f32a88b501a24","imageSize":0,"createdTime":"2021-04-02T16:55:13.528967Z","lastUpdateTime":"2021-04-02T16:55:13.528967Z","mediaType":"application/vnd.docker.distribution.manifest.list.v2+json","tags":["to_be_deleted"],"changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true}},{"digest":"sha256:50b8560ad574c779908da71f7ce370c0a2471c098d44d1c8f6b513c5a55eeeb1","imageSize":0,"createdTime":"2021-04-02T16:55:14.0192829Z","lastUpdateTime":"2021-04-02T16:55:14.0192829Z","architecture":"arm","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:88b2e00179bd6c4064612403c8d42a13de7ca809d61fee966ce9e129860a8a90","imageSize":0,"createdTime":"2021-04-02T16:55:15.1496744Z","lastUpdateTime":"2021-04-02T16:55:15.1496744Z","architecture":"mips64le","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:963612c5503f3f1674f315c67089dee577d8cc6afc18565e0b4183ae355fb343","imageSize":0,"createdTime":"2021-04-02T16:55:14.1732373Z","lastUpdateTime":"2021-04-02T16:55:14.1732373Z","architecture":"arm64","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:b0408a0f1d74eced127a2658429f336ed8fa48e36d59878f155b19865e5dbd70","imageSize":0,"createdTime":"2021-04-02T16:55:14.5006564Z","lastUpdateTime":"2021-04-02T16:55:14.5006564Z","architecture":"amd64","os":"windows","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:bb7ab0fa94fdd78aca84b27a1bd46c4b811051f9b69905d81f5f267fc6546a9d","imageSize":0,"createdTime":"2021-04-02T16:55:14.8259933Z","lastUpdateTime":"2021-04-02T16:55:14.8259933Z","architecture":"ppc64le","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:cb55d8f7347376e1ba38ca740904b43c9a52f66c7d2ae1ef1a0de1bc9f40df98","imageSize":0,"createdTime":"2021-04-02T16:55:14.2288139Z","lastUpdateTime":"2021-04-02T16:55:14.2288139Z","architecture":"386","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:e49abad529e5d9bd6787f3abeab94e09ba274fe34731349556a850b9aebbf7bf","imageSize":0,"createdTime":"2021-04-02T16:55:14.4515366Z","lastUpdateTime":"2021-04-02T16:55:14.4515366Z","architecture":"s390x","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:e5785cb0c62cebbed4965129bae371f0589cadd6d84798fb58c2c5f9e237efd9","imageSize":0,"createdTime":"2021-04-02T16:55:14.0920352Z","lastUpdateTime":"2021-04-02T16:55:14.0920352Z","architecture":"arm","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}}]} + + ' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Fri, 02 Apr 2021 16:55:26 GMT + docker-distribution-api-version: + - registry/2.0 + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_delete_repository.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_delete_repository.yaml index 4f16d24f7f1c..67e591e0569a 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_delete_repository.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_delete_repository.yaml @@ -31,7 +31,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:24:16 GMT + - Fri, 02 Apr 2021 16:55:41 GMT docker-distribution-api-version: - registry/2.0 server: @@ -71,7 +71,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:24:17 GMT + - Fri, 02 Apr 2021 16:55:43 GMT server: - openresty strict-transport-security: @@ -79,7 +79,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.216667' + - '332.116667' status: code: 200 message: OK @@ -109,7 +109,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:24:17 GMT + - Fri, 02 Apr 2021 16:55:43 GMT server: - openresty strict-transport-security: @@ -117,7 +117,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '332.583333' + - '332.1' status: code: 200 message: OK @@ -152,7 +152,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:24:17 GMT + - Fri, 02 Apr 2021 16:55:43 GMT docker-distribution-api-version: - registry/2.0 server: @@ -199,7 +199,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:24:18 GMT + - Fri, 02 Apr 2021 16:55:43 GMT docker-distribution-api-version: - registry/2.0 server: @@ -239,7 +239,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:24:19 GMT + - Fri, 02 Apr 2021 16:55:45 GMT server: - openresty strict-transport-security: @@ -247,7 +247,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '332.55' + - '333.233333' status: code: 200 message: OK @@ -277,7 +277,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:24:19 GMT + - Fri, 02 Apr 2021 16:55:45 GMT server: - openresty strict-transport-security: @@ -285,7 +285,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '332.533333' + - '332.65' status: code: 200 message: OK @@ -322,7 +322,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:24:21 GMT + - Fri, 02 Apr 2021 16:55:47 GMT docker-distribution-api-version: - registry/2.0 server: @@ -369,7 +369,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:24:26 GMT + - Fri, 02 Apr 2021 16:55:52 GMT docker-distribution-api-version: - registry/2.0 server: @@ -409,7 +409,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:24:27 GMT + - Fri, 02 Apr 2021 16:55:52 GMT server: - openresty strict-transport-security: @@ -417,7 +417,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '332.566667' + - '332.533333' status: code: 200 message: OK @@ -447,7 +447,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:24:27 GMT + - Fri, 02 Apr 2021 16:55:53 GMT server: - openresty strict-transport-security: @@ -455,7 +455,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '332.55' + - '332.516667' status: code: 200 message: OK @@ -490,7 +490,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:24:27 GMT + - Fri, 02 Apr 2021 16:55:53 GMT docker-distribution-api-version: - registry/2.0 server: diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_delete_repository_doesnt_exist.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_delete_repository_doesnt_exist.yaml index 856e5b6952e8..24934d2ce788 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_delete_repository_doesnt_exist.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_delete_repository_doesnt_exist.yaml @@ -33,7 +33,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:24:28 GMT + - Fri, 02 Apr 2021 16:55:53 GMT docker-distribution-api-version: - registry/2.0 server: @@ -73,7 +73,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:24:29 GMT + - Fri, 02 Apr 2021 16:55:55 GMT server: - openresty strict-transport-security: @@ -81,7 +81,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '332.966667' + - '332.5' status: code: 200 message: OK @@ -111,7 +111,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:24:29 GMT + - Fri, 02 Apr 2021 16:55:55 GMT server: - openresty strict-transport-security: @@ -119,7 +119,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '332.883333' + - '332.483333' status: code: 200 message: OK @@ -157,7 +157,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:24:30 GMT + - Fri, 02 Apr 2021 16:55:55 GMT docker-distribution-api-version: - registry/2.0 server: diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_delete_tag.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_delete_tag.yaml index 6e000432a3d0..750503122c95 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_delete_tag.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_delete_tag.yaml @@ -11,11 +11,11 @@ interactions: User-Agent: - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) method: GET - uri: https://fake_url.azurecr.io/acr/v1/hello-world/_tags/to_be_deleted + uri: https://fake_url.azurecr.io/acr/v1/repoeb7113db/_tags/to_be_deleted response: body: string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, - visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"repository","Name":"hello-world","Action":"metadata_read"}]}]} + visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"repository","Name":"repoeb7113db","Action":"metadata_read"}]}]} ' headers: @@ -27,11 +27,11 @@ interactions: connection: - keep-alive content-length: - - '214' + - '215' content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:20 GMT + - Fri, 02 Apr 2021 17:02:27 GMT docker-distribution-api-version: - registry/2.0 server: @@ -71,7 +71,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:22 GMT + - Fri, 02 Apr 2021 17:02:29 GMT server: - openresty strict-transport-security: @@ -79,12 +79,12 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '332.766667' + - '332.7' status: code: 200 message: OK - request: - body: grant_type=refresh_token&service=seankane.azurecr.io&scope=repository%3Ahello-world%3Ametadata_read&refresh_token=REDACTED + body: grant_type=refresh_token&service=seankane.azurecr.io&scope=repository%3Arepoeb7113db%3Ametadata_read&refresh_token=REDACTED headers: Accept: - application/json @@ -93,7 +93,7 @@ interactions: Connection: - keep-alive Content-Length: - - '1079' + - '1080' Content-Type: - application/x-www-form-urlencoded User-Agent: @@ -109,7 +109,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:22 GMT + - Fri, 02 Apr 2021 17:02:29 GMT server: - openresty strict-transport-security: @@ -117,7 +117,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '332.75' + - '332.683333' status: code: 200 message: OK @@ -133,10 +133,10 @@ interactions: User-Agent: - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) method: GET - uri: https://fake_url.azurecr.io/acr/v1/hello-world/_tags/to_be_deleted + uri: https://fake_url.azurecr.io/acr/v1/repoeb7113db/_tags/to_be_deleted response: body: - string: '{"registry":"fake_url.azurecr.io","imageName":"hello-world","tag":{"name":"to_be_deleted","digest":"sha256:308866a43596e83578c7dfa15e27a73011bdd402185a84c5cd7f32a88b501a24","createdTime":"2021-04-02T12:54:19.2015953Z","lastUpdateTime":"2021-04-02T12:54:19.2015953Z","signed":false,"changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true}}} + string: '{"registry":"fake_url.azurecr.io","imageName":"repoeb7113db","tag":{"name":"to_be_deleted","digest":"sha256:308866a43596e83578c7dfa15e27a73011bdd402185a84c5cd7f32a88b501a24","createdTime":"2021-04-02T17:02:18.3845114Z","lastUpdateTime":"2021-04-02T17:02:18.3845114Z","signed":false,"changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true}}} ' headers: @@ -148,11 +148,11 @@ interactions: connection: - keep-alive content-length: - - '387' + - '388' content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:22 GMT + - Fri, 02 Apr 2021 17:02:29 GMT docker-distribution-api-version: - registry/2.0 server: @@ -179,11 +179,11 @@ interactions: User-Agent: - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://fake_url.azurecr.io/acr/v1/hello-world/_tags/to_be_deleted + uri: https://fake_url.azurecr.io/acr/v1/repoeb7113db/_tags/to_be_deleted response: body: string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, - visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"repository","Name":"hello-world","Action":"delete"}]}]} + visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"repository","Name":"repoeb7113db","Action":"delete"}]}]} ' headers: @@ -195,11 +195,11 @@ interactions: connection: - keep-alive content-length: - - '207' + - '208' content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:22 GMT + - Fri, 02 Apr 2021 17:02:29 GMT docker-distribution-api-version: - registry/2.0 server: @@ -239,7 +239,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:22 GMT + - Fri, 02 Apr 2021 17:02:29 GMT server: - openresty strict-transport-security: @@ -247,12 +247,12 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '332.733333' + - '332.666667' status: code: 200 message: OK - request: - body: grant_type=refresh_token&service=seankane.azurecr.io&scope=repository%3Ahello-world%3Adelete&refresh_token=REDACTED + body: grant_type=refresh_token&service=seankane.azurecr.io&scope=repository%3Arepoeb7113db%3Adelete&refresh_token=REDACTED headers: Accept: - application/json @@ -261,7 +261,7 @@ interactions: Connection: - keep-alive Content-Length: - - '1072' + - '1073' Content-Type: - application/x-www-form-urlencoded User-Agent: @@ -277,7 +277,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:23 GMT + - Fri, 02 Apr 2021 17:02:29 GMT server: - openresty strict-transport-security: @@ -285,7 +285,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '332.716667' + - '332.65' status: code: 200 message: OK @@ -303,7 +303,7 @@ interactions: User-Agent: - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://fake_url.azurecr.io/acr/v1/hello-world/_tags/to_be_deleted + uri: https://fake_url.azurecr.io/acr/v1/repoeb7113db/_tags/to_be_deleted response: body: string: '' @@ -318,7 +318,7 @@ interactions: content-length: - '0' date: - - Fri, 02 Apr 2021 16:11:23 GMT + - Fri, 02 Apr 2021 17:02:30 GMT docker-distribution-api-version: - registry/2.0 server: @@ -347,11 +347,11 @@ interactions: User-Agent: - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) method: GET - uri: https://fake_url.azurecr.io/acr/v1/hello-world/_tags/to_be_deleted + uri: https://fake_url.azurecr.io/acr/v1/repoeb7113db/_tags/to_be_deleted response: body: string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, - visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"repository","Name":"hello-world","Action":"metadata_read"}]}]} + visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"repository","Name":"repoeb7113db","Action":"metadata_read"}]}]} ' headers: @@ -363,11 +363,11 @@ interactions: connection: - keep-alive content-length: - - '214' + - '215' content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:33 GMT + - Fri, 02 Apr 2021 17:02:35 GMT docker-distribution-api-version: - registry/2.0 server: @@ -407,7 +407,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:33 GMT + - Fri, 02 Apr 2021 17:02:35 GMT server: - openresty strict-transport-security: @@ -415,12 +415,12 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '332.85' + - '332.8' status: code: 200 message: OK - request: - body: grant_type=refresh_token&service=seankane.azurecr.io&scope=repository%3Ahello-world%3Ametadata_read&refresh_token=REDACTED + body: grant_type=refresh_token&service=seankane.azurecr.io&scope=repository%3Arepoeb7113db%3Ametadata_read&refresh_token=REDACTED headers: Accept: - application/json @@ -429,7 +429,7 @@ interactions: Connection: - keep-alive Content-Length: - - '1079' + - '1080' Content-Type: - application/x-www-form-urlencoded User-Agent: @@ -445,7 +445,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:34 GMT + - Fri, 02 Apr 2021 17:02:35 GMT server: - openresty strict-transport-security: @@ -453,7 +453,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '332.833333' + - '332.783333' status: code: 200 message: OK @@ -469,7 +469,7 @@ interactions: User-Agent: - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) method: GET - uri: https://fake_url.azurecr.io/acr/v1/hello-world/_tags/to_be_deleted + uri: https://fake_url.azurecr.io/acr/v1/repoeb7113db/_tags/to_be_deleted response: body: string: '{"errors":[{"code":"TAG_UNKNOWN","message":"the specified tag does @@ -489,7 +489,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:34 GMT + - Fri, 02 Apr 2021 17:02:35 GMT docker-distribution-api-version: - registry/2.0 server: diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_get_attributes.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_get_attributes.yaml deleted file mode 100644 index acc2cbe758e1..000000000000 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_get_attributes.yaml +++ /dev/null @@ -1,168 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://fake_url.azurecr.io/acr/v1/hello-world - response: - body: - string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, - visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"repository","Name":"hello-world","Action":"metadata_read"}]}]} - - ' - headers: - access-control-expose-headers: - - Docker-Content-Digest - - WWW-Authenticate - - Link - - X-Ms-Correlation-Request-Id - connection: - - keep-alive - content-length: - - '214' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 02 Apr 2021 16:11:34 GMT - docker-distribution-api-version: - - registry/2.0 - server: - - openresty - strict-transport-security: - - max-age=31536000; includeSubDomains - - max-age=31536000; includeSubDomains - www-authenticate: Bearer realm="https://fake_url.azurecr.io/oauth2/token",service="fake_url.azurecr.io",scope="fake_scope",error="invalid_token" - x-content-type-options: - - nosniff - status: - code: 401 - message: Unauthorized -- request: - body: grant_type=access_token&service=seankane.azurecr.io&access_token=REDACTED - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '1343' - Content-Type: - - application/x-www-form-urlencoded - User-Agent: - - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) - method: POST - uri: https://fake_url.azurecr.io/oauth2/exchange - response: - body: - string: '{"refresh_token": "REDACTED"}' - headers: - connection: - - keep-alive - content-type: - - application/json; charset=utf-8 - date: - - Fri, 02 Apr 2021 16:11:36 GMT - server: - - openresty - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - x-ms-ratelimit-remaining-calls-per-second: - - '333' - status: - code: 200 - message: OK -- request: - body: grant_type=refresh_token&service=seankane.azurecr.io&scope=repository%3Ahello-world%3Ametadata_read&refresh_token=REDACTED - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '1079' - Content-Type: - - application/x-www-form-urlencoded - User-Agent: - - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) - method: POST - uri: https://fake_url.azurecr.io/oauth2/token - response: - body: - string: '{"access_token": "REDACTED"}' - headers: - connection: - - keep-alive - content-type: - - application/json; charset=utf-8 - date: - - Fri, 02 Apr 2021 16:11:36 GMT - server: - - openresty - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - x-ms-ratelimit-remaining-calls-per-second: - - '332.933333' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://fake_url.azurecr.io/acr/v1/hello-world - response: - body: - string: '{"registry":"fake_url.azurecr.io","imageName":"hello-world","createdTime":"2021-03-30T12:18:47.4147491Z","lastUpdateTime":"2021-04-02T16:11:23.4366473Z","manifestCount":10,"tagCount":1,"changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true}} - - ' - headers: - access-control-expose-headers: - - Docker-Content-Digest - - WWW-Authenticate - - Link - - X-Ms-Correlation-Request-Id - connection: - - keep-alive - content-length: - - '290' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 02 Apr 2021 16:11:36 GMT - docker-distribution-api-version: - - registry/2.0 - server: - - openresty - strict-transport-security: - - max-age=31536000; includeSubDomains - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_get_properties.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_get_properties.yaml index a8d67a3f1bf8..6eeae6f9022c 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_get_properties.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_get_properties.yaml @@ -31,7 +31,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:37 GMT + - Fri, 02 Apr 2021 16:56:13 GMT docker-distribution-api-version: - registry/2.0 server: @@ -71,7 +71,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:38 GMT + - Fri, 02 Apr 2021 16:56:14 GMT server: - openresty strict-transport-security: @@ -79,7 +79,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.266667' + - '332.5' status: code: 200 message: OK @@ -109,7 +109,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:38 GMT + - Fri, 02 Apr 2021 16:56:15 GMT server: - openresty strict-transport-security: @@ -117,7 +117,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.1' + - '333.133333' status: code: 200 message: OK @@ -136,7 +136,7 @@ interactions: uri: https://fake_url.azurecr.io/acr/v1/hello-world response: body: - string: '{"registry":"fake_url.azurecr.io","imageName":"hello-world","createdTime":"2021-03-30T12:18:47.4147491Z","lastUpdateTime":"2021-04-02T16:11:23.4366473Z","manifestCount":10,"tagCount":1,"changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true}} + string: '{"registry":"fake_url.azurecr.io","imageName":"hello-world","createdTime":"2021-03-30T12:18:47.4147491Z","lastUpdateTime":"2021-04-02T16:53:06.5636497Z","manifestCount":10,"tagCount":1,"changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true}} ' headers: @@ -152,7 +152,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:38 GMT + - Fri, 02 Apr 2021 16:56:15 GMT docker-distribution-api-version: - registry/2.0 server: diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_get_registry_artifact_properties.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_get_registry_artifact_properties.yaml index 0f2655041aaa..5494b01be3da 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_get_registry_artifact_properties.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_get_registry_artifact_properties.yaml @@ -31,7 +31,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:39 GMT + - Fri, 02 Apr 2021 16:56:15 GMT docker-distribution-api-version: - registry/2.0 server: @@ -71,7 +71,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:40 GMT + - Fri, 02 Apr 2021 16:56:17 GMT server: - openresty strict-transport-security: @@ -79,7 +79,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.283333' + - '332.65' status: code: 200 message: OK @@ -109,7 +109,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:40 GMT + - Fri, 02 Apr 2021 16:56:17 GMT server: - openresty strict-transport-security: @@ -117,7 +117,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.066667' + - '332.633333' status: code: 200 message: OK @@ -152,7 +152,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:41 GMT + - Fri, 02 Apr 2021 16:56:17 GMT docker-distribution-api-version: - registry/2.0 server: @@ -197,7 +197,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:41 GMT + - Fri, 02 Apr 2021 16:56:17 GMT docker-distribution-api-version: - registry/2.0 server: @@ -237,7 +237,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:41 GMT + - Fri, 02 Apr 2021 16:56:17 GMT server: - openresty strict-transport-security: @@ -245,7 +245,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.05' + - '332.616667' status: code: 200 message: OK @@ -275,7 +275,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:41 GMT + - Fri, 02 Apr 2021 16:56:17 GMT server: - openresty strict-transport-security: @@ -283,7 +283,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.033333' + - '332.6' status: code: 200 message: OK @@ -320,7 +320,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:41 GMT + - Fri, 02 Apr 2021 16:56:18 GMT docker-distribution-api-version: - registry/2.0 server: diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_get_tag.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_get_tag.yaml index d3733b820f8d..b52ebe7a550b 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_get_tag.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_get_tag.yaml @@ -31,7 +31,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:42 GMT + - Fri, 02 Apr 2021 16:56:18 GMT docker-distribution-api-version: - registry/2.0 server: @@ -71,7 +71,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:43 GMT + - Fri, 02 Apr 2021 16:56:20 GMT server: - openresty strict-transport-security: @@ -79,7 +79,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.283333' + - '333.083333' status: code: 200 message: OK @@ -109,7 +109,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:43 GMT + - Fri, 02 Apr 2021 16:56:20 GMT server: - openresty strict-transport-security: @@ -117,7 +117,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.166667' + - '333.066667' status: code: 200 message: OK @@ -152,7 +152,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:44 GMT + - Fri, 02 Apr 2021 16:56:20 GMT docker-distribution-api-version: - registry/2.0 server: diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_list_registry_artifacts.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_list_registry_artifacts.yaml index a12274d63b2d..1eaaaed08087 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_list_registry_artifacts.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_list_registry_artifacts.yaml @@ -31,7 +31,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:44 GMT + - Fri, 02 Apr 2021 16:56:20 GMT docker-distribution-api-version: - registry/2.0 server: @@ -71,7 +71,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:46 GMT + - Fri, 02 Apr 2021 16:56:22 GMT server: - openresty strict-transport-security: @@ -79,7 +79,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.083333' + - '332.733333' status: code: 200 message: OK @@ -109,7 +109,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:46 GMT + - Fri, 02 Apr 2021 16:56:22 GMT server: - openresty strict-transport-security: @@ -117,7 +117,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.066667' + - '332.716667' status: code: 200 message: OK @@ -136,7 +136,7 @@ interactions: uri: https://fake_url.azurecr.io/acr/v1/hello-world/_manifests response: body: - string: '{"registry":"fake_url.azurecr.io","imageName":"hello-world","manifests":[{"digest":"sha256:1b26826f602946860c279fce658f31050cff2c596583af237d971f4629b57792","imageSize":0,"createdTime":"2021-03-30T12:18:47.6437335Z","lastUpdateTime":"2021-03-30T12:18:47.6437335Z","architecture":"amd64","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":false,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:308866a43596e83578c7dfa15e27a73011bdd402185a84c5cd7f32a88b501a24","imageSize":0,"createdTime":"2021-03-30T12:18:47.4863064Z","lastUpdateTime":"2021-03-30T12:18:47.4863064Z","mediaType":"application/vnd.docker.distribution.manifest.list.v2+json","tags":["latest"],"changeableAttributes":{"deleteEnabled":true,"writeEnabled":false,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:50b8560ad574c779908da71f7ce370c0a2471c098d44d1c8f6b513c5a55eeeb1","imageSize":0,"createdTime":"2021-03-30T12:18:48.9950981Z","lastUpdateTime":"2021-03-30T12:18:48.9950981Z","architecture":"arm","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:88b2e00179bd6c4064612403c8d42a13de7ca809d61fee966ce9e129860a8a90","imageSize":0,"createdTime":"2021-03-30T12:18:48.0921265Z","lastUpdateTime":"2021-03-30T12:18:48.0921265Z","architecture":"mips64le","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:963612c5503f3f1674f315c67089dee577d8cc6afc18565e0b4183ae355fb343","imageSize":0,"createdTime":"2021-03-30T12:18:47.9641681Z","lastUpdateTime":"2021-03-30T12:18:47.9641681Z","architecture":"arm64","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:b0408a0f1d74eced127a2658429f336ed8fa48e36d59878f155b19865e5dbd70","imageSize":0,"createdTime":"2021-03-30T12:18:48.6908523Z","lastUpdateTime":"2021-03-30T12:18:48.6908523Z","architecture":"amd64","os":"windows","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:bb7ab0fa94fdd78aca84b27a1bd46c4b811051f9b69905d81f5f267fc6546a9d","imageSize":0,"createdTime":"2021-03-30T12:18:48.2834053Z","lastUpdateTime":"2021-03-30T12:18:48.2834053Z","architecture":"ppc64le","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:cb55d8f7347376e1ba38ca740904b43c9a52f66c7d2ae1ef1a0de1bc9f40df98","imageSize":0,"createdTime":"2021-03-30T12:18:48.1605587Z","lastUpdateTime":"2021-03-30T12:18:48.1605587Z","architecture":"386","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:e49abad529e5d9bd6787f3abeab94e09ba274fe34731349556a850b9aebbf7bf","imageSize":0,"createdTime":"2021-03-30T12:18:48.5864242Z","lastUpdateTime":"2021-03-30T12:18:48.5864242Z","architecture":"s390x","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:e5785cb0c62cebbed4965129bae371f0589cadd6d84798fb58c2c5f9e237efd9","imageSize":0,"createdTime":"2021-03-30T12:18:48.4392605Z","lastUpdateTime":"2021-03-30T12:18:48.4392605Z","architecture":"arm","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}}]} + string: '{"registry":"fake_url.azurecr.io","imageName":"hello-world","manifests":[{"digest":"sha256:1b26826f602946860c279fce658f31050cff2c596583af237d971f4629b57792","imageSize":0,"createdTime":"2021-03-30T12:18:47.6437335Z","lastUpdateTime":"2021-03-30T12:18:47.6437335Z","architecture":"amd64","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:308866a43596e83578c7dfa15e27a73011bdd402185a84c5cd7f32a88b501a24","imageSize":0,"createdTime":"2021-03-30T12:18:47.4863064Z","lastUpdateTime":"2021-03-30T12:18:47.4863064Z","mediaType":"application/vnd.docker.distribution.manifest.list.v2+json","tags":["latest"],"changeableAttributes":{"deleteEnabled":true,"writeEnabled":false,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:50b8560ad574c779908da71f7ce370c0a2471c098d44d1c8f6b513c5a55eeeb1","imageSize":0,"createdTime":"2021-03-30T12:18:48.9950981Z","lastUpdateTime":"2021-03-30T12:18:48.9950981Z","architecture":"arm","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:88b2e00179bd6c4064612403c8d42a13de7ca809d61fee966ce9e129860a8a90","imageSize":0,"createdTime":"2021-03-30T12:18:48.0921265Z","lastUpdateTime":"2021-03-30T12:18:48.0921265Z","architecture":"mips64le","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:963612c5503f3f1674f315c67089dee577d8cc6afc18565e0b4183ae355fb343","imageSize":0,"createdTime":"2021-03-30T12:18:47.9641681Z","lastUpdateTime":"2021-03-30T12:18:47.9641681Z","architecture":"arm64","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:b0408a0f1d74eced127a2658429f336ed8fa48e36d59878f155b19865e5dbd70","imageSize":0,"createdTime":"2021-03-30T12:18:48.6908523Z","lastUpdateTime":"2021-03-30T12:18:48.6908523Z","architecture":"amd64","os":"windows","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:bb7ab0fa94fdd78aca84b27a1bd46c4b811051f9b69905d81f5f267fc6546a9d","imageSize":0,"createdTime":"2021-03-30T12:18:48.2834053Z","lastUpdateTime":"2021-03-30T12:18:48.2834053Z","architecture":"ppc64le","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:cb55d8f7347376e1ba38ca740904b43c9a52f66c7d2ae1ef1a0de1bc9f40df98","imageSize":0,"createdTime":"2021-03-30T12:18:48.1605587Z","lastUpdateTime":"2021-03-30T12:18:48.1605587Z","architecture":"386","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:e49abad529e5d9bd6787f3abeab94e09ba274fe34731349556a850b9aebbf7bf","imageSize":0,"createdTime":"2021-03-30T12:18:48.5864242Z","lastUpdateTime":"2021-03-30T12:18:48.5864242Z","architecture":"s390x","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:e5785cb0c62cebbed4965129bae371f0589cadd6d84798fb58c2c5f9e237efd9","imageSize":0,"createdTime":"2021-03-30T12:18:48.4392605Z","lastUpdateTime":"2021-03-30T12:18:48.4392605Z","architecture":"arm","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}}]} ' headers: @@ -150,7 +150,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:47 GMT + - Fri, 02 Apr 2021 16:56:23 GMT docker-distribution-api-version: - registry/2.0 server: diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_list_tags.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_list_tags.yaml index ea15fd7c2656..060f99bcb63d 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_list_tags.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_list_tags.yaml @@ -31,7 +31,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:47 GMT + - Fri, 02 Apr 2021 16:56:23 GMT docker-distribution-api-version: - registry/2.0 server: @@ -71,7 +71,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:48 GMT + - Fri, 02 Apr 2021 16:56:24 GMT server: - openresty strict-transport-security: @@ -79,7 +79,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.05' + - '333.3' status: code: 200 message: OK @@ -109,7 +109,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:49 GMT + - Fri, 02 Apr 2021 16:56:24 GMT server: - openresty strict-transport-security: @@ -117,7 +117,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.033333' + - '332.666667' status: code: 200 message: OK @@ -152,7 +152,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:49 GMT + - Fri, 02 Apr 2021 16:56:25 GMT docker-distribution-api-version: - registry/2.0 server: diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_list_tags_descending.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_list_tags_descending.yaml index d085e8c8b86f..2e9e6d7f0a1d 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_list_tags_descending.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_list_tags_descending.yaml @@ -31,7 +31,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:49 GMT + - Fri, 02 Apr 2021 16:56:25 GMT docker-distribution-api-version: - registry/2.0 server: @@ -71,7 +71,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:51 GMT + - Fri, 02 Apr 2021 16:56:26 GMT server: - openresty strict-transport-security: @@ -79,7 +79,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.016667' + - '332.333333' status: code: 200 message: OK @@ -109,7 +109,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:51 GMT + - Fri, 02 Apr 2021 16:56:26 GMT server: - openresty strict-transport-security: @@ -117,7 +117,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '332.966667' + - '332.316667' status: code: 200 message: OK @@ -152,7 +152,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:51 GMT + - Fri, 02 Apr 2021 16:56:27 GMT docker-distribution-api-version: - registry/2.0 server: diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_set_manifest_properties.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_set_manifest_properties.yaml index 484f6c7ca163..4f112da0a4da 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_set_manifest_properties.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_set_manifest_properties.yaml @@ -31,7 +31,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:51 GMT + - Fri, 02 Apr 2021 16:56:27 GMT docker-distribution-api-version: - registry/2.0 server: @@ -71,7 +71,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:53 GMT + - Fri, 02 Apr 2021 16:56:29 GMT server: - openresty strict-transport-security: @@ -79,7 +79,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.266667' + - '332.35' status: code: 200 message: OK @@ -109,7 +109,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:53 GMT + - Fri, 02 Apr 2021 16:56:29 GMT server: - openresty strict-transport-security: @@ -117,7 +117,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.016667' + - '332.333333' status: code: 200 message: OK @@ -136,7 +136,7 @@ interactions: uri: https://fake_url.azurecr.io/acr/v1/hello-world/_manifests response: body: - string: '{"registry":"fake_url.azurecr.io","imageName":"hello-world","manifests":[{"digest":"sha256:1b26826f602946860c279fce658f31050cff2c596583af237d971f4629b57792","imageSize":0,"createdTime":"2021-03-30T12:18:47.6437335Z","lastUpdateTime":"2021-03-30T12:18:47.6437335Z","architecture":"amd64","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":false,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:308866a43596e83578c7dfa15e27a73011bdd402185a84c5cd7f32a88b501a24","imageSize":0,"createdTime":"2021-03-30T12:18:47.4863064Z","lastUpdateTime":"2021-03-30T12:18:47.4863064Z","mediaType":"application/vnd.docker.distribution.manifest.list.v2+json","tags":["latest"],"changeableAttributes":{"deleteEnabled":true,"writeEnabled":false,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:50b8560ad574c779908da71f7ce370c0a2471c098d44d1c8f6b513c5a55eeeb1","imageSize":0,"createdTime":"2021-03-30T12:18:48.9950981Z","lastUpdateTime":"2021-03-30T12:18:48.9950981Z","architecture":"arm","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:88b2e00179bd6c4064612403c8d42a13de7ca809d61fee966ce9e129860a8a90","imageSize":0,"createdTime":"2021-03-30T12:18:48.0921265Z","lastUpdateTime":"2021-03-30T12:18:48.0921265Z","architecture":"mips64le","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:963612c5503f3f1674f315c67089dee577d8cc6afc18565e0b4183ae355fb343","imageSize":0,"createdTime":"2021-03-30T12:18:47.9641681Z","lastUpdateTime":"2021-03-30T12:18:47.9641681Z","architecture":"arm64","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:b0408a0f1d74eced127a2658429f336ed8fa48e36d59878f155b19865e5dbd70","imageSize":0,"createdTime":"2021-03-30T12:18:48.6908523Z","lastUpdateTime":"2021-03-30T12:18:48.6908523Z","architecture":"amd64","os":"windows","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:bb7ab0fa94fdd78aca84b27a1bd46c4b811051f9b69905d81f5f267fc6546a9d","imageSize":0,"createdTime":"2021-03-30T12:18:48.2834053Z","lastUpdateTime":"2021-03-30T12:18:48.2834053Z","architecture":"ppc64le","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:cb55d8f7347376e1ba38ca740904b43c9a52f66c7d2ae1ef1a0de1bc9f40df98","imageSize":0,"createdTime":"2021-03-30T12:18:48.1605587Z","lastUpdateTime":"2021-03-30T12:18:48.1605587Z","architecture":"386","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:e49abad529e5d9bd6787f3abeab94e09ba274fe34731349556a850b9aebbf7bf","imageSize":0,"createdTime":"2021-03-30T12:18:48.5864242Z","lastUpdateTime":"2021-03-30T12:18:48.5864242Z","architecture":"s390x","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:e5785cb0c62cebbed4965129bae371f0589cadd6d84798fb58c2c5f9e237efd9","imageSize":0,"createdTime":"2021-03-30T12:18:48.4392605Z","lastUpdateTime":"2021-03-30T12:18:48.4392605Z","architecture":"arm","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}}]} + string: '{"registry":"fake_url.azurecr.io","imageName":"hello-world","manifests":[{"digest":"sha256:1b26826f602946860c279fce658f31050cff2c596583af237d971f4629b57792","imageSize":0,"createdTime":"2021-03-30T12:18:47.6437335Z","lastUpdateTime":"2021-03-30T12:18:47.6437335Z","architecture":"amd64","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:308866a43596e83578c7dfa15e27a73011bdd402185a84c5cd7f32a88b501a24","imageSize":0,"createdTime":"2021-03-30T12:18:47.4863064Z","lastUpdateTime":"2021-03-30T12:18:47.4863064Z","mediaType":"application/vnd.docker.distribution.manifest.list.v2+json","tags":["latest"],"changeableAttributes":{"deleteEnabled":true,"writeEnabled":false,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:50b8560ad574c779908da71f7ce370c0a2471c098d44d1c8f6b513c5a55eeeb1","imageSize":0,"createdTime":"2021-03-30T12:18:48.9950981Z","lastUpdateTime":"2021-03-30T12:18:48.9950981Z","architecture":"arm","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:88b2e00179bd6c4064612403c8d42a13de7ca809d61fee966ce9e129860a8a90","imageSize":0,"createdTime":"2021-03-30T12:18:48.0921265Z","lastUpdateTime":"2021-03-30T12:18:48.0921265Z","architecture":"mips64le","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:963612c5503f3f1674f315c67089dee577d8cc6afc18565e0b4183ae355fb343","imageSize":0,"createdTime":"2021-03-30T12:18:47.9641681Z","lastUpdateTime":"2021-03-30T12:18:47.9641681Z","architecture":"arm64","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:b0408a0f1d74eced127a2658429f336ed8fa48e36d59878f155b19865e5dbd70","imageSize":0,"createdTime":"2021-03-30T12:18:48.6908523Z","lastUpdateTime":"2021-03-30T12:18:48.6908523Z","architecture":"amd64","os":"windows","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:bb7ab0fa94fdd78aca84b27a1bd46c4b811051f9b69905d81f5f267fc6546a9d","imageSize":0,"createdTime":"2021-03-30T12:18:48.2834053Z","lastUpdateTime":"2021-03-30T12:18:48.2834053Z","architecture":"ppc64le","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:cb55d8f7347376e1ba38ca740904b43c9a52f66c7d2ae1ef1a0de1bc9f40df98","imageSize":0,"createdTime":"2021-03-30T12:18:48.1605587Z","lastUpdateTime":"2021-03-30T12:18:48.1605587Z","architecture":"386","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:e49abad529e5d9bd6787f3abeab94e09ba274fe34731349556a850b9aebbf7bf","imageSize":0,"createdTime":"2021-03-30T12:18:48.5864242Z","lastUpdateTime":"2021-03-30T12:18:48.5864242Z","architecture":"s390x","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:e5785cb0c62cebbed4965129bae371f0589cadd6d84798fb58c2c5f9e237efd9","imageSize":0,"createdTime":"2021-03-30T12:18:48.4392605Z","lastUpdateTime":"2021-03-30T12:18:48.4392605Z","architecture":"arm","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}}]} ' headers: @@ -150,7 +150,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:54 GMT + - Fri, 02 Apr 2021 16:56:29 GMT docker-distribution-api-version: - registry/2.0 server: @@ -165,350 +165,4 @@ interactions: status: code: 200 message: OK -- request: - body: '{"deleteEnabled": true, "writeEnabled": true, "listEnabled": true, "readEnabled": - true}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '87' - Content-Type: - - application/json - User-Agent: - - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) - method: PATCH - uri: https://fake_url.azurecr.io/acr/v1/hello-world/_manifests/sha256%3A1b26826f602946860c279fce658f31050cff2c596583af237d971f4629b57792 - response: - body: - string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, - visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"repository","Name":"hello-world","Action":"metadata_write"}]}]} - - ' - headers: - access-control-expose-headers: - - Docker-Content-Digest - - WWW-Authenticate - - Link - - X-Ms-Correlation-Request-Id - connection: - - keep-alive - content-length: - - '215' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 02 Apr 2021 16:11:54 GMT - docker-distribution-api-version: - - registry/2.0 - server: - - openresty - strict-transport-security: - - max-age=31536000; includeSubDomains - - max-age=31536000; includeSubDomains - www-authenticate: Bearer realm="https://fake_url.azurecr.io/oauth2/token",service="fake_url.azurecr.io",scope="fake_scope",error="invalid_token" - x-content-type-options: - - nosniff - status: - code: 401 - message: Unauthorized -- request: - body: grant_type=access_token&service=seankane.azurecr.io&access_token=REDACTED - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '1343' - Content-Type: - - application/x-www-form-urlencoded - User-Agent: - - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) - method: POST - uri: https://fake_url.azurecr.io/oauth2/exchange - response: - body: - string: '{"refresh_token": "REDACTED"}' - headers: - connection: - - keep-alive - content-type: - - application/json; charset=utf-8 - date: - - Fri, 02 Apr 2021 16:11:54 GMT - server: - - openresty - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - x-ms-ratelimit-remaining-calls-per-second: - - '333' - status: - code: 200 - message: OK -- request: - body: grant_type=refresh_token&service=seankane.azurecr.io&scope=repository%3Ahello-world%3Ametadata_write&refresh_token=REDACTED - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '1080' - Content-Type: - - application/x-www-form-urlencoded - User-Agent: - - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) - method: POST - uri: https://fake_url.azurecr.io/oauth2/token - response: - body: - string: '{"access_token": "REDACTED"}' - headers: - connection: - - keep-alive - content-type: - - application/json; charset=utf-8 - date: - - Fri, 02 Apr 2021 16:11:54 GMT - server: - - openresty - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - x-ms-ratelimit-remaining-calls-per-second: - - '332.983333' - status: - code: 200 - message: OK -- request: - body: '{"deleteEnabled": true, "writeEnabled": true, "listEnabled": true, "readEnabled": - true}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '87' - Content-Type: - - application/json - User-Agent: - - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) - method: PATCH - uri: https://fake_url.azurecr.io/acr/v1/hello-world/_manifests/sha256%3A1b26826f602946860c279fce658f31050cff2c596583af237d971f4629b57792 - response: - body: - string: '{"registry":"fake_url.azurecr.io","imageName":"hello-world","manifest":{"digest":"sha256:1b26826f602946860c279fce658f31050cff2c596583af237d971f4629b57792","imageSize":0,"createdTime":"2021-03-30T12:18:47.6437335Z","lastUpdateTime":"2021-03-30T12:18:47.6437335Z","architecture":"amd64","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineDetails":"{\"state\":\"Scan - InProgress\",\"link\":\"https://aka.ms/test\",\"scanner\":\"Azure Security - Monitoring-Qualys Scanner\",\"result\":{\"version\":\"4/2/2021 4:10:02 PM\",\"summary\":[{\"severity\":\"High\",\"count\":0},{\"severity\":\"Medium\",\"count\":0},{\"severity\":\"Low\",\"count\":0}]}}","quarantineState":"Passed"}}} - - ' - headers: - access-control-expose-headers: - - Docker-Content-Digest - - WWW-Authenticate - - Link - - X-Ms-Correlation-Request-Id - connection: - - keep-alive - content-length: - - '814' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 02 Apr 2021 16:11:55 GMT - docker-distribution-api-version: - - registry/2.0 - server: - - openresty - strict-transport-security: - - max-age=31536000; includeSubDomains - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://fake_url.azurecr.io/acr/v1/hello-world/_manifests/sha256%3A1b26826f602946860c279fce658f31050cff2c596583af237d971f4629b57792 - response: - body: - string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, - visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"repository","Name":"hello-world","Action":"metadata_read"}]}]} - - ' - headers: - access-control-expose-headers: - - Docker-Content-Digest - - WWW-Authenticate - - Link - - X-Ms-Correlation-Request-Id - connection: - - keep-alive - content-length: - - '214' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 02 Apr 2021 16:11:55 GMT - docker-distribution-api-version: - - registry/2.0 - server: - - openresty - strict-transport-security: - - max-age=31536000; includeSubDomains - - max-age=31536000; includeSubDomains - www-authenticate: Bearer realm="https://fake_url.azurecr.io/oauth2/token",service="fake_url.azurecr.io",scope="fake_scope",error="invalid_token" - x-content-type-options: - - nosniff - status: - code: 401 - message: Unauthorized -- request: - body: grant_type=access_token&service=seankane.azurecr.io&access_token=REDACTED - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '1343' - Content-Type: - - application/x-www-form-urlencoded - User-Agent: - - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) - method: POST - uri: https://fake_url.azurecr.io/oauth2/exchange - response: - body: - string: '{"refresh_token": "REDACTED"}' - headers: - connection: - - keep-alive - content-type: - - application/json; charset=utf-8 - date: - - Fri, 02 Apr 2021 16:11:55 GMT - server: - - openresty - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - x-ms-ratelimit-remaining-calls-per-second: - - '332.966667' - status: - code: 200 - message: OK -- request: - body: grant_type=refresh_token&service=seankane.azurecr.io&scope=repository%3Ahello-world%3Ametadata_read&refresh_token=REDACTED - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '1079' - Content-Type: - - application/x-www-form-urlencoded - User-Agent: - - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) - method: POST - uri: https://fake_url.azurecr.io/oauth2/token - response: - body: - string: '{"access_token": "REDACTED"}' - headers: - connection: - - keep-alive - content-type: - - application/json; charset=utf-8 - date: - - Fri, 02 Apr 2021 16:11:55 GMT - server: - - openresty - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - x-ms-ratelimit-remaining-calls-per-second: - - '332.95' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://fake_url.azurecr.io/acr/v1/hello-world/_manifests/sha256%3A1b26826f602946860c279fce658f31050cff2c596583af237d971f4629b57792 - response: - body: - string: '{"registry":"fake_url.azurecr.io","imageName":"hello-world","manifest":{"digest":"sha256:1b26826f602946860c279fce658f31050cff2c596583af237d971f4629b57792","imageSize":0,"createdTime":"2021-03-30T12:18:47.6437335Z","lastUpdateTime":"2021-03-30T12:18:47.6437335Z","architecture":"amd64","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineDetails":"{\"state\":\"Scan - InProgress\",\"link\":\"https://aka.ms/test\",\"scanner\":\"Azure Security - Monitoring-Qualys Scanner\",\"result\":{\"version\":\"4/2/2021 4:10:02 PM\",\"summary\":[{\"severity\":\"High\",\"count\":0},{\"severity\":\"Medium\",\"count\":0},{\"severity\":\"Low\",\"count\":0}]}}","quarantineState":"Passed"}}} - - ' - headers: - access-control-expose-headers: - - Docker-Content-Digest - - WWW-Authenticate - - Link - - X-Ms-Correlation-Request-Id - connection: - - keep-alive - content-length: - - '814' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 02 Apr 2021 16:11:55 GMT - docker-distribution-api-version: - - registry/2.0 - server: - - openresty - strict-transport-security: - - max-age=31536000; includeSubDomains - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - status: - code: 200 - message: OK version: 1 diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_set_tag_properties.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_set_tag_properties.yaml index e03de9f6146d..34ffdbe491b9 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_set_tag_properties.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_set_tag_properties.yaml @@ -31,7 +31,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:56 GMT + - Fri, 02 Apr 2021 16:56:30 GMT docker-distribution-api-version: - registry/2.0 server: @@ -71,7 +71,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:58 GMT + - Fri, 02 Apr 2021 16:56:31 GMT server: - openresty strict-transport-security: @@ -79,7 +79,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.166667' + - '332.833333' status: code: 200 message: OK @@ -109,7 +109,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:58 GMT + - Fri, 02 Apr 2021 16:56:31 GMT server: - openresty strict-transport-security: @@ -117,7 +117,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.05' + - '332.816667' status: code: 200 message: OK @@ -152,7 +152,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:58 GMT + - Fri, 02 Apr 2021 16:56:32 GMT docker-distribution-api-version: - registry/2.0 server: @@ -202,7 +202,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:58 GMT + - Fri, 02 Apr 2021 16:56:32 GMT docker-distribution-api-version: - registry/2.0 server: @@ -242,7 +242,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:58 GMT + - Fri, 02 Apr 2021 16:56:32 GMT server: - openresty strict-transport-security: @@ -250,7 +250,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.033333' + - '332.8' status: code: 200 message: OK @@ -280,7 +280,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:58 GMT + - Fri, 02 Apr 2021 16:56:32 GMT server: - openresty strict-transport-security: @@ -288,7 +288,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.016667' + - '332.783333' status: code: 200 message: OK @@ -330,7 +330,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:59 GMT + - Fri, 02 Apr 2021 16:56:32 GMT docker-distribution-api-version: - registry/2.0 server: @@ -375,7 +375,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:59 GMT + - Fri, 02 Apr 2021 16:56:33 GMT docker-distribution-api-version: - registry/2.0 server: @@ -415,7 +415,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:59 GMT + - Fri, 02 Apr 2021 16:56:33 GMT server: - openresty strict-transport-security: @@ -423,7 +423,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333' + - '332.766667' status: code: 200 message: OK @@ -453,7 +453,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:59 GMT + - Fri, 02 Apr 2021 16:56:33 GMT server: - openresty strict-transport-security: @@ -461,7 +461,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '332.983333' + - '332.75' status: code: 200 message: OK @@ -496,7 +496,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 02 Apr 2021 16:11:59 GMT + - Fri, 02 Apr 2021 16:56:33 GMT docker-distribution-api-version: - registry/2.0 server: diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_delete_registry_artifact.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_delete_registry_artifact.yaml new file mode 100644 index 000000000000..031c5892b12d --- /dev/null +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_delete_registry_artifact.yaml @@ -0,0 +1,339 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://fake_url.azurecr.io/acr/v1/to_be_deleted/_manifests + response: + body: + string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, + visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"repository","Name":"to_be_deleted","Action":"metadata_read"}]}]} + + ' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '216' + content-type: application/json; charset=utf-8 + date: Fri, 02 Apr 2021 16:56:48 GMT + docker-distribution-api-version: registry/2.0 + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + www-authenticate: Bearer realm="https://fake_url.azurecr.io/oauth2/token",service="fake_url.azurecr.io",scope="fake_scope",error="invalid_token" + x-content-type-options: nosniff + status: + code: 401 + message: Unauthorized + url: https://seankane.azurecr.io/acr/v1/to_be_deleted/_manifests +- request: + body: + access_token: REDACTED + grant_type: access_token + service: seankane.azurecr.io + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://fake_url.azurecr.io/oauth2/exchange + response: + body: + string: '{"refresh_token": "REDACTED"}' + headers: + connection: keep-alive + content-type: application/json; charset=utf-8 + date: Fri, 02 Apr 2021 16:56:49 GMT + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + x-ms-ratelimit-remaining-calls-per-second: '332.8' + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/oauth2/exchange +- request: + body: + grant_type: refresh_token + refresh_token: REDACTED + scope: repository:to_be_deleted:metadata_read + service: seankane.azurecr.io + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://fake_url.azurecr.io/oauth2/token + response: + body: + string: '{"access_token": "REDACTED"}' + headers: + connection: keep-alive + content-type: application/json; charset=utf-8 + date: Fri, 02 Apr 2021 16:56:49 GMT + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + x-ms-ratelimit-remaining-calls-per-second: '332.783333' + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/oauth2/token +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://fake_url.azurecr.io/acr/v1/to_be_deleted/_manifests + response: + body: + string: '{"registry":"fake_url.azurecr.io","imageName":"to_be_deleted","manifests":[{"digest":"sha256:1b26826f602946860c279fce658f31050cff2c596583af237d971f4629b57792","imageSize":0,"createdTime":"2021-04-02T16:56:40.1119279Z","lastUpdateTime":"2021-04-02T16:56:40.1119279Z","architecture":"amd64","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:308866a43596e83578c7dfa15e27a73011bdd402185a84c5cd7f32a88b501a24","imageSize":0,"createdTime":"2021-04-02T16:56:39.997551Z","lastUpdateTime":"2021-04-02T16:56:39.997551Z","mediaType":"application/vnd.docker.distribution.manifest.list.v2+json","tags":["to_be_deleted"],"changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true}},{"digest":"sha256:50b8560ad574c779908da71f7ce370c0a2471c098d44d1c8f6b513c5a55eeeb1","imageSize":0,"createdTime":"2021-04-02T16:56:39.9282698Z","lastUpdateTime":"2021-04-02T16:56:39.9282698Z","architecture":"arm","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:88b2e00179bd6c4064612403c8d42a13de7ca809d61fee966ce9e129860a8a90","imageSize":0,"createdTime":"2021-04-02T16:56:40.7257377Z","lastUpdateTime":"2021-04-02T16:56:40.7257377Z","architecture":"mips64le","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:963612c5503f3f1674f315c67089dee577d8cc6afc18565e0b4183ae355fb343","imageSize":0,"createdTime":"2021-04-02T16:56:40.6236795Z","lastUpdateTime":"2021-04-02T16:56:40.6236795Z","architecture":"arm64","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:b0408a0f1d74eced127a2658429f336ed8fa48e36d59878f155b19865e5dbd70","imageSize":0,"createdTime":"2021-04-02T16:56:40.8512287Z","lastUpdateTime":"2021-04-02T16:56:40.8512287Z","architecture":"amd64","os":"windows","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:bb7ab0fa94fdd78aca84b27a1bd46c4b811051f9b69905d81f5f267fc6546a9d","imageSize":0,"createdTime":"2021-04-02T16:56:40.4436528Z","lastUpdateTime":"2021-04-02T16:56:40.4436528Z","architecture":"ppc64le","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:cb55d8f7347376e1ba38ca740904b43c9a52f66c7d2ae1ef1a0de1bc9f40df98","imageSize":0,"createdTime":"2021-04-02T16:56:40.6594947Z","lastUpdateTime":"2021-04-02T16:56:40.6594947Z","architecture":"386","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:e49abad529e5d9bd6787f3abeab94e09ba274fe34731349556a850b9aebbf7bf","imageSize":0,"createdTime":"2021-04-02T16:56:40.5415778Z","lastUpdateTime":"2021-04-02T16:56:40.5415778Z","architecture":"s390x","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:e5785cb0c62cebbed4965129bae371f0589cadd6d84798fb58c2c5f9e237efd9","imageSize":0,"createdTime":"2021-04-02T16:56:39.8613172Z","lastUpdateTime":"2021-04-02T16:56:39.8613172Z","architecture":"arm","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}}]} + + ' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-type: application/json; charset=utf-8 + date: Fri, 02 Apr 2021 16:56:50 GMT + docker-distribution-api-version: registry/2.0 + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/acr/v1/to_be_deleted/_manifests +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://fake_url.azurecr.io/v2/to_be_deleted/manifests/sha256:1b26826f602946860c279fce658f31050cff2c596583af237d971f4629b57792 + response: + body: + string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, + visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"repository","Name":"to_be_deleted","Action":"delete"}]}]} + + ' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '209' + content-type: application/json; charset=utf-8 + date: Fri, 02 Apr 2021 16:56:50 GMT + docker-distribution-api-version: registry/2.0 + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + www-authenticate: Bearer realm="https://fake_url.azurecr.io/oauth2/token",service="fake_url.azurecr.io",scope="fake_scope",error="invalid_token" + x-content-type-options: nosniff + status: + code: 401 + message: Unauthorized + url: https://seankane.azurecr.io/v2/to_be_deleted/manifests/sha256:1b26826f602946860c279fce658f31050cff2c596583af237d971f4629b57792 +- request: + body: + access_token: REDACTED + grant_type: access_token + service: seankane.azurecr.io + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://fake_url.azurecr.io/oauth2/exchange + response: + body: + string: '{"refresh_token": "REDACTED"}' + headers: + connection: keep-alive + content-type: application/json; charset=utf-8 + date: Fri, 02 Apr 2021 16:56:50 GMT + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + x-ms-ratelimit-remaining-calls-per-second: '332.766667' + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/oauth2/exchange +- request: + body: + grant_type: refresh_token + refresh_token: REDACTED + scope: repository:to_be_deleted:delete + service: seankane.azurecr.io + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://fake_url.azurecr.io/oauth2/token + response: + body: + string: '{"access_token": "REDACTED"}' + headers: + connection: keep-alive + content-type: application/json; charset=utf-8 + date: Fri, 02 Apr 2021 16:56:50 GMT + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + x-ms-ratelimit-remaining-calls-per-second: '332.75' + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/oauth2/token +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: DELETE + uri: https://fake_url.azurecr.io/v2/to_be_deleted/manifests/sha256:1b26826f602946860c279fce658f31050cff2c596583af237d971f4629b57792 + response: + body: + string: '' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '0' + date: Fri, 02 Apr 2021 16:56:51 GMT + docker-distribution-api-version: registry/2.0 + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + x-content-type-options: nosniff + x-ms-ratelimit-remaining-calls-per-second: '32.000000' + status: + code: 202 + message: Accepted + url: https://seankane.azurecr.io/v2/to_be_deleted/manifests/sha256:1b26826f602946860c279fce658f31050cff2c596583af237d971f4629b57792 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://fake_url.azurecr.io/acr/v1/to_be_deleted/_manifests + response: + body: + string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, + visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"repository","Name":"to_be_deleted","Action":"metadata_read"}]}]} + + ' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '216' + content-type: application/json; charset=utf-8 + date: Fri, 02 Apr 2021 16:56:51 GMT + docker-distribution-api-version: registry/2.0 + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + www-authenticate: Bearer realm="https://fake_url.azurecr.io/oauth2/token",service="fake_url.azurecr.io",scope="fake_scope",error="invalid_token" + x-content-type-options: nosniff + status: + code: 401 + message: Unauthorized + url: https://seankane.azurecr.io/acr/v1/to_be_deleted/_manifests +- request: + body: + access_token: REDACTED + grant_type: access_token + service: seankane.azurecr.io + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://fake_url.azurecr.io/oauth2/exchange + response: + body: + string: '{"refresh_token": "REDACTED"}' + headers: + connection: keep-alive + content-type: application/json; charset=utf-8 + date: Fri, 02 Apr 2021 16:56:51 GMT + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + x-ms-ratelimit-remaining-calls-per-second: '332.733333' + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/oauth2/exchange +- request: + body: + grant_type: refresh_token + refresh_token: REDACTED + scope: repository:to_be_deleted:metadata_read + service: seankane.azurecr.io + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://fake_url.azurecr.io/oauth2/token + response: + body: + string: '{"access_token": "REDACTED"}' + headers: + connection: keep-alive + content-type: application/json; charset=utf-8 + date: Fri, 02 Apr 2021 16:56:51 GMT + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + x-ms-ratelimit-remaining-calls-per-second: '332.716667' + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/oauth2/token +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://fake_url.azurecr.io/acr/v1/to_be_deleted/_manifests + response: + body: + string: '{"registry":"fake_url.azurecr.io","imageName":"to_be_deleted","manifests":[{"digest":"sha256:308866a43596e83578c7dfa15e27a73011bdd402185a84c5cd7f32a88b501a24","imageSize":0,"createdTime":"2021-04-02T16:56:39.997551Z","lastUpdateTime":"2021-04-02T16:56:39.997551Z","mediaType":"application/vnd.docker.distribution.manifest.list.v2+json","tags":["to_be_deleted"],"changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true}},{"digest":"sha256:50b8560ad574c779908da71f7ce370c0a2471c098d44d1c8f6b513c5a55eeeb1","imageSize":0,"createdTime":"2021-04-02T16:56:39.9282698Z","lastUpdateTime":"2021-04-02T16:56:39.9282698Z","architecture":"arm","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:88b2e00179bd6c4064612403c8d42a13de7ca809d61fee966ce9e129860a8a90","imageSize":0,"createdTime":"2021-04-02T16:56:40.7257377Z","lastUpdateTime":"2021-04-02T16:56:40.7257377Z","architecture":"mips64le","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:963612c5503f3f1674f315c67089dee577d8cc6afc18565e0b4183ae355fb343","imageSize":0,"createdTime":"2021-04-02T16:56:40.6236795Z","lastUpdateTime":"2021-04-02T16:56:40.6236795Z","architecture":"arm64","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:b0408a0f1d74eced127a2658429f336ed8fa48e36d59878f155b19865e5dbd70","imageSize":0,"createdTime":"2021-04-02T16:56:40.8512287Z","lastUpdateTime":"2021-04-02T16:56:40.8512287Z","architecture":"amd64","os":"windows","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:bb7ab0fa94fdd78aca84b27a1bd46c4b811051f9b69905d81f5f267fc6546a9d","imageSize":0,"createdTime":"2021-04-02T16:56:40.4436528Z","lastUpdateTime":"2021-04-02T16:56:40.4436528Z","architecture":"ppc64le","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:cb55d8f7347376e1ba38ca740904b43c9a52f66c7d2ae1ef1a0de1bc9f40df98","imageSize":0,"createdTime":"2021-04-02T16:56:40.6594947Z","lastUpdateTime":"2021-04-02T16:56:40.6594947Z","architecture":"386","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:e49abad529e5d9bd6787f3abeab94e09ba274fe34731349556a850b9aebbf7bf","imageSize":0,"createdTime":"2021-04-02T16:56:40.5415778Z","lastUpdateTime":"2021-04-02T16:56:40.5415778Z","architecture":"s390x","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}},{"digest":"sha256:e5785cb0c62cebbed4965129bae371f0589cadd6d84798fb58c2c5f9e237efd9","imageSize":0,"createdTime":"2021-04-02T16:56:39.8613172Z","lastUpdateTime":"2021-04-02T16:56:39.8613172Z","architecture":"arm","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true,"quarantineState":"Passed"}}]} + + ' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-type: application/json; charset=utf-8 + date: Fri, 02 Apr 2021 16:56:51 GMT + docker-distribution-api-version: registry/2.0 + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/acr/v1/to_be_deleted/_manifests +version: 1 diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_delete_repository.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_delete_repository.yaml index e9b05aca7fc4..846981a565a1 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_delete_repository.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_delete_repository.yaml @@ -19,7 +19,7 @@ interactions: connection: keep-alive content-length: '196' content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:24:45 GMT + date: Fri, 02 Apr 2021 16:57:07 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains @@ -47,11 +47,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:24:46 GMT + date: Fri, 02 Apr 2021 16:57:08 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '332.966667' + x-ms-ratelimit-remaining-calls-per-second: '332.766667' status: code: 200 message: OK @@ -75,11 +75,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:24:46 GMT + date: Fri, 02 Apr 2021 16:57:08 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '332.95' + x-ms-ratelimit-remaining-calls-per-second: '332.75' status: code: 200 message: OK @@ -103,7 +103,7 @@ interactions: connection: keep-alive content-length: '162' content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:24:46 GMT + date: Fri, 02 Apr 2021 16:57:08 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains @@ -132,7 +132,7 @@ interactions: connection: keep-alive content-length: '209' content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:24:46 GMT + date: Fri, 02 Apr 2021 16:57:09 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains @@ -160,11 +160,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:24:48 GMT + date: Fri, 02 Apr 2021 16:57:10 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '333.016667' + x-ms-ratelimit-remaining-calls-per-second: '332.85' status: code: 200 message: OK @@ -188,11 +188,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:24:48 GMT + date: Fri, 02 Apr 2021 16:57:10 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '332.783333' + x-ms-ratelimit-remaining-calls-per-second: '332.766667' status: code: 200 message: OK @@ -216,7 +216,7 @@ interactions: connection: keep-alive content-length: '795' content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:24:50 GMT + date: Fri, 02 Apr 2021 16:57:12 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains @@ -246,7 +246,7 @@ interactions: connection: keep-alive content-length: '196' content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:24:55 GMT + date: Fri, 02 Apr 2021 16:57:17 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains @@ -274,11 +274,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:24:56 GMT + date: Fri, 02 Apr 2021 16:57:17 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '332.933333' + x-ms-ratelimit-remaining-calls-per-second: '332.95' status: code: 200 message: OK @@ -302,11 +302,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:24:56 GMT + date: Fri, 02 Apr 2021 16:57:17 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '332.916667' + x-ms-ratelimit-remaining-calls-per-second: '332.933333' status: code: 200 message: OK @@ -330,7 +330,7 @@ interactions: connection: keep-alive content-length: '146' content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:24:56 GMT + date: Fri, 02 Apr 2021 16:57:18 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_delete_repository_doesnt_exist.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_delete_repository_doesnt_exist.yaml index f70837e93caa..16084209a241 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_delete_repository_doesnt_exist.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_delete_repository_doesnt_exist.yaml @@ -19,7 +19,7 @@ interactions: connection: keep-alive content-length: '210' content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:24:57 GMT + date: Fri, 02 Apr 2021 16:57:18 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains @@ -47,11 +47,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:24:57 GMT + date: Fri, 02 Apr 2021 16:57:19 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '332.9' + x-ms-ratelimit-remaining-calls-per-second: '333.316667' status: code: 200 message: OK @@ -75,11 +75,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:24:58 GMT + date: Fri, 02 Apr 2021 16:57:19 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '332.883333' + x-ms-ratelimit-remaining-calls-per-second: '333.3' status: code: 200 message: OK @@ -104,7 +104,7 @@ interactions: connection: keep-alive content-length: '122' content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:24:58 GMT + date: Fri, 02 Apr 2021 16:57:19 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_delete_tag.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_delete_tag.yaml index fd755630f592..09b7a6213e52 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_delete_tag.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_delete_tag.yaml @@ -7,19 +7,19 @@ interactions: User-Agent: - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) method: GET - uri: https://fake_url.azurecr.io/acr/v1/hello-world/_tags/to_be_deleted + uri: https://fake_url.azurecr.io/acr/v1/repo6ce51658/_tags/to_be_deleted response: body: string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, - visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"repository","Name":"hello-world","Action":"metadata_read"}]}]} + visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"repository","Name":"repo6ce51658","Action":"metadata_read"}]}]} ' headers: access-control-expose-headers: X-Ms-Correlation-Request-Id connection: keep-alive - content-length: '214' + content-length: '215' content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:12:42 GMT + date: Fri, 02 Apr 2021 17:02:51 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains @@ -28,7 +28,7 @@ interactions: status: code: 401 message: Unauthorized - url: https://seankane.azurecr.io/acr/v1/hello-world/_tags/to_be_deleted + url: https://seankane.azurecr.io/acr/v1/repo6ce51658/_tags/to_be_deleted - request: body: access_token: REDACTED @@ -47,11 +47,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:12:43 GMT + date: Fri, 02 Apr 2021 17:02:52 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '332.833333' + x-ms-ratelimit-remaining-calls-per-second: '332.8' status: code: 200 message: OK @@ -60,7 +60,7 @@ interactions: body: grant_type: refresh_token refresh_token: REDACTED - scope: repository:hello-world:metadata_read + scope: repository:repo6ce51658:metadata_read service: seankane.azurecr.io headers: Accept: @@ -75,11 +75,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:12:43 GMT + date: Fri, 02 Apr 2021 17:02:52 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '332.816667' + x-ms-ratelimit-remaining-calls-per-second: '332.783333' status: code: 200 message: OK @@ -92,18 +92,18 @@ interactions: User-Agent: - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) method: GET - uri: https://fake_url.azurecr.io/acr/v1/hello-world/_tags/to_be_deleted + uri: https://fake_url.azurecr.io/acr/v1/repo6ce51658/_tags/to_be_deleted response: body: - string: '{"registry":"fake_url.azurecr.io","imageName":"hello-world","tag":{"name":"to_be_deleted","digest":"sha256:308866a43596e83578c7dfa15e27a73011bdd402185a84c5cd7f32a88b501a24","createdTime":"2021-04-02T16:12:34.379736Z","lastUpdateTime":"2021-04-02T16:12:34.379736Z","signed":false,"changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true}}} + string: '{"registry":"fake_url.azurecr.io","imageName":"repo6ce51658","tag":{"name":"to_be_deleted","digest":"sha256:308866a43596e83578c7dfa15e27a73011bdd402185a84c5cd7f32a88b501a24","createdTime":"2021-04-02T17:02:42.4784104Z","lastUpdateTime":"2021-04-02T17:02:42.4784104Z","signed":false,"changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true}}} ' headers: access-control-expose-headers: X-Ms-Correlation-Request-Id connection: keep-alive - content-length: '385' + content-length: '388' content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:12:44 GMT + date: Fri, 02 Apr 2021 17:02:52 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains @@ -111,7 +111,7 @@ interactions: status: code: 200 message: OK - url: https://seankane.azurecr.io/acr/v1/hello-world/_tags/to_be_deleted + url: https://seankane.azurecr.io/acr/v1/repo6ce51658/_tags/to_be_deleted - request: body: null headers: @@ -120,19 +120,19 @@ interactions: User-Agent: - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://fake_url.azurecr.io/acr/v1/hello-world/_tags/to_be_deleted + uri: https://fake_url.azurecr.io/acr/v1/repo6ce51658/_tags/to_be_deleted response: body: string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, - visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"repository","Name":"hello-world","Action":"delete"}]}]} + visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"repository","Name":"repo6ce51658","Action":"delete"}]}]} ' headers: access-control-expose-headers: X-Ms-Correlation-Request-Id connection: keep-alive - content-length: '207' + content-length: '208' content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:12:44 GMT + date: Fri, 02 Apr 2021 17:02:52 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains @@ -141,7 +141,7 @@ interactions: status: code: 401 message: Unauthorized - url: https://seankane.azurecr.io/acr/v1/hello-world/_tags/to_be_deleted + url: https://seankane.azurecr.io/acr/v1/repo6ce51658/_tags/to_be_deleted - request: body: access_token: REDACTED @@ -160,11 +160,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:12:44 GMT + date: Fri, 02 Apr 2021 17:02:52 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '332.8' + x-ms-ratelimit-remaining-calls-per-second: '332.766667' status: code: 200 message: OK @@ -173,7 +173,7 @@ interactions: body: grant_type: refresh_token refresh_token: REDACTED - scope: repository:hello-world:delete + scope: repository:repo6ce51658:delete service: seankane.azurecr.io headers: Accept: @@ -188,11 +188,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:12:44 GMT + date: Fri, 02 Apr 2021 17:02:52 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '332.783333' + x-ms-ratelimit-remaining-calls-per-second: '332.75' status: code: 200 message: OK @@ -205,7 +205,7 @@ interactions: User-Agent: - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://fake_url.azurecr.io/acr/v1/hello-world/_tags/to_be_deleted + uri: https://fake_url.azurecr.io/acr/v1/repo6ce51658/_tags/to_be_deleted response: body: string: '' @@ -213,7 +213,7 @@ interactions: access-control-expose-headers: X-Ms-Correlation-Request-Id connection: keep-alive content-length: '0' - date: Fri, 02 Apr 2021 16:12:44 GMT + date: Fri, 02 Apr 2021 17:02:52 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains @@ -223,7 +223,7 @@ interactions: status: code: 202 message: Accepted - url: https://seankane.azurecr.io/acr/v1/hello-world/_tags/to_be_deleted + url: https://seankane.azurecr.io/acr/v1/repo6ce51658/_tags/to_be_deleted - request: body: null headers: @@ -232,19 +232,19 @@ interactions: User-Agent: - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) method: GET - uri: https://fake_url.azurecr.io/acr/v1/hello-world/_tags/to_be_deleted + uri: https://fake_url.azurecr.io/acr/v1/repo6ce51658/_tags/to_be_deleted response: body: string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, - visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"repository","Name":"hello-world","Action":"metadata_read"}]}]} + visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"repository","Name":"repo6ce51658","Action":"metadata_read"}]}]} ' headers: access-control-expose-headers: X-Ms-Correlation-Request-Id connection: keep-alive - content-length: '214' + content-length: '215' content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:12:55 GMT + date: Fri, 02 Apr 2021 17:02:58 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains @@ -253,7 +253,7 @@ interactions: status: code: 401 message: Unauthorized - url: https://seankane.azurecr.io/acr/v1/hello-world/_tags/to_be_deleted + url: https://seankane.azurecr.io/acr/v1/repo6ce51658/_tags/to_be_deleted - request: body: access_token: REDACTED @@ -272,11 +272,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:12:55 GMT + date: Fri, 02 Apr 2021 17:02:58 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '332.933333' + x-ms-ratelimit-remaining-calls-per-second: '332.733333' status: code: 200 message: OK @@ -285,7 +285,7 @@ interactions: body: grant_type: refresh_token refresh_token: REDACTED - scope: repository:hello-world:metadata_read + scope: repository:repo6ce51658:metadata_read service: seankane.azurecr.io headers: Accept: @@ -300,11 +300,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:12:55 GMT + date: Fri, 02 Apr 2021 17:02:58 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '332.616667' + x-ms-ratelimit-remaining-calls-per-second: '332.716667' status: code: 200 message: OK @@ -317,7 +317,7 @@ interactions: User-Agent: - azsdk-python-azure-containerregistry/1.0.0b1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) method: GET - uri: https://fake_url.azurecr.io/acr/v1/hello-world/_tags/to_be_deleted + uri: https://fake_url.azurecr.io/acr/v1/repo6ce51658/_tags/to_be_deleted response: body: string: '{"errors":[{"code":"TAG_UNKNOWN","message":"the specified tag does @@ -329,7 +329,7 @@ interactions: connection: keep-alive content-length: '81' content-type: application/json; charset=utf-8 - date: Fri, 02 Apr 2021 16:12:55 GMT + date: Fri, 02 Apr 2021 17:02:58 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains @@ -337,5 +337,5 @@ interactions: status: code: 404 message: Not Found - url: https://seankane.azurecr.io/acr/v1/hello-world/_tags/to_be_deleted + url: https://seankane.azurecr.io/acr/v1/repo6ce51658/_tags/to_be_deleted version: 1 diff --git a/sdk/containerregistry/azure-containerregistry/tests/test_container_repository_client.py b/sdk/containerregistry/azure-containerregistry/tests/test_container_repository_client.py index c116bbece2f3..12c5ea264ec6 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/test_container_repository_client.py +++ b/sdk/containerregistry/azure-containerregistry/tests/test_container_repository_client.py @@ -23,48 +23,26 @@ from azure.core.paging import ItemPaged from testcase import ContainerRegistryTestClass, AcrBodyReplacer, FakeTokenCredential +from constants import TO_BE_DELETED, DOES_NOT_EXIST from preparer import acr_preparer class TestContainerRepositoryClient(ContainerRegistryTestClass): @acr_preparer() def test_delete_tag(self, containerregistry_baseurl, containerregistry_resource_group): - self._import_tag_to_be_deleted(containerregistry_baseurl, resource_group=containerregistry_resource_group) + repo = self.get_resource_name("repo") + self._import_tag_to_be_deleted(containerregistry_baseurl, resource_group=containerregistry_resource_group, repository=repo, tag=TO_BE_DELETED) - client = self.create_repository_client(containerregistry_baseurl, "hello-world") + client = self.create_repository_client(containerregistry_baseurl, repo) - tag = client.get_tag_properties("to_be_deleted") + tag = client.get_tag_properties(TO_BE_DELETED) assert tag is not None - client.delete_tag("to_be_deleted") - self.sleep(10) - - with pytest.raises(ResourceNotFoundError): - client.get_tag_properties("to_be_deleted") - - @acr_preparer() - def test_delete_tag(self, containerregistry_baseurl, containerregistry_resource_group): - self._import_tag_to_be_deleted(containerregistry_baseurl, resource_group=containerregistry_resource_group) - - client = self.create_repository_client(containerregistry_baseurl, "hello-world") - - tag = client.get_tag_properties("to_be_deleted") - assert tag is not None - - client.delete_tag("to_be_deleted") - self.sleep(10) + client.delete_tag(TO_BE_DELETED) + self.sleep(5) with pytest.raises(ResourceNotFoundError): - client.get_tag_properties("to_be_deleted") - - @acr_preparer() - def test_get_attributes(self, containerregistry_baseurl): - client = self.create_repository_client(containerregistry_baseurl, self.repository) - - repo_attribs = client.get_properties() - - assert repo_attribs is not None - assert repo_attribs.content_permissions is not None + client.get_tag_properties(TO_BE_DELETED) @acr_preparer() def test_get_properties(self, containerregistry_baseurl): @@ -104,7 +82,6 @@ def test_get_registry_artifact_properties(self, containerregistry_baseurl): properties = client.get_registry_artifact_properties("latest") - assert properties is not None assert isinstance(properties, RegistryArtifactProperties) assert isinstance(properties.created_on, datetime) assert isinstance(properties.last_updated_on, datetime) @@ -182,12 +159,8 @@ def test_set_tag_properties(self, containerregistry_baseurl): break - tags = client.set_manifest_properties() - @acr_preparer() def test_delete_repository(self, containerregistry_baseurl, containerregistry_resource_group): - TO_BE_DELETED = "to_be_deleted" - self.import_repo_to_be_deleted(containerregistry_baseurl, resource_group=containerregistry_resource_group) reg_client = self.create_registry_client(containerregistry_baseurl) @@ -203,8 +176,26 @@ def test_delete_repository(self, containerregistry_baseurl, containerregistry_re @acr_preparer() def test_delete_repository_doesnt_exist(self, containerregistry_baseurl): - DOES_NOT_EXIST = "does_not_exist" - repo_client = self.create_repository_client(containerregistry_baseurl, DOES_NOT_EXIST) with pytest.raises(ResourceNotFoundError): - repo_client.delete() \ No newline at end of file + repo_client.delete() + + @acr_preparer() + def test_delete_registry_artifact(self, containerregistry_baseurl, containerregistry_resource_group): + self.import_repo_to_be_deleted(containerregistry_baseurl, resource_group=containerregistry_resource_group) + + repo_client = self.create_repository_client(containerregistry_baseurl, TO_BE_DELETED) + + count = 0 + for artifact in repo_client.list_registry_artifacts(): + if count == 0: + repo_client.delete_registry_artifact(artifact.digest) + count += 1 + assert count > 0 + + artifacts = [] + for a in repo_client.list_registry_artifacts(): + artifacts.append(a) + + assert len(artifacts) > 0 + assert len(artifacts) == count - 1 \ No newline at end of file diff --git a/sdk/containerregistry/azure-containerregistry/tests/test_container_repository_client_async.py b/sdk/containerregistry/azure-containerregistry/tests/test_container_repository_client_async.py index 65df3890b230..5e10da7c82fb 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/test_container_repository_client_async.py +++ b/sdk/containerregistry/azure-containerregistry/tests/test_container_repository_client_async.py @@ -17,28 +17,28 @@ from asynctestcase import AsyncContainerRegistryTestClass from preparer import acr_preparer +from constants import TO_BE_DELETED class TestContainerRegistryClient(AsyncContainerRegistryTestClass): @acr_preparer() async def test_delete_tag(self, containerregistry_baseurl, containerregistry_resource_group): - self._import_tag_to_be_deleted(containerregistry_baseurl, resource_group=containerregistry_resource_group) + repo = self.get_resource_name("repo") + self._import_tag_to_be_deleted(containerregistry_baseurl, resource_group=containerregistry_resource_group, repository=repo, tag=TO_BE_DELETED) - client = self.create_repository_client(containerregistry_baseurl, "hello-world") + client = self.create_repository_client(containerregistry_baseurl, repo) - tag = await client.get_tag_properties("to_be_deleted") + tag = await client.get_tag_properties(TO_BE_DELETED) assert tag is not None - await client.delete_tag("to_be_deleted") - self.sleep(10) + await client.delete_tag(TO_BE_DELETED) + self.sleep(5) with pytest.raises(ResourceNotFoundError): - await client.get_tag_properties("to_be_deleted") + await client.get_tag_properties(TO_BE_DELETED) @acr_preparer() async def test_delete_repository(self, containerregistry_baseurl, containerregistry_resource_group): - TO_BE_DELETED = "to_be_deleted" - self.import_repo_to_be_deleted(containerregistry_baseurl, resource_group=containerregistry_resource_group) reg_client = self.create_registry_client(containerregistry_baseurl) @@ -63,3 +63,23 @@ async def test_delete_repository_doesnt_exist(self, containerregistry_baseurl): repo_client = self.create_repository_client(containerregistry_baseurl, DOES_NOT_EXIST) with pytest.raises(ResourceNotFoundError): await repo_client.delete() + + @acr_preparer() + async def test_delete_registry_artifact(self, containerregistry_baseurl, containerregistry_resource_group): + self.import_repo_to_be_deleted(containerregistry_baseurl, resource_group=containerregistry_resource_group) + + repo_client = self.create_repository_client(containerregistry_baseurl, TO_BE_DELETED) + + count = 0 + async for artifact in repo_client.list_registry_artifacts(): + if count == 0: + await repo_client.delete_registry_artifact(artifact.digest) + count += 1 + assert count > 0 + + artifacts = [] + async for a in repo_client.list_registry_artifacts(): + artifacts.append(a) + + assert len(artifacts) > 0 + assert len(artifacts) == count - 1 diff --git a/sdk/containerregistry/azure-containerregistry/tests/testcase.py b/sdk/containerregistry/azure-containerregistry/tests/testcase.py index ce6c073dd777..9b733385bdf3 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/testcase.py +++ b/sdk/containerregistry/azure-containerregistry/tests/testcase.py @@ -115,11 +115,14 @@ def sleep(self, t): time.sleep(t) def _import_tag_to_be_deleted( - self, endpoint, repository="hello-world", resource_group="fake_rg" + self, endpoint, repository="hello-world", resource_group="fake_rg", tag=None ): if not self.is_live: return + if tag: + repository = "{}:{}".format(repository, tag) + registry = endpoint.split(".")[0] command = [ "powershell.exe", @@ -139,10 +142,6 @@ def _import_tag_to_be_deleted( ] subprocess.check_call(command) - def sleep(self, t): - if self.is_live: - time.sleep(t) - def import_repo_to_be_deleted( self, endpoint, repository="to_be_deleted", resource_group="fake_rg" ): @@ -167,30 +166,6 @@ def import_repo_to_be_deleted( ] subprocess.check_call(command) - def _import_tag_to_be_deleted( - self, endpoint, repository="hello-world", resource_group="fake_rg" - ): - if not self.is_live: - return - registry = endpoint.split(".")[0] - command = [ - "powershell.exe", - "Import-AzcontainerRegistryImage", - "-ResourceGroupName", - "'{}'".format(resource_group), - "-RegistryName", - "'{}'".format(registry), - "-SourceImage", - "'library/hello-world'", - "-SourceRegistryUri", - "'registry.hub.docker.com'", - "-TargetTag", - "'{}'".format(repository), - "-Mode", - "'Force'", - ] - subprocess.check_call(command) - def get_credential(self): if self.is_live: return DefaultAzureCredential()