diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_base_client.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_base_client.py index 03bfd284fbd4..c8fbe64eeb54 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_base_client.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_base_client.py @@ -29,6 +29,7 @@ class ContainerRegistryBaseClient(object): :param credential: AAD Token for authenticating requests with Azure :type credential: :class:`azure.identity.DefaultTokenCredential` """ + def __init__(self, endpoint, credential, **kwargs): # type: (str, TokenCredential, Dict[str, Any]) -> None auth_policy = ContainerRegistryChallengePolicy(credential, endpoint) 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 5649f961d55c..67456d6f95fb 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_container_registry_client.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_container_registry_client.py @@ -4,13 +4,21 @@ # Licensed under the MIT License. # ------------------------------------ from typing import TYPE_CHECKING - +from azure.core.exceptions import ( + ClientAuthenticationError, + ResourceNotFoundError, + ResourceExistsError, + HttpResponseError, + map_error, +) from azure.core.paging import ItemPaged from azure.core.pipeline import Pipeline from azure.core.tracing.decorator import distributed_trace from ._base_client import ContainerRegistryBaseClient, TransportWrapper from ._container_repository_client import ContainerRepositoryClient +from ._generated.models import AcrErrors +from ._helpers import _parse_next_link from ._models import DeletedRepositoryResult if TYPE_CHECKING: @@ -24,7 +32,8 @@ def __init__(self, endpoint, credential, **kwargs): """Create a ContainerRegistryClient from an ACR endpoint and a credential :param str endpoint: An ACR endpoint - :param TokenCredential credential: The credential with which to authenticate + :param credential: The credential with which to authenticate + :type credential: :class:`~azure.core.credentials.TokenCredential` :returns: None :raises: None """ @@ -54,19 +63,106 @@ def list_repositories(self, **kwargs): """List all repositories :keyword max: Maximum number of repositories to return - :type max: int + :paramtype max: int :keyword last: Query parameter for the last item in the previous call. Ensuing call will return values after last lexically - :type last: str - :keyword results_per_page: Numer of repositories to return in a single page - :type results_per_page: int + :paramtype last: str + :keyword results_per_page: Number of repositories to return per page + :paramtype results_per_page: int :return: ItemPaged[str] :rtype: :class:`~azure.core.paging.ItemPaged` :raises: :class:`~azure.core.exceptions.ResourceNotFoundError` """ - return self._client.container_registry.get_repositories( - last=kwargs.pop("last", None), n=kwargs.pop("max", None), **kwargs - ) + n = kwargs.pop("results_per_page", None) + last = kwargs.pop("last", None) + + cls = kwargs.pop("cls", None) # type: ClsType["_models.Repositories"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters["Accept"] = self._client._serialize.header( # pylint: disable=protected-access + "accept", accept, "str" + ) + + if not next_link: + # Construct URL + url = "/acr/v1/_catalog" + path_format_arguments = { + "url": self._client._serialize.url( # pylint: disable=protected-access + "self._config.url", + self._client._config.url, # pylint: disable=protected-access + "str", + skip_quote=True, + ), + } + url = self._client._client.format_url(url, **path_format_arguments) # pylint: disable=protected-access + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if last is not None: + query_parameters["last"] = self._client._serialize.query( # pylint: disable=protected-access + "last", last, "str" + ) + if n is not None: + query_parameters["n"] = self._client._serialize.query( # pylint: disable=protected-access + "n", n, "int" + ) + + request = self._client._client.get( # pylint: disable=protected-access + url, query_parameters, header_parameters + ) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + path_format_arguments = { + "url": self._client._serialize.url( # pylint: disable=protected-access + "self._config.url", + self._client._config.url, # pylint: disable=protected-access + "str", + skip_quote=True, + ), + } + url = self._client._client.format_url(url, **path_format_arguments) # pylint: disable=protected-access + request = self._client._client.get( # pylint: disable=protected-access + url, query_parameters, header_parameters + ) + return request + + def extract_data(pipeline_response): + deserialized = self._client._deserialize( # pylint: disable=protected-access + "Repositories", pipeline_response + ) + list_of_elem = deserialized.repositories + if cls: + list_of_elem = cls(list_of_elem) + link = None + if "Link" in pipeline_response.http_response.headers.keys(): + link = _parse_next_link(pipeline_response.http_response.headers["Link"]) + elif "link" in pipeline_response.http_response.headers.keys(): # python 2.7 turns this into lowercase + link = _parse_next_link(pipeline_response.http_response.headers["link"]) + return link, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._client._deserialize.failsafe_deserialize( # pylint: disable=protected-access + AcrErrors, response + ) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged(get_next, extract_data) @distributed_trace def get_repository_client(self, repository, **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 6c7b48d821a5..9c6e44c18830 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_container_repository_client.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_container_repository_client.py @@ -5,20 +5,28 @@ # ------------------------------------ from typing import TYPE_CHECKING +from azure.core.exceptions import ( + ClientAuthenticationError, + ResourceNotFoundError, + ResourceExistsError, + HttpResponseError, + map_error, +) +from azure.core.paging import ItemPaged from azure.core.tracing.decorator import distributed_trace from ._base_client import ContainerRegistryBaseClient -from ._helpers import _is_tag +from ._generated.models import AcrErrors +from ._helpers import _is_tag, _parse_next_link from ._models import ( + DeletedRepositoryResult, + RegistryArtifactProperties, RepositoryProperties, TagProperties, - RegistryArtifactProperties, - DeletedRepositoryResult ) if TYPE_CHECKING: from typing import Any, Dict - from azure.core.paging import ItemPaged from azure.core.credentials import TokenCredential from ._models import ContentPermissions @@ -33,7 +41,7 @@ def __init__(self, endpoint, repository, credential, **kwargs): :param repository: The name of a repository :type repository: str :param credential: The credential with which to authenticate - :type credential: TokenCredential + :type credential: :class:`~azure.core.credentials.TokenCredential` :returns: None :raises: None """ @@ -50,7 +58,7 @@ def _get_digest_from_tag(self, tag): @distributed_trace def delete(self, **kwargs): - # type: (...) -> None + # type: (Dict[str, Any]) -> None """Delete a repository :returns: Object containing information about the deleted repository @@ -63,7 +71,7 @@ def delete(self, **kwargs): @distributed_trace def delete_registry_artifact(self, digest, **kwargs): - # type: (str) -> None + # type: (str, Dict[str, Any]) -> None """Delete a registry artifact :param digest: The digest of the artifact to be deleted @@ -75,7 +83,7 @@ def delete_registry_artifact(self, digest, **kwargs): @distributed_trace def delete_tag(self, tag, **kwargs): - # type: (str) -> None + # type: (str, Dict[str, Any]) -> None """Delete a tag from a repository :param str tag: The tag to be deleted @@ -86,7 +94,7 @@ def delete_tag(self, tag, **kwargs): @distributed_trace def get_properties(self, **kwargs): - # type: (...) -> azure.containerregistry.RepositoryProperties + # type: (Dict[str, Any]) -> RepositoryProperties """Get the properties of a repository :returns: :class:`~azure.containerregistry.RepositoryProperties` @@ -131,63 +139,243 @@ def get_tag_properties(self, tag, **kwargs): @distributed_trace def list_registry_artifacts(self, **kwargs): - # type: (...) -> ItemPaged[RegistryArtifactProperties] + # type: (Dict[str, Any]) -> ItemPaged[RegistryArtifactProperties] """List the artifacts for a repository :keyword last: Query parameter for the last item in the previous call. Ensuing call will return values after last lexically - :type last: str + :paramtype last: str :keyword order_by: Query parameter for ordering by time ascending or descending - :type order_by: :class:`~azure.containerregistry.RegistryArtifactOrderBy` - :keyword results_per_page: Numer of repositories to return in a single page - :type results_per_page: int + :paramtype order_by: :class:`~azure.containerregistry.RegistryArtifactOrderBy` + :keyword results_per_page: Number of repositories to return per page + :paramtype results_per_page: int :return: ItemPaged[:class:`RegistryArtifactProperties`] :rtype: :class:`~azure.core.paging.ItemPaged` :raises: :class:`~azure.core.exceptions.ResourceNotFoundError` """ + name = self.repository last = kwargs.pop("last", None) - n = kwargs.pop("page_size", None) + n = kwargs.pop("results_per_page", None) orderby = kwargs.pop("order_by", None) - return self._client.container_registry_repository.get_manifests( - self.repository, - last=last, - n=n, - orderby=orderby, - cls=lambda objs: [ + cls = kwargs.pop( + "cls", + lambda objs: [ RegistryArtifactProperties._from_generated(x) for x in objs # pylint: disable=protected-access ], - **kwargs ) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters["Accept"] = self._client._serialize.header( # pylint: disable=protected-access + "accept", accept, "str" + ) + + if not next_link: + # Construct URL + url = "/acr/v1/{name}/_manifests" + path_format_arguments = { + "url": self._client._serialize.url( # pylint: disable=protected-access + "self._client._config.url", + self._client._config.url, # pylint: disable=protected-access + "str", + skip_quote=True, + ), + "name": self._client._serialize.url("name", name, "str"), # pylint: disable=protected-access + } + url = self._client._client.format_url(url, **path_format_arguments) # pylint: disable=protected-access + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if last is not None: + query_parameters["last"] = self._client._serialize.query( # pylint: disable=protected-access + "last", last, "str" + ) + if n is not None: + query_parameters["n"] = self._client._serialize.query( # pylint: disable=protected-access + "n", n, "int" + ) + if orderby is not None: + query_parameters["orderby"] = self._client._serialize.query( # pylint: disable=protected-access + "orderby", orderby, "str" + ) + + request = self._client._client.get( # pylint: disable=protected-access + url, query_parameters, header_parameters + ) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + path_format_arguments = { + "url": self._client._serialize.url( # pylint: disable=protected-access + "self._client._config.url", + self._client._config.url, # pylint: disable=protected-access + "str", + skip_quote=True, + ), + "name": self._client._serialize.url("name", name, "str"), # pylint: disable=protected-access + } + url = self._client._client.format_url(url, **path_format_arguments) # pylint: disable=protected-access + request = self._client._client.get( # pylint: disable=protected-access + url, query_parameters, header_parameters + ) + return request + + def extract_data(pipeline_response): + deserialized = self._client._deserialize( # pylint: disable=protected-access + "AcrManifests", pipeline_response + ) + list_of_elem = deserialized.manifests + if cls: + list_of_elem = cls(list_of_elem) + link = None + if "Link" in pipeline_response.http_response.headers.keys(): + link = _parse_next_link(pipeline_response.http_response.headers["Link"]) + return link, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._client._deserialize.failsafe_deserialize( # pylint: disable=protected-access + AcrErrors, response + ) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + @distributed_trace def list_tags(self, **kwargs): - # type: (...) -> ItemPaged[TagProperties] + # type: (Dict[str, Any]) -> ItemPaged[TagProperties] """List the tags for a repository :keyword last: Query parameter for the last item in the previous call. Ensuing call will return values after last lexically - :type last: str - :param order_by: Query paramter for ordering by time ascending or descending - :type order_by: :class:`~azure.containerregistry.TagOrderBy - :keyword results_per_page: Numer of repositories to return in a single page - :type results_per_page: int + :paramtype last: str + :keyword order_by: Query parameter for ordering by time ascending or descending + :paramtype order_by: :class:`~azure.containerregistry.TagOrderBy` + :keyword results_per_page: Number of repositories to return per page + :paramtype results_per_page: int :return: ItemPaged[:class:`~azure.containerregistry.TagProperties`] :rtype: :class:`~azure.core.paging.ItemPaged` :raises: :class:`~azure.core.exceptions.ResourceNotFoundError` """ - return self._client.container_registry_repository.get_tags( - self.repository, - last=kwargs.pop("last", None), - n=kwargs.pop("page_size", None), - orderby=kwargs.pop("order_by", None), - digest=kwargs.pop("digest", None), - cls=lambda objs: [TagProperties._from_generated(o) for o in objs], # pylint: disable=protected-access - **kwargs + name = self.repository + last = kwargs.pop("last", None) + n = kwargs.pop("results_per_page", None) + orderby = kwargs.pop("order_by", None) + digest = kwargs.pop("digest", None) + cls = kwargs.pop( + "cls", lambda objs: [TagProperties._from_generated(o) for o in objs] # pylint: disable=protected-access ) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters["Accept"] = self._client._serialize.header( # pylint: disable=protected-access + "accept", accept, "str" + ) + + if not next_link: + # Construct URL + url = "/acr/v1/{name}/_tags" + path_format_arguments = { + "url": self._client._serialize.url( # pylint: disable=protected-access + "self._config.url", + self._client._config.url, # pylint: disable=protected-access + "str", + skip_quote=True, + ), + "name": self._client._serialize.url("name", name, "str"), # pylint: disable=protected-access + } + url = self._client._client.format_url(url, **path_format_arguments) # pylint: disable=protected-access + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if last is not None: + query_parameters["last"] = self._client._serialize.query( # pylint: disable=protected-access + "last", last, "str" + ) + if n is not None: + query_parameters["n"] = self._client._serialize.query( # pylint: disable=protected-access + "n", n, "int" + ) + if orderby is not None: + query_parameters["orderby"] = self._client._serialize.query( # pylint: disable=protected-access + "orderby", orderby, "str" + ) + if digest is not None: + query_parameters["digest"] = self._client._serialize.query( # pylint: disable=protected-access + "digest", digest, "str" + ) + + request = self._client._client.get( # pylint: disable=protected-access + url, query_parameters, header_parameters + ) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + path_format_arguments = { + "url": self._client._serialize.url( # pylint: disable=protected-access + "self._client._config.url", + self._client._config.url, # pylint: disable=protected-access + "str", + skip_quote=True, + ), + "name": self._client._serialize.url("name", name, "str"), # pylint: disable=protected-access + } + url = self._client._client.format_url(url, **path_format_arguments) # pylint: disable=protected-access + request = self._client._client.get( # pylint: disable=protected-access + url, query_parameters, header_parameters + ) + return request + + def extract_data(pipeline_response): + deserialized = self._client._deserialize("TagList", pipeline_response) # pylint: disable=protected-access + list_of_elem = deserialized.tag_attribute_bases + if cls: + list_of_elem = cls(list_of_elem) + link = None + if "Link" in pipeline_response.http_response.headers.keys(): + link = _parse_next_link(pipeline_response.http_response.headers["Link"]) + return link, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._client._deserialize.failsafe_deserialize( # pylint: disable=protected-access + AcrErrors, response + ) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + @distributed_trace def set_manifest_properties(self, digest, permissions, **kwargs): - # type: (str, ContentPermissions) -> RegistryArtifactProperties + # type: (str, ContentPermissions, Dict[str, Any]) -> RegistryArtifactProperties """Set the properties for a manifest :param digest: Digest of a manifest @@ -205,7 +393,7 @@ def set_manifest_properties(self, digest, permissions, **kwargs): @distributed_trace def set_tag_properties(self, tag, permissions, **kwargs): - # type: (str, ContentPermissions) -> TagProperties + # type: (str, ContentPermissions, Dict[str, Any]) -> TagProperties """Set the properties for a tag :param tag: Tag to set properties for diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_exchange_client.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_exchange_client.py index ca7d05313736..ad5745e0a61f 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_exchange_client.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_exchange_client.py @@ -36,7 +36,7 @@ class ACRExchangeClient(object): :param endpoint: Azure Container Registry endpoint :type endpoint: str :param credential: Credential which provides tokens to authenticate requests - :type credential: :class:`azure.core.credentials.TokenCredential` + :type credential: :class:`~azure.core.credentials.TokenCredential` """ BEARER = "Bearer" diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/operations/_container_registry_operations.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/operations/_container_registry_operations.py index 3cc9c679db76..b6e74ffe0891 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/operations/_container_registry_operations.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/operations/_container_registry_operations.py @@ -118,13 +118,13 @@ def get_repositories( def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + header_parameters['Accept'] = self._client._serialize.header("accept", accept, 'str') if not next_link: # Construct URL url = self.get_repositories.metadata['url'] # type: ignore path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + 'url': self._client._serialize.url("self._config.url", self._client._config.url, 'str', skip_quote=True), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_helpers.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_helpers.py index 9e5b0f41a305..137d58881b2d 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_helpers.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_helpers.py @@ -49,6 +49,24 @@ def _parse_challenge(header): return ret +def _parse_next_link(link_string): + # type: (str) -> str + """Parses the next link in the list operations response URL + + Per the Docker v2 HTTP API spec, the Link header is an RFC5988 + compliant rel='next' with URL to next result set, if available. + See: https://docs.docker.com/registry/spec/api/ + + The URI reference can be obtained from link-value as follows: + Link = "Link" ":" #link-value + link-value = "<" URI-Reference ">" * (";" link-param ) + See: https://tools.ietf.org/html/rfc5988#section-5 + """ + if not link_string: + return None + return link_string[1 : link_string.find(">")] + + def _enforce_https(request): # type: (PipelineRequest) -> None """Raise ServiceRequestError if the request URL is non-HTTPS and the sender did not specify enforce_https=False""" diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/aio/_async_base_client.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/aio/_async_base_client.py index 8c86b7d66321..19377c31105d 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/aio/_async_base_client.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/aio/_async_base_client.py @@ -27,7 +27,7 @@ class ContainerRegistryBaseClient(object): :param endpoint: Azure Container Registry endpoint :type endpoint: str :param credential: AAD Token for authenticating requests with Azure - :type credential: :class:`azure.identity.DefaultTokenCredential` + :type credential: :class:`~azure.identity.DefaultTokenCredential` """ 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 cc7a51be713a..9e6fa68e96fb 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 @@ -5,13 +5,22 @@ # ------------------------------------ from typing import Any, Dict, TYPE_CHECKING -from azure.core.async_paging import AsyncItemPaged +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ( + ClientAuthenticationError, + ResourceExistsError, + ResourceNotFoundError, + HttpResponseError, + map_error, +) from azure.core.pipeline import AsyncPipeline from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from ._async_base_client import ContainerRegistryBaseClient, AsyncTransportWrapper from ._async_container_repository_client import ContainerRepositoryClient +from .._generated.models import AcrErrors +from .._helpers import _parse_next_link from .._models import RepositoryProperties, DeletedRepositoryResult if TYPE_CHECKING: @@ -25,7 +34,7 @@ def __init__(self, endpoint: str, credential: "AsyncTokenCredential", **kwargs: :param endpoint: An ACR endpoint :type endpoint: str :param credential: The credential with which to authenticate - :type credential: AsyncTokenCredential + :type credential: :class:`~azure.core.credentials_async.AsyncTokenCredential` :returns: None :raises: None """ @@ -49,28 +58,111 @@ async def delete_repository(self, repository: str, **kwargs: Dict[str, Any]) -> return DeletedRepositoryResult._from_generated(result) # pylint: disable=protected-access @distributed_trace - def list_repositories(self, **kwargs) -> AsyncItemPaged[str]: + def list_repositories(self, **kwargs: Dict[str, Any]) -> AsyncItemPaged[str]: """List all repositories :keyword last: Query parameter for the last item in the previous call. Ensuing call will return values after last lexicallyy - :type last: str + :paramtype last: str :keyword max: Maximum number of repositories to return - :type max: int - :keyword results_per_page: Numer of repositories to return in a single page - :type results_per_page: int + :paramtype max: int + :keyword results_per_page: Number of repositories to return per page + :paramtype results_per_page: int :return: ItemPaged[str] :rtype: :class:`~azure.core.async_paging.AsyncItemPaged` :raises: :class:`~azure.core.exceptions.ResourceNotFoundError` """ + n = kwargs.pop("results_per_page", None) + last = kwargs.pop("last", None) - return self._client.container_registry.get_repositories( - last=kwargs.pop("last", None), n=kwargs.pop("page_size", None), **kwargs - ) + cls = kwargs.pop("cls", None) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters["Accept"] = self._client._serialize.header( # pylint: disable=protected-access + "accept", accept, "str" + ) + + if not next_link: + # Construct URL + url = "/acr/v1/_catalog" + path_format_arguments = { + "url": self._client._serialize.url( # pylint: disable=protected-access + "self._config.url", + self._client._config.url, # pylint: disable=protected-access + "str", + skip_quote=True, + ), + } + url = self._client._client.format_url(url, **path_format_arguments) # pylint: disable=protected-access + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if last is not None: + query_parameters["last"] = self._client._serialize.query( # pylint: disable=protected-access + "last", last, "str" + ) + if n is not None: + query_parameters["n"] = self._client._serialize.query( # pylint: disable=protected-access + "n", n, "int" + ) + + request = self._client._client.get( # pylint: disable=protected-access + url, query_parameters, header_parameters + ) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + path_format_arguments = { + "url": self._client._serialize.url( # pylint: disable=protected-access + "self._config.url", + self._client._config.url, # pylint: disable=protected-access + "str", + skip_quote=True, + ), + } + url = self._client._client.format_url(url, **path_format_arguments) # pylint: disable=protected-access + request = self._client._client.get( # pylint: disable=protected-access + url, query_parameters, header_parameters + ) + return request + + async def extract_data(pipeline_response): + deserialized = self._client._deserialize( # pylint: disable=protected-access + "Repositories", pipeline_response + ) + list_of_elem = deserialized.repositories + if cls: + list_of_elem = cls(list_of_elem) + link = None + if "Link" in pipeline_response.http_response.headers.keys(): + link = _parse_next_link(pipeline_response.http_response.headers["Link"]) + return link, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._client._deserialize.failsafe_deserialize( # pylint: disable=protected-access + AcrErrors, response + ) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) @distributed_trace - def get_repository_client(self, repository: str, **kwargs) -> ContainerRepositoryClient: - # type: (str, Dict[str, Any]) -> ContainerRepositoryClient + def get_repository_client(self, repository: str, **kwargs: Dict[str, Any]) -> ContainerRepositoryClient: """Get a repository client :param repository: The repository to create a client for 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 60b3e0322ea4..b3b9c0a75451 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 @@ -5,12 +5,20 @@ # ------------------------------------ from typing import TYPE_CHECKING, Dict, Any -from azure.core.async_paging import AsyncItemPaged +from azure.core.exceptions import ( + ClientAuthenticationError, + ResourceNotFoundError, + ResourceExistsError, + HttpResponseError, + map_error, +) +from azure.core.async_paging import AsyncItemPaged, AsyncList 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 +from .._generated.models import AcrErrors +from .._helpers import _is_tag, _parse_next_link from .._models import ( ContentPermissions, DeletedRepositoryResult, @@ -24,7 +32,9 @@ class ContainerRepositoryClient(ContainerRegistryBaseClient): - def __init__(self, endpoint: str, repository: str, credential: "AsyncTokenCredential", **kwargs) -> None: + def __init__( + self, endpoint: str, repository: str, credential: "AsyncTokenCredential", **kwargs: Dict[str, Any] + ) -> None: """Create a ContainerRepositoryClient from an endpoint, repository name, and credential :param endpoint: An ACR endpoint @@ -32,7 +42,7 @@ def __init__(self, endpoint: str, repository: str, credential: "AsyncTokenCreden :param repository: The name of a repository :type repository: str :param credential: The credential with which to authenticate - :type credential: AsyncTokenCredential + :type credential: :class:`~azure.core.credentials_async.AsyncTokenCredential` :returns: None :raises: None """ @@ -58,8 +68,9 @@ async def delete(self, **kwargs: Dict[str, Any]) -> DeletedRepositoryResult: return DeletedRepositoryResult._from_generated( # pylint: disable=protected-access await self._client.container_registry.delete_repository(self.repository, **kwargs) ) + @distributed_trace_async - async def delete_registry_artifact(self, digest: str, **kwargs) -> None: + async def delete_registry_artifact(self, digest: str, **kwargs: Dict[str, Any]) -> None: """Delete a registry artifact :param digest: The digest of the artifact to be deleted @@ -70,7 +81,7 @@ async def delete_registry_artifact(self, digest: str, **kwargs) -> None: await self._client.container_registry_repository.delete_manifest(self.repository, digest, **kwargs) @distributed_trace_async - async def delete_tag(self, tag: str, **kwargs) -> None: + async def delete_tag(self, tag: str, **kwargs: Dict[str, Any]) -> None: """Delete a tag from a repository :param str tag: The tag to be deleted @@ -80,7 +91,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: + async def get_properties(self, **kwargs: Dict[str, Any]) -> RepositoryProperties: """Get the properties of a repository :returns: :class:`~azure.containerregistry.RepositoryProperties` @@ -91,7 +102,9 @@ async def get_properties(self, **kwargs) -> RepositoryProperties: ) @distributed_trace_async - async def get_registry_artifact_properties(self, tag_or_digest: str, **kwargs) -> RegistryArtifactProperties: + async def get_registry_artifact_properties( + self, tag_or_digest: str, **kwargs: Dict[str, Any] + ) -> RegistryArtifactProperties: """Get the properties of a registry artifact :param tag_or_digest: The tag/digest of a registry artifact @@ -109,7 +122,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: + async def get_tag_properties(self, tag: str, **kwargs: Dict[str, Any]) -> TagProperties: """Get the properties for a tag :param tag: The tag to get properties for @@ -122,63 +135,243 @@ async def get_tag_properties(self, tag: str, **kwargs) -> TagProperties: ) @distributed_trace - def list_registry_artifacts(self, **kwargs) -> AsyncItemPaged[RegistryArtifactProperties]: + def list_registry_artifacts(self, **kwargs: Dict[str, Any]) -> AsyncItemPaged[RegistryArtifactProperties]: """List the artifacts for a repository :keyword last: Query parameter for the last item in the previous call. Ensuing call will return values after last lexically - :type last: str - :keyword page_size: Number of items per page - :type page_size: int + :paramtype last: str :keyword order_by: Query parameter for ordering by time ascending or descending - :type order_by: :class:`~azure.containerregistry.RegistryArtifactOrderBy` - :keyword results_per_page: Numer of repositories to return in a single page - :type results_per_page: int + :paramtype order_by: :class:`~azure.containerregistry.RegistryArtifactOrderBy` + :keyword results_per_page: Number of repositories to return per page + :paramtype results_per_page: int :return: ItemPaged[:class:`~azure.containerregistry.RegistryArtifactProperties`] :rtype: :class:`~azure.core.async_paging.AsyncItemPaged` :raises: :class:`~azure.core.exceptions.ResourceNotFoundError` """ + name = self.repository last = kwargs.pop("last", None) - n = kwargs.pop("page_size", None) + n = kwargs.pop("results_per_page", None) orderby = kwargs.pop("order_by", None) - return self._client.container_registry_repository.get_manifests( - self.repository, - last=last, - n=n, - orderby=orderby, - cls=lambda objs: [ + cls = kwargs.pop( + "cls", + lambda objs: [ RegistryArtifactProperties._from_generated(x) for x in objs # pylint: disable=protected-access ], - **kwargs ) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters["Accept"] = self._client._serialize.header( # pylint: disable=protected-access + "accept", accept, "str" + ) + + if not next_link: + # Construct URL + url = "/acr/v1/{name}/_manifests" + path_format_arguments = { + "url": self._client._serialize.url( # pylint: disable=protected-access + "self._client._config.url", + self._client._config.url, # pylint: disable=protected-access + "str", + skip_quote=True, + ), + "name": self._client._serialize.url("name", name, "str"), # pylint: disable=protected-access + } + url = self._client._client.format_url(url, **path_format_arguments) # pylint: disable=protected-access + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if last is not None: + query_parameters["last"] = self._client._serialize.query( # pylint: disable=protected-access + "last", last, "str" + ) + if n is not None: + query_parameters["n"] = self._client._serialize.query( # pylint: disable=protected-access + "n", n, "int" + ) + if orderby is not None: + query_parameters["orderby"] = self._client._serialize.query( # pylint: disable=protected-access + "orderby", orderby, "str" + ) + + request = self._client._client.get( # pylint: disable=protected-access + url, query_parameters, header_parameters + ) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + path_format_arguments = { + "url": self._client._serialize.url( # pylint: disable=protected-access + "self._client._config.url", + self._client._config.url, # pylint: disable=protected-access + "str", + skip_quote=True, + ), + "name": self._client._serialize.url("name", name, "str"), # pylint: disable=protected-access + } + url = self._client._client.format_url(url, **path_format_arguments) # pylint: disable=protected-access + request = self._client._client.get( # pylint: disable=protected-access + url, query_parameters, header_parameters + ) + return request + + async def extract_data(pipeline_response): + deserialized = self._client._deserialize( # pylint: disable=protected-access + "AcrManifests", pipeline_response + ) + list_of_elem = deserialized.manifests + if cls: + list_of_elem = cls(list_of_elem) + link = None + if "Link" in pipeline_response.http_response.headers.keys(): + link = _parse_next_link(pipeline_response.http_response.headers["Link"]) + return link, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._client._deserialize.failsafe_deserialize( # pylint: disable=protected-access + AcrErrors, response + ) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + @distributed_trace - def list_tags(self, **kwargs) -> AsyncItemPaged[TagProperties]: + def list_tags(self, **kwargs: Dict[str, Any]) -> AsyncItemPaged[TagProperties]: """List the tags for a repository :keyword last: Query parameter for the last item in the previous call. Ensuing call will return values after last lexically - :type last: str - :param order_by: Query paramter for ordering by time ascending or descending - :type order_by: :class:`~azure.containerregistry.TagOrderBy` - :keyword results_per_page: Numer of repositories to return in a single page - :type results_per_page: int + :paramtype last: str + :keyword order_by: Query parameter for ordering by time ascending or descending + :paramtype order_by: :class:`~azure.containerregistry.TagOrderBy` + :keyword results_per_page: Number of repositories to return per page + :paramtype results_per_page: int :return: ItemPaged[:class:`~azure.containerregistry.TagProperties`] :rtype: :class:`~azure.core.async_paging.AsyncItemPaged` :raises: :class:`~azure.core.exceptions.ResourceNotFoundError` """ - return self._client.container_registry_repository.get_tags( - self.repository, - last=kwargs.pop("last", None), - n=kwargs.pop("top", None), - orderby=kwargs.pop("order_by", None), - digest=kwargs.pop("digest", None), - cls=lambda objs: [TagProperties._from_generated(o) for o in objs], # pylint: disable=protected-access - **kwargs + name = self.repository + last = kwargs.pop("last", None) + n = kwargs.pop("results_per_page", None) + orderby = kwargs.pop("order_by", None) + digest = kwargs.pop("digest", None) + cls = kwargs.pop( + "cls", lambda objs: [TagProperties._from_generated(o) for o in objs] # pylint: disable=protected-access ) + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters["Accept"] = self._client._serialize.header( # pylint: disable=protected-access + "accept", accept, "str" + ) + + if not next_link: + # Construct URL + url = "/acr/v1/{name}/_tags" + path_format_arguments = { + "url": self._client._serialize.url( # pylint: disable=protected-access + "self._client._config.url", + self._client._config.url, # pylint: disable=protected-access + "str", + skip_quote=True, + ), + "name": self._client._serialize.url("name", name, "str"), # pylint: disable=protected-access + } + url = self._client._client.format_url(url, **path_format_arguments) # pylint: disable=protected-access + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if last is not None: + query_parameters["last"] = self._client._serialize.query( # pylint: disable=protected-access + "last", last, "str" + ) + if n is not None: + query_parameters["n"] = self._client._serialize.query( # pylint: disable=protected-access + "n", n, "int" + ) + if orderby is not None: + query_parameters["orderby"] = self._client._serialize.query( # pylint: disable=protected-access + "orderby", orderby, "str" + ) + if digest is not None: + query_parameters["digest"] = self._client._serialize.query( # pylint: disable=protected-access + "digest", digest, "str" + ) + + request = self._client._client.get( # pylint: disable=protected-access + url, query_parameters, header_parameters + ) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + path_format_arguments = { + "url": self._client._serialize.url( # pylint: disable=protected-access + "self._client._config.url", + self._client._config.url, # pylint: disable=protected-access + "str", + skip_quote=True, + ), + "name": self._client._serialize.url("name", name, "str"), # pylint: disable=protected-access + } + url = self._client._client.format_url(url, **path_format_arguments) # pylint: disable=protected-access + request = self._client._client.get( # pylint: disable=protected-access + url, query_parameters, header_parameters + ) + return request + + async def extract_data(pipeline_response): + deserialized = self._client._deserialize("TagList", pipeline_response) # pylint: disable=protected-access + list_of_elem = deserialized.tag_attribute_bases + if cls: + list_of_elem = cls(list_of_elem) + link = None + if "Link" in pipeline_response.http_response.headers.keys(): + link = _parse_next_link(pipeline_response.http_response.headers["Link"]) + return link, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._client._pipeline.run( # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._client._deserialize.failsafe_deserialize( # pylint: disable=protected-access + AcrErrors, response + ) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + @distributed_trace_async - async def set_manifest_properties(self, digest: str, permissions: ContentPermissions, **kwargs) -> None: + async def set_manifest_properties( + self, digest: str, permissions: ContentPermissions, **kwargs: Dict[str, Any] + ) -> None: """Set the properties for a manifest :param digest: Digest of a manifest @@ -195,7 +388,9 @@ async def set_manifest_properties(self, digest: str, permissions: ContentPermiss ) @distributed_trace_async - async def set_tag_properties(self, tag: str, permissions: ContentPermissions, **kwargs) -> TagProperties: + async def set_tag_properties( + self, tag: str, permissions: ContentPermissions, **kwargs: Dict[str, Any] + ) -> TagProperties: """Set the properties for a tag :param tag: Tag to set properties for diff --git a/sdk/containerregistry/azure-containerregistry/samples/async_samples/sample_create_client_async.py b/sdk/containerregistry/azure-containerregistry/samples/async_samples/sample_create_client_async.py index 360e14dd8db4..88a4c79e5781 100644 --- a/sdk/containerregistry/azure-containerregistry/samples/async_samples/sample_create_client_async.py +++ b/sdk/containerregistry/azure-containerregistry/samples/async_samples/sample_create_client_async.py @@ -22,8 +22,8 @@ from dotenv import find_dotenv, load_dotenv import os -class CreateClients(object): +class CreateClients(object): def __init__(self): load_dotenv(find_dotenv()) self.account_url = os.environ["AZURE_CONTAINERREGISTRY_URL"] @@ -33,6 +33,7 @@ def create_registry_client(self): # [START create_registry_client] from azure.containerregistry.aio import ContainerRegistryClient from azure.identity.aio import DefaultAzureCredential + client = ContainerRegistryClient(self.account_url, DefaultAzureCredential()) # [END create_registry_client] @@ -41,6 +42,7 @@ def create_repository_client(self): # [START create_repository_client] from azure.containerregistry.aio import ContainerRepositoryClient from azure.identity.aio import DefaultAzureCredential + client = ContainerRepositoryClient(self.account_url, "my_repository", DefaultAzureCredential()) # [END create_repository_client] @@ -64,7 +66,7 @@ async def basic_sample(self): print(tag.digest) -if __name__ == '__main__': +if __name__ == "__main__": sample = CreateClients() sample.create_registry_client() sample.create_repository_client() diff --git a/sdk/containerregistry/azure-containerregistry/samples/sample_create_client.py b/sdk/containerregistry/azure-containerregistry/samples/sample_create_client.py index e33332ee9b82..0ed79124b3ce 100644 --- a/sdk/containerregistry/azure-containerregistry/samples/sample_create_client.py +++ b/sdk/containerregistry/azure-containerregistry/samples/sample_create_client.py @@ -22,8 +22,8 @@ from dotenv import find_dotenv, load_dotenv import os -class CreateClients(object): +class CreateClients(object): def __init__(self): load_dotenv(find_dotenv()) self.account_url = os.environ["AZURE_CONTAINERREGISTRY_URL"] @@ -33,6 +33,7 @@ def create_registry_client(self): # [START create_registry_client] from azure.containerregistry import ContainerRegistryClient from azure.identity import DefaultAzureCredential + client = ContainerRegistryClient(self.account_url, DefaultAzureCredential()) # [END create_registry_client] @@ -41,6 +42,7 @@ def create_repository_client(self): # [START create_repository_client] from azure.containerregistry import ContainerRepositoryClient from azure.identity import DefaultAzureCredential + client = ContainerRepositoryClient(self.account_url, "my_repository", DefaultAzureCredential()) # [END create_repository_client] @@ -64,8 +66,8 @@ def basic_sample(self): print(tag.digest) -if __name__ == '__main__': +if __name__ == "__main__": sample = CreateClients() sample.create_registry_client() sample.create_repository_client() - sample.basic_sample() \ No newline at end of file + sample.basic_sample() diff --git a/sdk/containerregistry/azure-containerregistry/setup.py b/sdk/containerregistry/azure-containerregistry/setup.py index 5cac03bc3c81..d6423739fc05 100644 --- a/sdk/containerregistry/azure-containerregistry/setup.py +++ b/sdk/containerregistry/azure-containerregistry/setup.py @@ -33,7 +33,7 @@ description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), # ensure that these are updated to reflect the package owners' information long_description=long_description, - long_description_content_type='text/markdown', + long_description_content_type="text/markdown", url="https://github.com/Azure/azure-sdk-for-python", author="Microsoft Corporation", author_email="azuresdkengsysadmins@microsoft.com", diff --git a/sdk/containerregistry/azure-containerregistry/tests/asynctestcase.py b/sdk/containerregistry/azure-containerregistry/tests/asynctestcase.py index 439b870ad283..07ad54c2a7ff 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/asynctestcase.py +++ b/sdk/containerregistry/azure-containerregistry/tests/asynctestcase.py @@ -32,6 +32,7 @@ class AsyncFakeTokenCredential(object): """Protocol for classes able to provide OAuth tokens. :param str scopes: Lets you specify the type of access needed. """ + def __init__(self): self.token = AccessToken("YOU SHALL NOT PASS", 0) @@ -40,7 +41,6 @@ async def get_token(self, *args): class AsyncContainerRegistryTestClass(ContainerRegistryTestClass): - def __init__(self, method_name): super(AsyncContainerRegistryTestClass, self).__init__(method_name) @@ -62,4 +62,4 @@ def create_repository_client(self, endpoint, name, **kwargs): repository=name, credential=self.get_credential(), **kwargs, - ) \ No newline at end of file + ) diff --git a/sdk/containerregistry/azure-containerregistry/tests/conftest.py b/sdk/containerregistry/azure-containerregistry/tests/conftest.py index fa149c11d410..8ecd631b1960 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/conftest.py +++ b/sdk/containerregistry/azure-containerregistry/tests/conftest.py @@ -10,4 +10,4 @@ # Ignore async tests for Python < 3.5 collect_ignore_glob = [] if sys.version_info < (3, 5): - collect_ignore_glob.append("*_async.py") \ No newline at end of file + collect_ignore_glob.append("*_async.py") diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_async.test_list_repositories_by_page.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_async.test_list_repositories_by_page.yaml new file mode 100644 index 000000000000..aff8b1d3a094 --- /dev/null +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_async.test_list_repositories_by_page.yaml @@ -0,0 +1,571 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-azure-containerregistry/0.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://fake_url.azurecr.io/acr/v1/_catalog?n=2 + response: + body: + string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, + visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"registry","Name":"catalog","Action":"*"}]}]} + + ' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '196' + content-type: application/json; charset=utf-8 + date: Thu, 01 Apr 2021 20:48: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/_catalog?n=2 +- request: + body: + access_token: REDACTED + grant_type: access_token + service: seankane.azurecr.io + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-azure-containerregistry/0.0.1 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: Thu, 01 Apr 2021 20:48:52 GMT + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + x-ms-ratelimit-remaining-calls-per-second: '333.316667' + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/oauth2/exchange +- request: + body: + grant_type: refresh_token + refresh_token: REDACTED + scope: registry:catalog:* + service: seankane.azurecr.io + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-azure-containerregistry/0.0.1 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: Thu, 01 Apr 2021 20:48:52 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 + url: https://seankane.azurecr.io/oauth2/token +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-azure-containerregistry/0.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://fake_url.azurecr.io/acr/v1/_catalog?n=2 + response: + body: + string: '{"repositories":["alpine/git","debian"]} + + ' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '41' + content-type: application/json; charset=utf-8 + date: Thu, 01 Apr 2021 20:48:52 GMT + docker-distribution-api-version: registry/2.0 + link: ; rel="next" + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/acr/v1/_catalog?n=2 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-azure-containerregistry/0.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://fake_url.azurecr.io/acr/v1/_catalog?last=debian&n=2&orderby= + response: + body: + string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, + visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"registry","Name":"catalog","Action":"*"}]}]} + + ' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '196' + content-type: application/json; charset=utf-8 + date: Thu, 01 Apr 2021 20:48:52 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/_catalog?last=debian&n=2&orderby= +- request: + body: + access_token: REDACTED + grant_type: access_token + service: seankane.azurecr.io + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-azure-containerregistry/0.0.1 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: Thu, 01 Apr 2021 20:48:52 GMT + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + x-ms-ratelimit-remaining-calls-per-second: '333.283333' + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/oauth2/exchange +- request: + body: + grant_type: refresh_token + refresh_token: REDACTED + scope: registry:catalog:* + service: seankane.azurecr.io + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-azure-containerregistry/0.0.1 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: Thu, 01 Apr 2021 20:48:52 GMT + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + x-ms-ratelimit-remaining-calls-per-second: '333.266667' + 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/0.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://fake_url.azurecr.io/acr/v1/_catalog?last=debian&n=2&orderby= + response: + body: + string: '{"repositories":["hello-world","library/hello-world"]} + + ' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '55' + content-type: application/json; charset=utf-8 + date: Thu, 01 Apr 2021 20:48:52 GMT + docker-distribution-api-version: registry/2.0 + link: ; rel="next" + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/acr/v1/_catalog?last=debian&n=2&orderby= +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-azure-containerregistry/0.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://fake_url.azurecr.io/acr/v1/_catalog?last=library/hello-world&n=2&orderby= + response: + body: + string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, + visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"registry","Name":"catalog","Action":"*"}]}]} + + ' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '196' + content-type: application/json; charset=utf-8 + date: Thu, 01 Apr 2021 20:48:53 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/_catalog?last=library/hello-world&n=2&orderby= +- request: + body: + access_token: REDACTED + grant_type: access_token + service: seankane.azurecr.io + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-azure-containerregistry/0.0.1 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: Thu, 01 Apr 2021 20:48:53 GMT + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + x-ms-ratelimit-remaining-calls-per-second: '333.25' + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/oauth2/exchange +- request: + body: + grant_type: refresh_token + refresh_token: REDACTED + scope: registry:catalog:* + service: seankane.azurecr.io + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-azure-containerregistry/0.0.1 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: Thu, 01 Apr 2021 20:48:53 GMT + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + x-ms-ratelimit-remaining-calls-per-second: '333.233333' + 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/0.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://fake_url.azurecr.io/acr/v1/_catalog?last=library/hello-world&n=2&orderby= + response: + body: + string: '{"repositories":["repo160e197b","repo308e19dd"]} + + ' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '49' + content-type: application/json; charset=utf-8 + date: Thu, 01 Apr 2021 20:48:53 GMT + docker-distribution-api-version: registry/2.0 + link: ; rel="next" + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/acr/v1/_catalog?last=library/hello-world&n=2&orderby= +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-azure-containerregistry/0.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://fake_url.azurecr.io/acr/v1/_catalog?last=repo308e19dd&n=2&orderby= + response: + body: + string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, + visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"registry","Name":"catalog","Action":"*"}]}]} + + ' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '196' + content-type: application/json; charset=utf-8 + date: Thu, 01 Apr 2021 20:48:53 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/_catalog?last=repo308e19dd&n=2&orderby= +- request: + body: + access_token: REDACTED + grant_type: access_token + service: seankane.azurecr.io + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-azure-containerregistry/0.0.1 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: Thu, 01 Apr 2021 20:48:54 GMT + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + x-ms-ratelimit-remaining-calls-per-second: '333.216667' + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/oauth2/exchange +- request: + body: + grant_type: refresh_token + refresh_token: REDACTED + scope: registry:catalog:* + service: seankane.azurecr.io + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-azure-containerregistry/0.0.1 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: Thu, 01 Apr 2021 20:48:54 GMT + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + x-ms-ratelimit-remaining-calls-per-second: '333.2' + 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/0.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://fake_url.azurecr.io/acr/v1/_catalog?last=repo308e19dd&n=2&orderby= + response: + body: + string: '{"repositories":["repo9b321760","repob7cc1bf8"]} + + ' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '49' + content-type: application/json; charset=utf-8 + date: Thu, 01 Apr 2021 20:48:54 GMT + docker-distribution-api-version: registry/2.0 + link: ; rel="next" + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/acr/v1/_catalog?last=repo308e19dd&n=2&orderby= +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-azure-containerregistry/0.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://fake_url.azurecr.io/acr/v1/_catalog?last=repob7cc1bf8&n=2&orderby= + response: + body: + string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, + visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"registry","Name":"catalog","Action":"*"}]}]} + + ' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '196' + content-type: application/json; charset=utf-8 + date: Thu, 01 Apr 2021 20:48:54 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/_catalog?last=repob7cc1bf8&n=2&orderby= +- request: + body: + access_token: REDACTED + grant_type: access_token + service: seankane.azurecr.io + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-azure-containerregistry/0.0.1 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: Thu, 01 Apr 2021 20:48:54 GMT + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + x-ms-ratelimit-remaining-calls-per-second: '333.183333' + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/oauth2/exchange +- request: + body: + grant_type: refresh_token + refresh_token: REDACTED + scope: registry:catalog:* + service: seankane.azurecr.io + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-azure-containerregistry/0.0.1 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: Thu, 01 Apr 2021 20:48:54 GMT + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + x-ms-ratelimit-remaining-calls-per-second: '333.166667' + 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/0.0.1 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://fake_url.azurecr.io/acr/v1/_catalog?last=repob7cc1bf8&n=2&orderby= + response: + body: + string: '{"repositories":["ubuntu"]} + + ' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '28' + content-type: application/json; charset=utf-8 + date: Thu, 01 Apr 2021 20:48:55 GMT + docker-distribution-api-version: registry/2.0 + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/acr/v1/_catalog?last=repob7cc1bf8&n=2&orderby= +version: 1 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 088e4205544e..2ce996ea5974 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: - - Mon, 05 Apr 2021 12:06:43 GMT + - Mon, 05 Apr 2021 14:38:10 GMT docker-distribution-api-version: - registry/2.0 server: @@ -73,7 +73,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:06:45 GMT + - Mon, 05 Apr 2021 14:38:11 GMT server: - openresty strict-transport-security: @@ -111,7 +111,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:06:45 GMT + - Mon, 05 Apr 2021 14:38:12 GMT server: - openresty strict-transport-security: @@ -156,7 +156,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:06:47 GMT + - Mon, 05 Apr 2021 14:38:13 GMT docker-distribution-api-version: - registry/2.0 server: @@ -203,7 +203,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:06:52 GMT + - Mon, 05 Apr 2021 14:38:18 GMT docker-distribution-api-version: - registry/2.0 server: @@ -243,7 +243,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:06:52 GMT + - Mon, 05 Apr 2021 14:38:19 GMT server: - openresty strict-transport-security: @@ -251,7 +251,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.183333' + - '333.15' status: code: 200 message: OK @@ -281,7 +281,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:06:52 GMT + - Mon, 05 Apr 2021 14:38:19 GMT server: - openresty strict-transport-security: @@ -289,7 +289,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.166667' + - '332.933333' status: code: 200 message: OK @@ -308,7 +308,7 @@ interactions: uri: https://fake_url.azurecr.io/acr/v1/_catalog response: body: - string: '{"repositories":["alpine/git","debian","hello-world","library/hello-world","repo160e197b","repo2e8319c5","repo308e19dd","repo6ce51658","repo9b321760","repob7cc1bf8","repod2be1c42","repoeb7113db","to_be_deleted","ubuntu"]} + string: '{"repositories":["alpine/git","debian","hello-world","library/hello-world","repo160e197b","repo2e8319c5","repo308e19dd","repo6ce51658","repo9b321760","repo_set160e197b","repob7cc1bf8","repod2be1c42","repoeb7113db","ubuntu"]} ' headers: @@ -320,11 +320,11 @@ interactions: connection: - keep-alive content-length: - - '222' + - '225' content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:06:53 GMT + - Mon, 05 Apr 2021 14:38:19 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 d3d11c39af4e..02aa882e77bc 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: - - Mon, 05 Apr 2021 12:06:53 GMT + - Mon, 05 Apr 2021 14:38:20 GMT docker-distribution-api-version: - registry/2.0 server: @@ -73,7 +73,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:06:55 GMT + - Mon, 05 Apr 2021 14:38:22 GMT server: - openresty strict-transport-security: @@ -81,7 +81,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '332.85' + - '333.15' status: code: 200 message: OK @@ -111,7 +111,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:06:55 GMT + - Mon, 05 Apr 2021 14:38:22 GMT server: - openresty strict-transport-security: @@ -119,7 +119,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '332.833333' + - '332.766667' status: code: 200 message: OK @@ -157,7 +157,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:06:56 GMT + - Mon, 05 Apr 2021 14:38:22 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 e78dc94e0f83..92baa3f660b0 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: - - Mon, 05 Apr 2021 12:06:57 GMT + - Mon, 05 Apr 2021 14:38:23 GMT docker-distribution-api-version: - registry/2.0 server: @@ -71,7 +71,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:06:58 GMT + - Mon, 05 Apr 2021 14:38:24 GMT server: - openresty strict-transport-security: @@ -79,7 +79,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.3' + - '333.25' status: code: 200 message: OK @@ -109,7 +109,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:06:58 GMT + - Mon, 05 Apr 2021 14:38:24 GMT server: - openresty strict-transport-security: @@ -117,7 +117,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.283333' + - '332.7' status: code: 200 message: OK @@ -136,7 +136,7 @@ interactions: uri: https://fake_url.azurecr.io/acr/v1/_catalog response: body: - string: '{"repositories":["alpine/git","debian","hello-world","library/hello-world","repo160e197b","repo2e8319c5","repo308e19dd","repo6ce51658","repo9b321760","repob7cc1bf8","repod2be1c42","repoeb7113db","to_be_deleted","ubuntu"]} + string: '{"repositories":["alpine/git","debian","hello-world","library/hello-world","repo160e197b","repo2e8319c5","repo308e19dd","repo6ce51658","repo9b321760","repo_set160e197b","repob7cc1bf8","repod2be1c42","repoeb7113db","ubuntu"]} ' headers: @@ -148,11 +148,11 @@ interactions: connection: - keep-alive content-length: - - '222' + - '225' content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:06:58 GMT + - Mon, 05 Apr 2021 14:38:24 GMT docker-distribution-api-version: - registry/2.0 server: diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_client.test_list_repositories2.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_client.test_list_repositories2.yaml new file mode 100644 index 000000000000..5000163caa3c --- /dev/null +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_client.test_list_repositories2.yaml @@ -0,0 +1,47 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azure-containerregistry/0.1.0/3.9.0rc1 (tags/v3.9.0rc1:439c93d, + Aug 11 2020, 19:19:43) [MSC v.1924 64 bit (AMD64)] Python/3.9.0rc1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://fake_url.azurecr.io/acr/v1/_catalog + response: + body: + string: '{"repositories":["hello-world"]} + + ' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '33' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 18 Mar 2021 15:54:32 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_registry_client.test_list_repositories_by_page.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_client.test_list_repositories_by_page.yaml new file mode 100644 index 000000000000..f8292ec5ddb5 --- /dev/null +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_client.test_list_repositories_by_page.yaml @@ -0,0 +1,1344 @@ +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/_catalog?n=2 + response: + body: + string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, + visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"registry","Name":"catalog","Action":"*"}]}]} + + ' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '196' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 05 Apr 2021 22:35:01 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: + - Mon, 05 Apr 2021 22:35:03 GMT + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + x-ms-ratelimit-remaining-calls-per-second: + - '333.316667' + status: + code: 200 + message: OK +- request: + body: grant_type=refresh_token&service=seankane.azurecr.io&scope=registry%3Acatalog%3A%2A&refresh_token=REDACTED + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '1063' + 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: + - Mon, 05 Apr 2021 22:35:03 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: 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/_catalog?n=2 + response: + body: + string: '{"repositories":["alpine/git","debian"]} + + ' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '41' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 05 Apr 2021 22:35:03 GMT + docker-distribution-api-version: + - registry/2.0 + link: + - ; rel="next" + 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/_catalog?last=debian&n=2&orderby= + response: + body: + string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, + visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"registry","Name":"catalog","Action":"*"}]}]} + + ' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '196' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 05 Apr 2021 22:35:03 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: + - Mon, 05 Apr 2021 22:35:04 GMT + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + x-ms-ratelimit-remaining-calls-per-second: + - '333.283333' + status: + code: 200 + message: OK +- request: + body: grant_type=refresh_token&service=seankane.azurecr.io&scope=registry%3Acatalog%3A%2A&refresh_token=REDACTED + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '1063' + 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: + - Mon, 05 Apr 2021 22:35:04 GMT + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + x-ms-ratelimit-remaining-calls-per-second: + - '333.266667' + 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/_catalog?last=debian&n=2&orderby= + response: + body: + string: '{"repositories":["hello-world","library/hello-world"]} + + ' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '55' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 05 Apr 2021 22:35:04 GMT + docker-distribution-api-version: + - registry/2.0 + link: + - ; rel="next" + 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/_catalog?last=library%2Fhello-world&n=2&orderby= + response: + body: + string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, + visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"registry","Name":"catalog","Action":"*"}]}]} + + ' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '196' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 05 Apr 2021 22:35:04 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: + - Mon, 05 Apr 2021 22:35:05 GMT + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + x-ms-ratelimit-remaining-calls-per-second: + - '333.25' + status: + code: 200 + message: OK +- request: + body: grant_type=refresh_token&service=seankane.azurecr.io&scope=registry%3Acatalog%3A%2A&refresh_token=REDACTED + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '1063' + 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: + - Mon, 05 Apr 2021 22:35:05 GMT + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + x-ms-ratelimit-remaining-calls-per-second: + - '333.233333' + 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/_catalog?last=library%2Fhello-world&n=2&orderby= + response: + body: + string: '{"repositories":["repo160e197b","repo2e8319c5"]} + + ' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '49' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 05 Apr 2021 22:35:05 GMT + docker-distribution-api-version: + - registry/2.0 + link: + - ; rel="next" + 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/_catalog?last=repo2e8319c5&n=2&orderby= + response: + body: + string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, + visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"registry","Name":"catalog","Action":"*"}]}]} + + ' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '196' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 05 Apr 2021 22:35:05 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: + - Mon, 05 Apr 2021 22:35:05 GMT + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + x-ms-ratelimit-remaining-calls-per-second: + - '333.216667' + status: + code: 200 + message: OK +- request: + body: grant_type=refresh_token&service=seankane.azurecr.io&scope=registry%3Acatalog%3A%2A&refresh_token=REDACTED + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '1063' + 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: + - Mon, 05 Apr 2021 22:35:06 GMT + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + x-ms-ratelimit-remaining-calls-per-second: + - '333.2' + 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/_catalog?last=repo2e8319c5&n=2&orderby= + response: + body: + string: '{"repositories":["repo308e19dd","repo6ce51658"]} + + ' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '49' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 05 Apr 2021 22:35:06 GMT + docker-distribution-api-version: + - registry/2.0 + link: + - ; rel="next" + 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/_catalog?last=repo6ce51658&n=2&orderby= + response: + body: + string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, + visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"registry","Name":"catalog","Action":"*"}]}]} + + ' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '196' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 05 Apr 2021 22:35:06 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: + - Mon, 05 Apr 2021 22:35:06 GMT + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + x-ms-ratelimit-remaining-calls-per-second: + - '333.183333' + status: + code: 200 + message: OK +- request: + body: grant_type=refresh_token&service=seankane.azurecr.io&scope=registry%3Acatalog%3A%2A&refresh_token=REDACTED + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '1063' + 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: + - Mon, 05 Apr 2021 22:35:06 GMT + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + x-ms-ratelimit-remaining-calls-per-second: + - '333.166667' + 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/_catalog?last=repo6ce51658&n=2&orderby= + response: + body: + string: '{"repositories":["repo9b321760","repo_set160e197b"]} + + ' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '53' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 05 Apr 2021 22:35:07 GMT + docker-distribution-api-version: + - registry/2.0 + link: + - ; rel="next" + 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/_catalog?last=repo_set160e197b&n=2&orderby= + response: + body: + string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, + visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"registry","Name":"catalog","Action":"*"}]}]} + + ' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '196' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 05 Apr 2021 22:35:07 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: + - Mon, 05 Apr 2021 22:35:07 GMT + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + x-ms-ratelimit-remaining-calls-per-second: + - '333.15' + status: + code: 200 + message: OK +- request: + body: grant_type=refresh_token&service=seankane.azurecr.io&scope=registry%3Acatalog%3A%2A&refresh_token=REDACTED + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '1063' + 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: + - Mon, 05 Apr 2021 22:35:07 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/_catalog?last=repo_set160e197b&n=2&orderby= + response: + body: + string: '{"repositories":["repo_set_manib7cc1bf8","repob7cc1bf8"]} + + ' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '58' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 05 Apr 2021 22:35:07 GMT + docker-distribution-api-version: + - registry/2.0 + link: + - ; rel="next" + 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/_catalog?last=repob7cc1bf8&n=2&orderby= + response: + body: + string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, + visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"registry","Name":"catalog","Action":"*"}]}]} + + ' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '196' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 05 Apr 2021 22:35:07 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: + - Mon, 05 Apr 2021 22:35:08 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=registry%3Acatalog%3A%2A&refresh_token=REDACTED + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '1063' + 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: + - Mon, 05 Apr 2021 22:35:08 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 + 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/_catalog?last=repob7cc1bf8&n=2&orderby= + response: + body: + string: '{"repositories":["repod2be1c42","repoeb7113db"]} + + ' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '49' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 05 Apr 2021 22:35:08 GMT + docker-distribution-api-version: + - registry/2.0 + link: + - ; rel="next" + 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/_catalog?last=repoeb7113db&n=2&orderby= + response: + body: + string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, + visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"registry","Name":"catalog","Action":"*"}]}]} + + ' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '196' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 05 Apr 2021 22:35:08 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: + - Mon, 05 Apr 2021 22:35:08 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=registry%3Acatalog%3A%2A&refresh_token=REDACTED + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '1063' + 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: + - Mon, 05 Apr 2021 22:35:09 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/_catalog?last=repoeb7113db&n=2&orderby= + response: + body: + string: '{"repositories":["ubuntu"]} + + ' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '28' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 05 Apr 2021 22:35:09 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_registry_client.test_transport_closed_only_once.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_client.test_transport_closed_only_once.yaml index 60243bc157b8..0e86ab61d0c4 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_client.test_transport_closed_only_once.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_client.test_transport_closed_only_once.yaml @@ -31,7 +31,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:39:49 GMT + - Mon, 05 Apr 2021 14:38:32 GMT docker-distribution-api-version: - registry/2.0 server: @@ -71,7 +71,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:39:51 GMT + - Mon, 05 Apr 2021 14:38:34 GMT server: - openresty strict-transport-security: @@ -79,7 +79,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.316667' + - '333.1' status: code: 200 message: OK @@ -109,7 +109,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:39:52 GMT + - Mon, 05 Apr 2021 14:38:34 GMT server: - openresty strict-transport-security: @@ -117,7 +117,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.3' + - '332.916667' status: code: 200 message: OK @@ -152,7 +152,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:39:52 GMT + - Mon, 05 Apr 2021 14:38:34 GMT docker-distribution-api-version: - registry/2.0 server: @@ -197,7 +197,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:39:52 GMT + - Mon, 05 Apr 2021 14:38:34 GMT docker-distribution-api-version: - registry/2.0 server: @@ -237,7 +237,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:39:52 GMT + - Mon, 05 Apr 2021 14:38:34 GMT server: - openresty strict-transport-security: @@ -245,7 +245,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.283333' + - '332.9' status: code: 200 message: OK @@ -275,7 +275,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:39:52 GMT + - Mon, 05 Apr 2021 14:38:35 GMT server: - openresty strict-transport-security: @@ -283,7 +283,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.266667' + - '332.883333' status: code: 200 message: OK @@ -318,7 +318,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:39:52 GMT + - Mon, 05 Apr 2021 14:38:35 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 3339046af220..520f8c80b81a 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: Mon, 05 Apr 2021 12:07:22 GMT + date: Mon, 05 Apr 2021 14:38:54 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: Mon, 05 Apr 2021 12:07:23 GMT + date: Mon, 05 Apr 2021 14:38:55 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.766667' status: code: 200 message: OK @@ -75,7 +75,7 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:07:23 GMT + date: Mon, 05 Apr 2021 14:38:55 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked @@ -103,7 +103,7 @@ interactions: connection: keep-alive content-length: '788' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:07:25 GMT + date: Mon, 05 Apr 2021 14:38: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: Mon, 05 Apr 2021 12:07:30 GMT + date: Mon, 05 Apr 2021 14:39: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: Mon, 05 Apr 2021 12:07:30 GMT + date: Mon, 05 Apr 2021 14:39:02 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: '332.916667' status: code: 200 message: OK @@ -189,11 +189,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:07:30 GMT + date: Mon, 05 Apr 2021 14:39:02 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '333.05' + x-ms-ratelimit-remaining-calls-per-second: '332.9' status: code: 200 message: OK @@ -209,15 +209,15 @@ interactions: uri: https://fake_url.azurecr.io/acr/v1/_catalog response: body: - string: '{"repositories":["alpine/git","debian","hello-world","library/hello-world","repo160e197b","repo2e8319c5","repo308e19dd","repo6ce51658","repo9b321760","repob7cc1bf8","repod2be1c42","repoeb7113db","to_be_deleted","ubuntu"]} + string: '{"repositories":["alpine/git","debian","hello-world","library/hello-world","repo160e197b","repo2e8319c5","repo308e19dd","repo6ce51658","repo9b321760","repo_set160e197b","repob7cc1bf8","repod2be1c42","repoeb7113db","ubuntu"]} ' headers: access-control-expose-headers: X-Ms-Correlation-Request-Id connection: keep-alive - content-length: '222' + content-length: '225' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:07:30 GMT + date: Mon, 05 Apr 2021 14:39:02 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 849a48efde20..4873ae9a559c 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: Mon, 05 Apr 2021 12:07:31 GMT + date: Mon, 05 Apr 2021 14:39: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: Mon, 05 Apr 2021 12:07:32 GMT + date: Mon, 05 Apr 2021 14:39:04 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '333.1' + x-ms-ratelimit-remaining-calls-per-second: '332.966667' status: code: 200 message: OK @@ -75,11 +75,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:07:32 GMT + date: Mon, 05 Apr 2021 14:39:04 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.8' status: code: 200 message: OK @@ -104,7 +104,7 @@ interactions: connection: keep-alive content-length: '121' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:07:32 GMT + date: Mon, 05 Apr 2021 14:39:04 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 4fa4d92c75cd..1447db4080b2 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: Mon, 05 Apr 2021 12:07:33 GMT + date: Mon, 05 Apr 2021 14:39: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: Mon, 05 Apr 2021 12:07:34 GMT + date: Mon, 05 Apr 2021 14:39:06 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: '332.883333' status: code: 200 message: OK @@ -75,11 +75,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:07:34 GMT + date: Mon, 05 Apr 2021 14:39:06 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '332.766667' + x-ms-ratelimit-remaining-calls-per-second: '332.866667' status: code: 200 message: OK @@ -95,15 +95,15 @@ interactions: uri: https://fake_url.azurecr.io/acr/v1/_catalog response: body: - string: '{"repositories":["alpine/git","debian","hello-world","library/hello-world","repo160e197b","repo2e8319c5","repo308e19dd","repo6ce51658","repo9b321760","repob7cc1bf8","repod2be1c42","repoeb7113db","to_be_deleted","ubuntu"]} + string: '{"repositories":["alpine/git","debian","hello-world","library/hello-world","repo160e197b","repo2e8319c5","repo308e19dd","repo6ce51658","repo9b321760","repo_set160e197b","repob7cc1bf8","repod2be1c42","repoeb7113db","ubuntu"]} ' headers: access-control-expose-headers: X-Ms-Correlation-Request-Id connection: keep-alive - content-length: '222' + content-length: '225' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:07:34 GMT + date: Mon, 05 Apr 2021 14:39: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_registry_client_async.test_list_repositories_by_page.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_client_async.test_list_repositories_by_page.yaml new file mode 100644 index 000000000000..359461e38ed1 --- /dev/null +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_client_async.test_list_repositories_by_page.yaml @@ -0,0 +1,913 @@ +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/_catalog?n=2 + response: + body: + string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, + visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"registry","Name":"catalog","Action":"*"}]}]} + + ' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '196' + content-type: application/json; charset=utf-8 + date: Mon, 05 Apr 2021 22:35:09 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/_catalog?n=2 +- 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: Mon, 05 Apr 2021 22:35:10 GMT + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + x-ms-ratelimit-remaining-calls-per-second: '333.05' + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/oauth2/exchange +- request: + body: + grant_type: refresh_token + refresh_token: REDACTED + scope: registry:catalog:* + 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: Mon, 05 Apr 2021 22:35:11 GMT + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + x-ms-ratelimit-remaining-calls-per-second: '333.033333' + 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/_catalog?n=2 + response: + body: + string: '{"repositories":["alpine/git","debian"]} + + ' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '41' + content-type: application/json; charset=utf-8 + date: Mon, 05 Apr 2021 22:35:11 GMT + docker-distribution-api-version: registry/2.0 + link: ; rel="next" + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/acr/v1/_catalog?n=2 +- 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/_catalog?last=debian&n=2&orderby= + response: + body: + string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, + visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"registry","Name":"catalog","Action":"*"}]}]} + + ' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '196' + content-type: application/json; charset=utf-8 + date: Mon, 05 Apr 2021 22:35:11 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/_catalog?last=debian&n=2&orderby= +- 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: Mon, 05 Apr 2021 22:35:11 GMT + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + x-ms-ratelimit-remaining-calls-per-second: '333.016667' + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/oauth2/exchange +- request: + body: + grant_type: refresh_token + refresh_token: REDACTED + scope: registry:catalog:* + 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: Mon, 05 Apr 2021 22:35:11 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 + 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/_catalog?last=debian&n=2&orderby= + response: + body: + string: '{"repositories":["hello-world","library/hello-world"]} + + ' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '55' + content-type: application/json; charset=utf-8 + date: Mon, 05 Apr 2021 22:35:11 GMT + docker-distribution-api-version: registry/2.0 + link: ; rel="next" + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/acr/v1/_catalog?last=debian&n=2&orderby= +- 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/_catalog?last=library/hello-world&n=2&orderby= + response: + body: + string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, + visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"registry","Name":"catalog","Action":"*"}]}]} + + ' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '196' + content-type: application/json; charset=utf-8 + date: Mon, 05 Apr 2021 22:35:11 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/_catalog?last=library/hello-world&n=2&orderby= +- 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: Mon, 05 Apr 2021 22:35:12 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 + url: https://seankane.azurecr.io/oauth2/exchange +- request: + body: + grant_type: refresh_token + refresh_token: REDACTED + scope: registry:catalog:* + 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: Mon, 05 Apr 2021 22:35:12 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 + 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/_catalog?last=library/hello-world&n=2&orderby= + response: + body: + string: '{"repositories":["repo160e197b","repo2e8319c5"]} + + ' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '49' + content-type: application/json; charset=utf-8 + date: Mon, 05 Apr 2021 22:35:12 GMT + docker-distribution-api-version: registry/2.0 + link: ; rel="next" + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/acr/v1/_catalog?last=library/hello-world&n=2&orderby= +- 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/_catalog?last=repo2e8319c5&n=2&orderby= + response: + body: + string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, + visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"registry","Name":"catalog","Action":"*"}]}]} + + ' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '196' + content-type: application/json; charset=utf-8 + date: Mon, 05 Apr 2021 22:35:12 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/_catalog?last=repo2e8319c5&n=2&orderby= +- 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: Mon, 05 Apr 2021 22:35:12 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 + url: https://seankane.azurecr.io/oauth2/exchange +- request: + body: + grant_type: refresh_token + refresh_token: REDACTED + scope: registry:catalog:* + 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: Mon, 05 Apr 2021 22:35:12 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 + 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/_catalog?last=repo2e8319c5&n=2&orderby= + response: + body: + string: '{"repositories":["repo308e19dd","repo6ce51658"]} + + ' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '49' + content-type: application/json; charset=utf-8 + date: Mon, 05 Apr 2021 22:35:13 GMT + docker-distribution-api-version: registry/2.0 + link: ; rel="next" + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/acr/v1/_catalog?last=repo2e8319c5&n=2&orderby= +- 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/_catalog?last=repo6ce51658&n=2&orderby= + response: + body: + string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, + visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"registry","Name":"catalog","Action":"*"}]}]} + + ' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '196' + content-type: application/json; charset=utf-8 + date: Mon, 05 Apr 2021 22:35:13 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/_catalog?last=repo6ce51658&n=2&orderby= +- 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: Mon, 05 Apr 2021 22:35:13 GMT + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + x-ms-ratelimit-remaining-calls-per-second: '332.916667' + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/oauth2/exchange +- request: + body: + grant_type: refresh_token + refresh_token: REDACTED + scope: registry:catalog:* + 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: Mon, 05 Apr 2021 22:35:13 GMT + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + x-ms-ratelimit-remaining-calls-per-second: '332.9' + 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/_catalog?last=repo6ce51658&n=2&orderby= + response: + body: + string: '{"repositories":["repo9b321760","repo_set160e197b"]} + + ' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '53' + content-type: application/json; charset=utf-8 + date: Mon, 05 Apr 2021 22:35:13 GMT + docker-distribution-api-version: registry/2.0 + link: ; rel="next" + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/acr/v1/_catalog?last=repo6ce51658&n=2&orderby= +- 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/_catalog?last=repo_set160e197b&n=2&orderby= + response: + body: + string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, + visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"registry","Name":"catalog","Action":"*"}]}]} + + ' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '196' + content-type: application/json; charset=utf-8 + date: Mon, 05 Apr 2021 22:35:13 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/_catalog?last=repo_set160e197b&n=2&orderby= +- 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: Mon, 05 Apr 2021 22:35:14 GMT + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + x-ms-ratelimit-remaining-calls-per-second: '332.883333' + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/oauth2/exchange +- request: + body: + grant_type: refresh_token + refresh_token: REDACTED + scope: registry:catalog:* + 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: Mon, 05 Apr 2021 22:35:14 GMT + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + x-ms-ratelimit-remaining-calls-per-second: '332.866667' + 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/_catalog?last=repo_set160e197b&n=2&orderby= + response: + body: + string: '{"repositories":["repo_set_manib7cc1bf8","repob7cc1bf8"]} + + ' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '58' + content-type: application/json; charset=utf-8 + date: Mon, 05 Apr 2021 22:35:14 GMT + docker-distribution-api-version: registry/2.0 + link: ; rel="next" + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/acr/v1/_catalog?last=repo_set160e197b&n=2&orderby= +- 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/_catalog?last=repob7cc1bf8&n=2&orderby= + response: + body: + string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, + visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"registry","Name":"catalog","Action":"*"}]}]} + + ' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '196' + content-type: application/json; charset=utf-8 + date: Mon, 05 Apr 2021 22:35:14 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/_catalog?last=repob7cc1bf8&n=2&orderby= +- 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: Mon, 05 Apr 2021 22:35:14 GMT + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + x-ms-ratelimit-remaining-calls-per-second: '332.85' + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/oauth2/exchange +- request: + body: + grant_type: refresh_token + refresh_token: REDACTED + scope: registry:catalog:* + 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: Mon, 05 Apr 2021 22:35:14 GMT + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + x-ms-ratelimit-remaining-calls-per-second: '332.833333' + 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/_catalog?last=repob7cc1bf8&n=2&orderby= + response: + body: + string: '{"repositories":["repod2be1c42","repoeb7113db"]} + + ' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '49' + content-type: application/json; charset=utf-8 + date: Mon, 05 Apr 2021 22:35:14 GMT + docker-distribution-api-version: registry/2.0 + link: ; rel="next" + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/acr/v1/_catalog?last=repob7cc1bf8&n=2&orderby= +- 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/_catalog?last=repoeb7113db&n=2&orderby= + response: + body: + string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, + visit https://aka.ms/acr/authorization for more information.","detail":[{"Type":"registry","Name":"catalog","Action":"*"}]}]} + + ' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '196' + content-type: application/json; charset=utf-8 + date: Mon, 05 Apr 2021 22:35:14 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/_catalog?last=repoeb7113db&n=2&orderby= +- 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: Mon, 05 Apr 2021 22:35:15 GMT + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + x-ms-ratelimit-remaining-calls-per-second: '332.816667' + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/oauth2/exchange +- request: + body: + grant_type: refresh_token + refresh_token: REDACTED + scope: registry:catalog:* + 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: Mon, 05 Apr 2021 22:35:15 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/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/_catalog?last=repoeb7113db&n=2&orderby= + response: + body: + string: '{"repositories":["ubuntu"]} + + ' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '28' + content-type: application/json; charset=utf-8 + date: Mon, 05 Apr 2021 22:35:15 GMT + docker-distribution-api-version: registry/2.0 + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/acr/v1/_catalog?last=repoeb7113db&n=2&orderby= +version: 1 diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_client_async.test_transport_closed_only_once.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_client_async.test_transport_closed_only_once.yaml index c29d92c3922c..22b9e981503a 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_client_async.test_transport_closed_only_once.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_registry_client_async.test_transport_closed_only_once.yaml @@ -19,7 +19,7 @@ interactions: connection: keep-alive content-length: '196' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:39:53 GMT + date: Mon, 05 Apr 2021 14:39:12 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: Mon, 05 Apr 2021 12:39:54 GMT + date: Mon, 05 Apr 2021 14:39:13 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '333.316667' + x-ms-ratelimit-remaining-calls-per-second: '332.85' status: code: 200 message: OK @@ -75,11 +75,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:39:54 GMT + date: Mon, 05 Apr 2021 14:39:13 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '333.3' + x-ms-ratelimit-remaining-calls-per-second: '332.833333' status: code: 200 message: OK @@ -103,7 +103,7 @@ interactions: connection: keep-alive content-length: '225' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:39:54 GMT + date: Mon, 05 Apr 2021 14:39:14 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: '196' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:39:54 GMT + date: Mon, 05 Apr 2021 14:39:14 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: Mon, 05 Apr 2021 12:39:55 GMT + date: Mon, 05 Apr 2021 14:39:14 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '333.283333' + x-ms-ratelimit-remaining-calls-per-second: '332.816667' status: code: 200 message: OK @@ -188,11 +188,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:39:55 GMT + date: Mon, 05 Apr 2021 14:39:14 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '333.266667' + x-ms-ratelimit-remaining-calls-per-second: '332.8' status: code: 200 message: OK @@ -216,7 +216,7 @@ interactions: connection: keep-alive content-length: '225' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:39:55 GMT + date: Mon, 05 Apr 2021 14:39:14 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 index f3f6b8306146..2937d3fef792 100644 --- 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 @@ -31,7 +31,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:07:57 GMT + - Mon, 05 Apr 2021 14:39:33 GMT docker-distribution-api-version: - registry/2.0 server: @@ -71,7 +71,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:07:58 GMT + - Mon, 05 Apr 2021 14:39:35 GMT server: - openresty strict-transport-security: @@ -79,7 +79,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.216667' + - '332.7' status: code: 200 message: OK @@ -109,7 +109,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:07:59 GMT + - Mon, 05 Apr 2021 14:39:35 GMT server: - openresty strict-transport-security: @@ -117,7 +117,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.1' + - '332.683333' status: code: 200 message: OK @@ -136,7 +136,7 @@ interactions: uri: https://fake_url.azurecr.io/acr/v1/repo2e8319c5/_manifests response: body: - string: '{"registry":"fake_url.azurecr.io","imageName":"repo2e8319c5","manifests":[{"digest":"sha256:1b26826f602946860c279fce658f31050cff2c596583af237d971f4629b57792","imageSize":0,"createdTime":"2021-04-05T12:07:47.3889878Z","lastUpdateTime":"2021-04-05T12:07:47.3889878Z","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-02T17:57:04.1545513Z","lastUpdateTime":"2021-04-02T17:57:04.1545513Z","mediaType":"application/vnd.docker.distribution.manifest.list.v2+json","tags":["latest"],"changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true}},{"digest":"sha256:50b8560ad574c779908da71f7ce370c0a2471c098d44d1c8f6b513c5a55eeeb1","imageSize":0,"createdTime":"2021-04-02T17:57:03.9493073Z","lastUpdateTime":"2021-04-02T17:57:03.9493073Z","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-02T17:57:05.067556Z","lastUpdateTime":"2021-04-02T17:57:05.067556Z","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-02T17:57:04.5518371Z","lastUpdateTime":"2021-04-02T17:57:04.5518371Z","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-02T17:57:05.3667091Z","lastUpdateTime":"2021-04-02T17:57:05.3667091Z","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-02T17:57:04.9095958Z","lastUpdateTime":"2021-04-02T17:57:04.9095958Z","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-02T17:57:03.9989985Z","lastUpdateTime":"2021-04-02T17:57:03.9989985Z","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-02T17:57:04.9860535Z","lastUpdateTime":"2021-04-02T17:57:04.9860535Z","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-02T17:57:03.909361Z","lastUpdateTime":"2021-04-02T17:57:03.909361Z","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":"repo2e8319c5","manifests":[{"digest":"sha256:1b26826f602946860c279fce658f31050cff2c596583af237d971f4629b57792","imageSize":0,"createdTime":"2021-04-05T14:39:24.7980339Z","lastUpdateTime":"2021-04-05T14:39:24.7980339Z","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-02T17:57:04.1545513Z","lastUpdateTime":"2021-04-02T17:57:04.1545513Z","mediaType":"application/vnd.docker.distribution.manifest.list.v2+json","tags":["latest"],"changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true}},{"digest":"sha256:50b8560ad574c779908da71f7ce370c0a2471c098d44d1c8f6b513c5a55eeeb1","imageSize":0,"createdTime":"2021-04-02T17:57:03.9493073Z","lastUpdateTime":"2021-04-02T17:57:03.9493073Z","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-02T17:57:05.067556Z","lastUpdateTime":"2021-04-02T17:57:05.067556Z","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-02T17:57:04.5518371Z","lastUpdateTime":"2021-04-02T17:57:04.5518371Z","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-02T17:57:05.3667091Z","lastUpdateTime":"2021-04-02T17:57:05.3667091Z","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-02T17:57:04.9095958Z","lastUpdateTime":"2021-04-02T17:57:04.9095958Z","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-02T17:57:03.9989985Z","lastUpdateTime":"2021-04-02T17:57:03.9989985Z","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-02T17:57:04.9860535Z","lastUpdateTime":"2021-04-02T17:57:04.9860535Z","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-02T17:57:03.909361Z","lastUpdateTime":"2021-04-02T17:57:03.909361Z","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: - - Mon, 05 Apr 2021 12:07:59 GMT + - Mon, 05 Apr 2021 14:39:35 GMT docker-distribution-api-version: - registry/2.0 server: @@ -199,7 +199,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:07:59 GMT + - Mon, 05 Apr 2021 14:39:35 GMT docker-distribution-api-version: - registry/2.0 server: @@ -239,7 +239,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:08:00 GMT + - Mon, 05 Apr 2021 14:39:36 GMT server: - openresty strict-transport-security: @@ -247,7 +247,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.083333' + - '332.666667' status: code: 200 message: OK @@ -277,7 +277,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:08:00 GMT + - Mon, 05 Apr 2021 14:39:36 GMT server: - openresty strict-transport-security: @@ -285,7 +285,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.066667' + - '332.65' status: code: 200 message: OK @@ -318,7 +318,7 @@ interactions: content-length: - '0' date: - - Mon, 05 Apr 2021 12:08:00 GMT + - Mon, 05 Apr 2021 14:39:36 GMT docker-distribution-api-version: - registry/2.0 server: @@ -365,7 +365,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:08:01 GMT + - Mon, 05 Apr 2021 14:39:37 GMT docker-distribution-api-version: - registry/2.0 server: @@ -405,7 +405,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:08:01 GMT + - Mon, 05 Apr 2021 14:39:37 GMT server: - openresty strict-transport-security: @@ -413,7 +413,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.05' + - '332.633333' status: code: 200 message: OK @@ -443,7 +443,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:08:01 GMT + - Mon, 05 Apr 2021 14:39:37 GMT server: - openresty strict-transport-security: @@ -451,7 +451,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.033333' + - '332.616667' status: code: 200 message: OK @@ -484,7 +484,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:08:02 GMT + - Mon, 05 Apr 2021 14:39:38 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.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_delete_repository.yaml index 516e942df960..0ccade6697b5 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: - - Mon, 05 Apr 2021 12:08:21 GMT + - Mon, 05 Apr 2021 14:39:56 GMT docker-distribution-api-version: - registry/2.0 server: @@ -71,7 +71,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:08:23 GMT + - Mon, 05 Apr 2021 14:39:57 GMT server: - openresty strict-transport-security: @@ -79,7 +79,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.316667' + - '332.383333' status: code: 200 message: OK @@ -109,7 +109,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:08:23 GMT + - Mon, 05 Apr 2021 14:39:58 GMT server: - openresty strict-transport-security: @@ -117,7 +117,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.3' + - '332.366667' status: code: 200 message: OK @@ -136,7 +136,7 @@ interactions: uri: https://fake_url.azurecr.io/acr/v1/_catalog response: body: - string: '{"repositories":["alpine/git","debian","hello-world","library/hello-world","repo160e197b","repo2e8319c5","repo308e19dd","repo6ce51658","repo9b321760","repob7cc1bf8","repod2be1c42","repoeb7113db","to_be_deleted","ubuntu"]} + string: '{"repositories":["alpine/git","debian","hello-world","library/hello-world","repo160e197b","repo2e8319c5","repo308e19dd","repo6ce51658","repo9b321760","repo_set160e197b","repob7cc1bf8","repod2be1c42","repoeb7113db","to_be_deleted","ubuntu"]} ' headers: @@ -148,11 +148,11 @@ interactions: connection: - keep-alive content-length: - - '222' + - '241' content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:08:23 GMT + - Mon, 05 Apr 2021 14:39:58 GMT docker-distribution-api-version: - registry/2.0 server: @@ -199,7 +199,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:08:24 GMT + - Mon, 05 Apr 2021 14:39:58 GMT docker-distribution-api-version: - registry/2.0 server: @@ -239,7 +239,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:08:25 GMT + - Mon, 05 Apr 2021 14:40:00 GMT server: - openresty strict-transport-security: @@ -247,7 +247,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.3' + - '332.733333' status: code: 200 message: OK @@ -277,7 +277,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:08:26 GMT + - Mon, 05 Apr 2021 14:40:00 GMT server: - openresty strict-transport-security: @@ -285,7 +285,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '332.933333' + - '332.35' status: code: 200 message: OK @@ -322,7 +322,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:08:28 GMT + - Mon, 05 Apr 2021 14:40:02 GMT docker-distribution-api-version: - registry/2.0 server: @@ -369,7 +369,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:08:33 GMT + - Mon, 05 Apr 2021 14:40:07 GMT docker-distribution-api-version: - registry/2.0 server: @@ -409,7 +409,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:08:33 GMT + - Mon, 05 Apr 2021 14:40:08 GMT server: - openresty strict-transport-security: @@ -417,7 +417,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.266667' + - '332.75' status: code: 200 message: OK @@ -447,7 +447,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:08:34 GMT + - Mon, 05 Apr 2021 14:40:08 GMT server: - openresty strict-transport-security: @@ -455,7 +455,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.25' + - '332.433333' status: code: 200 message: OK @@ -474,7 +474,7 @@ interactions: uri: https://fake_url.azurecr.io/acr/v1/_catalog response: body: - string: '{"repositories":["alpine/git","debian","hello-world","library/hello-world","repo160e197b","repo2e8319c5","repo308e19dd","repo6ce51658","repo9b321760","repob7cc1bf8","repod2be1c42","repoeb7113db","ubuntu"]} + string: '{"repositories":["alpine/git","debian","hello-world","library/hello-world","repo160e197b","repo2e8319c5","repo308e19dd","repo6ce51658","repo9b321760","repo_set160e197b","repob7cc1bf8","repod2be1c42","repoeb7113db","ubuntu"]} ' headers: @@ -486,11 +486,11 @@ interactions: connection: - keep-alive content-length: - - '206' + - '225' content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:08:34 GMT + - Mon, 05 Apr 2021 14:40:08 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 c4c5364d4e79..da3acfd6a611 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: - - Mon, 05 Apr 2021 12:08:35 GMT + - Mon, 05 Apr 2021 14:40:09 GMT docker-distribution-api-version: - registry/2.0 server: @@ -73,7 +73,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:08:36 GMT + - Mon, 05 Apr 2021 14:40:10 GMT server: - openresty strict-transport-security: @@ -81,7 +81,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '331.983333' + - '332.766667' status: code: 200 message: OK @@ -111,7 +111,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:08:36 GMT + - Mon, 05 Apr 2021 14:40:11 GMT server: - openresty strict-transport-security: @@ -119,7 +119,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '331.916667' + - '332.75' status: code: 200 message: OK @@ -157,7 +157,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:08:37 GMT + - Mon, 05 Apr 2021 14:40:11 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 a6d9d03b689d..bbfff8ec2635 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,7 +11,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/repoeb7113db/_tags/to_be_deleted + uri: https://fake_url.azurecr.io/acr/v1/repoeb7113db/_tags/tageb7113db response: body: string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, @@ -31,7 +31,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:20:45 GMT + - Mon, 05 Apr 2021 14:40:30 GMT docker-distribution-api-version: - registry/2.0 server: @@ -71,7 +71,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:20:47 GMT + - Mon, 05 Apr 2021 14:40:31 GMT server: - openresty strict-transport-security: @@ -79,7 +79,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.25' + - '332.916667' status: code: 200 message: OK @@ -109,7 +109,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:20:47 GMT + - Mon, 05 Apr 2021 14:40:31 GMT server: - openresty strict-transport-security: @@ -117,7 +117,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.233333' + - '332.9' 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/repoeb7113db/_tags/to_be_deleted + uri: https://fake_url.azurecr.io/acr/v1/repoeb7113db/_tags/tageb7113db response: body: - string: '{"registry":"fake_url.azurecr.io","imageName":"repoeb7113db","tag":{"name":"to_be_deleted","digest":"sha256:308866a43596e83578c7dfa15e27a73011bdd402185a84c5cd7f32a88b501a24","createdTime":"2021-04-05T12:20:35.6831394Z","lastUpdateTime":"2021-04-05T12:20:35.6831394Z","signed":false,"changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true}}} + string: '{"registry":"fake_url.azurecr.io","imageName":"repoeb7113db","tag":{"name":"tageb7113db","digest":"sha256:308866a43596e83578c7dfa15e27a73011bdd402185a84c5cd7f32a88b501a24","createdTime":"2021-04-05T14:40:20.7298748Z","lastUpdateTime":"2021-04-05T14:40:20.7298748Z","signed":false,"changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true}}} ' headers: @@ -148,11 +148,11 @@ interactions: connection: - keep-alive content-length: - - '388' + - '386' content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:20:47 GMT + - Mon, 05 Apr 2021 14:40:32 GMT docker-distribution-api-version: - registry/2.0 server: @@ -179,7 +179,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/repoeb7113db/_tags/to_be_deleted + uri: https://fake_url.azurecr.io/acr/v1/repoeb7113db/_tags/tageb7113db response: body: string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, @@ -199,7 +199,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:20:47 GMT + - Mon, 05 Apr 2021 14:40:32 GMT docker-distribution-api-version: - registry/2.0 server: @@ -239,7 +239,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:20:48 GMT + - Mon, 05 Apr 2021 14:40:32 GMT server: - openresty strict-transport-security: @@ -247,7 +247,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.216667' + - '332.883333' status: code: 200 message: OK @@ -277,7 +277,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:20:48 GMT + - Mon, 05 Apr 2021 14:40:32 GMT server: - openresty strict-transport-security: @@ -285,7 +285,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.2' + - '332.866667' 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/repoeb7113db/_tags/to_be_deleted + uri: https://fake_url.azurecr.io/acr/v1/repoeb7113db/_tags/tageb7113db response: body: string: '' @@ -318,7 +318,7 @@ interactions: content-length: - '0' date: - - Mon, 05 Apr 2021 12:20:48 GMT + - Mon, 05 Apr 2021 14:40:33 GMT docker-distribution-api-version: - registry/2.0 server: @@ -347,7 +347,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/repoeb7113db/_tags/to_be_deleted + uri: https://fake_url.azurecr.io/acr/v1/repoeb7113db/_tags/tageb7113db response: body: string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, @@ -367,7 +367,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:20:53 GMT + - Mon, 05 Apr 2021 14:40:43 GMT docker-distribution-api-version: - registry/2.0 server: @@ -407,7 +407,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:20:54 GMT + - Mon, 05 Apr 2021 14:40:43 GMT server: - openresty strict-transport-security: @@ -415,7 +415,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.183333' + - '332.833333' status: code: 200 message: OK @@ -445,7 +445,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:20:54 GMT + - Mon, 05 Apr 2021 14:40:43 GMT server: - openresty strict-transport-security: @@ -453,7 +453,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.166667' + - '332.816667' 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/repoeb7113db/_tags/to_be_deleted + uri: https://fake_url.azurecr.io/acr/v1/repoeb7113db/_tags/tageb7113db 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: - - Mon, 05 Apr 2021 12:20:54 GMT + - Mon, 05 Apr 2021 14:40:43 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_does_not_exist.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_delete_tag_does_not_exist.yaml index a33a0885b1ff..c11627cc759f 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_delete_tag_does_not_exist.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_delete_tag_does_not_exist.yaml @@ -33,7 +33,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:20:55 GMT + - Mon, 05 Apr 2021 14:40:44 GMT docker-distribution-api-version: - registry/2.0 server: @@ -73,7 +73,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:20:57 GMT + - Mon, 05 Apr 2021 14:40:46 GMT server: - openresty strict-transport-security: @@ -81,7 +81,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '332.9' + - '332.5' status: code: 200 message: OK @@ -111,7 +111,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:20:57 GMT + - Mon, 05 Apr 2021 14:40:46 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: - - Mon, 05 Apr 2021 12:20:57 GMT + - Mon, 05 Apr 2021 14:40:46 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 new file mode 100644 index 000000000000..92b820121aa9 --- /dev/null +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_get_attributes.yaml @@ -0,0 +1,47 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azure-containerregistry/0.1.0/3.9.0rc1 (tags/v3.9.0rc1:439c93d, + Aug 11 2020, 19:19:43) [MSC v.1924 64 bit (AMD64)] 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-16T15:14:35.1042371Z","lastUpdateTime":"2021-03-16T15:16:49.2531522Z","manifestCount":1,"tagCount":2,"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: + - '289' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 17 Mar 2021 15:00:58 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 45ee1ffe2be8..6290a51c57d1 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: - - Mon, 05 Apr 2021 12:09:00 GMT + - Mon, 05 Apr 2021 14:40:47 GMT docker-distribution-api-version: - registry/2.0 server: @@ -71,7 +71,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:09:02 GMT + - Mon, 05 Apr 2021 14:40:49 GMT server: - openresty strict-transport-security: @@ -79,7 +79,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.033333' + - '333.083333' status: code: 200 message: OK @@ -109,7 +109,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:09:02 GMT + - Mon, 05 Apr 2021 14:40:49 GMT server: - openresty strict-transport-security: @@ -117,7 +117,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '332.833333' + - '333' status: code: 200 message: OK @@ -152,7 +152,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:09:02 GMT + - Mon, 05 Apr 2021 14:40:49 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 af35083e8324..dc1256c4223d 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: - - Mon, 05 Apr 2021 12:09:03 GMT + - Mon, 05 Apr 2021 14:40:50 GMT docker-distribution-api-version: - registry/2.0 server: @@ -71,7 +71,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:09:05 GMT + - Mon, 05 Apr 2021 14:40:51 GMT server: - openresty strict-transport-security: @@ -79,7 +79,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '332.516667' + - '332.666667' status: code: 200 message: OK @@ -109,7 +109,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:09:05 GMT + - Mon, 05 Apr 2021 14:40:52 GMT server: - openresty strict-transport-security: @@ -117,7 +117,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '332.5' + - '332.566667' status: code: 200 message: OK @@ -152,7 +152,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:09:05 GMT + - Mon, 05 Apr 2021 14:40:52 GMT docker-distribution-api-version: - registry/2.0 server: @@ -197,7 +197,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:09:05 GMT + - Mon, 05 Apr 2021 14:40:52 GMT docker-distribution-api-version: - registry/2.0 server: @@ -237,7 +237,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:09:05 GMT + - Mon, 05 Apr 2021 14:40:52 GMT server: - openresty strict-transport-security: @@ -245,7 +245,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '332.483333' + - '332.55' status: code: 200 message: OK @@ -275,7 +275,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:09:06 GMT + - Mon, 05 Apr 2021 14:40:53 GMT server: - openresty strict-transport-security: @@ -283,7 +283,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '332.466667' + - '332.533333' status: code: 200 message: OK @@ -320,7 +320,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:09:06 GMT + - Mon, 05 Apr 2021 14:40:53 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 4241df47f498..e8fa45699966 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: - - Mon, 05 Apr 2021 12:09:06 GMT + - Mon, 05 Apr 2021 14:40:54 GMT docker-distribution-api-version: - registry/2.0 server: @@ -71,7 +71,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:09:08 GMT + - Mon, 05 Apr 2021 14:40:55 GMT server: - openresty strict-transport-security: @@ -79,7 +79,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.283333' + - '332.466667' status: code: 200 message: OK @@ -109,7 +109,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:09:08 GMT + - Mon, 05 Apr 2021 14:40:56 GMT server: - openresty strict-transport-security: @@ -117,7 +117,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '332.833333' + - '332.45' status: code: 200 message: OK @@ -152,7 +152,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:09:08 GMT + - Mon, 05 Apr 2021 14:40:56 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 ed2744cb35f0..66972edd4b6f 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: - - Mon, 05 Apr 2021 17:20:53 GMT + - Mon, 05 Apr 2021 21:51:34 GMT docker-distribution-api-version: - registry/2.0 server: @@ -71,7 +71,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 17:20:55 GMT + - Mon, 05 Apr 2021 21:51:35 GMT server: - openresty strict-transport-security: @@ -79,7 +79,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.316667' + - '333.283333' status: code: 200 message: OK @@ -109,7 +109,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 17:20:55 GMT + - Mon, 05 Apr 2021 21:51:36 GMT server: - openresty strict-transport-security: @@ -117,7 +117,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.3' + - '333.133333' status: code: 200 message: OK @@ -150,7 +150,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 17:20:56 GMT + - Mon, 05 Apr 2021 21:51:36 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_ascending.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_list_registry_artifacts_ascending.yaml index 8e6a01ab6312..12adcbb94701 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_list_registry_artifacts_ascending.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_list_registry_artifacts_ascending.yaml @@ -31,7 +31,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 17:20:56 GMT + - Mon, 05 Apr 2021 21:51:37 GMT docker-distribution-api-version: - registry/2.0 server: @@ -71,7 +71,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 17:20:58 GMT + - Mon, 05 Apr 2021 21:51:38 GMT server: - openresty strict-transport-security: @@ -79,7 +79,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.316667' + - '333.116667' status: code: 200 message: OK @@ -109,7 +109,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 17:20:58 GMT + - Mon, 05 Apr 2021 21:51:38 GMT server: - openresty strict-transport-security: @@ -117,7 +117,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.3' + - '333.1' status: code: 200 message: OK @@ -150,7 +150,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 17:20:58 GMT + - Mon, 05 Apr 2021 21:51:39 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_by_page.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_list_registry_artifacts_by_page.yaml new file mode 100644 index 000000000000..327eca986bbc --- /dev/null +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_list_registry_artifacts_by_page.yaml @@ -0,0 +1,844 @@ +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/_manifests?n=2 + 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: + - Mon, 05 Apr 2021 21:51:40 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: + - Mon, 05 Apr 2021 21:51:41 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%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: + - Mon, 05 Apr 2021 21:51:41 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: 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?n=2 + 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":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"}}]} + + ' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '915' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 05 Apr 2021 21:51:42 GMT + docker-distribution-api-version: + - registry/2.0 + link: + - ; + rel="next" + 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?last=sha256%3A308866a43596e83578c7dfa15e27a73011bdd402185a84c5cd7f32a88b501a24&n=2&orderby= + 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: + - Mon, 05 Apr 2021 21:51:42 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: + - Mon, 05 Apr 2021 21:51:42 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: 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: + - Mon, 05 Apr 2021 21:51:42 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: 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?last=sha256%3A308866a43596e83578c7dfa15e27a73011bdd402185a84c5cd7f32a88b501a24&n=2&orderby= + response: + body: + string: '{"registry":"fake_url.azurecr.io","imageName":"hello-world","manifests":[{"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"}}]} + + ' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '928' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 05 Apr 2021 21:51:42 GMT + docker-distribution-api-version: + - registry/2.0 + link: + - ; + rel="next" + 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?last=sha256%3A88b2e00179bd6c4064612403c8d42a13de7ca809d61fee966ce9e129860a8a90&n=2&orderby= + 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: + - Mon, 05 Apr 2021 21:51:43 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: + - Mon, 05 Apr 2021 21:51:43 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: 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: + - Mon, 05 Apr 2021 21:51:43 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/_manifests?last=sha256%3A88b2e00179bd6c4064612403c8d42a13de7ca809d61fee966ce9e129860a8a90&n=2&orderby= + response: + body: + string: '{"registry":"fake_url.azurecr.io","imageName":"hello-world","manifests":[{"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"}}]} + + ' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '929' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 05 Apr 2021 21:51:43 GMT + docker-distribution-api-version: + - registry/2.0 + link: + - ; + rel="next" + 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?last=sha256%3Ab0408a0f1d74eced127a2658429f336ed8fa48e36d59878f155b19865e5dbd70&n=2&orderby= + 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: + - Mon, 05 Apr 2021 21:51:44 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: + - Mon, 05 Apr 2021 21:51:44 GMT + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + x-ms-ratelimit-remaining-calls-per-second: + - '332.916667' + 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: + - Mon, 05 Apr 2021 21:51:44 GMT + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + x-ms-ratelimit-remaining-calls-per-second: + - '332.9' + 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?last=sha256%3Ab0408a0f1d74eced127a2658429f336ed8fa48e36d59878f155b19865e5dbd70&n=2&orderby= + response: + body: + string: '{"registry":"fake_url.azurecr.io","imageName":"hello-world","manifests":[{"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"}}]} + + ' + headers: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '927' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 05 Apr 2021 21:51:44 GMT + docker-distribution-api-version: + - registry/2.0 + link: + - ; + rel="next" + 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?last=sha256%3Acb55d8f7347376e1ba38ca740904b43c9a52f66c7d2ae1ef1a0de1bc9f40df98&n=2&orderby= + 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: + - Mon, 05 Apr 2021 21:51:45 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: + - Mon, 05 Apr 2021 21:51:45 GMT + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + x-ms-ratelimit-remaining-calls-per-second: + - '333.016667' + 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: + - Mon, 05 Apr 2021 21:51:45 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: 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?last=sha256%3Acb55d8f7347376e1ba38ca740904b43c9a52f66c7d2ae1ef1a0de1bc9f40df98&n=2&orderby= + response: + body: + string: '{"registry":"fake_url.azurecr.io","imageName":"hello-world","manifests":[{"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: + access-control-expose-headers: + - Docker-Content-Digest + - WWW-Authenticate + - Link + - X-Ms-Correlation-Request-Id + connection: + - keep-alive + content-length: + - '925' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 05 Apr 2021 21:51:45 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_list_registry_artifacts_descending.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_list_registry_artifacts_descending.yaml index f5fd2fd5416f..3369a659bdcf 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_list_registry_artifacts_descending.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_list_registry_artifacts_descending.yaml @@ -31,7 +31,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 17:20:59 GMT + - Mon, 05 Apr 2021 21:52:34 GMT docker-distribution-api-version: - registry/2.0 server: @@ -71,7 +71,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 17:21:00 GMT + - Mon, 05 Apr 2021 21:52:36 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: - - Mon, 05 Apr 2021 17:21:01 GMT + - Mon, 05 Apr 2021 21:52:36 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 @@ -150,7 +150,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 17:21:01 GMT + - Mon, 05 Apr 2021 21:52:37 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 d3e020a1f309..9c832064612d 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: - - Mon, 05 Apr 2021 12:09:12 GMT + - Mon, 05 Apr 2021 21:51:46 GMT docker-distribution-api-version: - registry/2.0 server: @@ -71,7 +71,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:09:14 GMT + - Mon, 05 Apr 2021 21:51:47 GMT server: - openresty strict-transport-security: @@ -79,7 +79,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '332.8' + - '333.316667' status: code: 200 message: OK @@ -109,7 +109,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:09:14 GMT + - Mon, 05 Apr 2021 21:51:48 GMT server: - openresty strict-transport-security: @@ -117,7 +117,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '332.783333' + - '333.3' status: code: 200 message: OK @@ -152,7 +152,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 12:09:14 GMT + - Mon, 05 Apr 2021 21:51:48 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_ascending.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_list_tags_ascending.yaml index 59b7cca1b8fb..ac3dfaaf6dce 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_list_tags_ascending.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_list_tags_ascending.yaml @@ -31,7 +31,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 17:11:03 GMT + - Mon, 05 Apr 2021 21:51:48 GMT docker-distribution-api-version: - registry/2.0 server: @@ -71,7 +71,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 17:11:04 GMT + - Mon, 05 Apr 2021 21:51:50 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: - - Mon, 05 Apr 2021 17:11:05 GMT + - Mon, 05 Apr 2021 21:51:50 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: - - Mon, 05 Apr 2021 17:11:05 GMT + - Mon, 05 Apr 2021 21:51:50 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_by_page.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_list_tags_by_page.yaml new file mode 100644 index 000000000000..27209060a2fe --- /dev/null +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_list_tags_by_page.yaml @@ -0,0 +1,168 @@ +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/_tags?n=2 + 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: + - Mon, 05 Apr 2021 21:51:51 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: + - Mon, 05 Apr 2021 21:51:52 GMT + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + x-ms-ratelimit-remaining-calls-per-second: + - '333.283333' + 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: + - Mon, 05 Apr 2021 21:51:52 GMT + server: + - openresty + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + x-ms-ratelimit-remaining-calls-per-second: + - '333.266667' + 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/_tags?n=2 + response: + body: + string: '{"registry":"fake_url.azurecr.io","imageName":"hello-world","tags":[{"name":"latest","digest":"sha256:308866a43596e83578c7dfa15e27a73011bdd402185a84c5cd7f32a88b501a24","createdTime":"2021-03-30T12:18:52.8272444Z","lastUpdateTime":"2021-03-30T12:18:52.8272444Z","signed":false,"quarantineState":"Passed","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: + - '410' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 05 Apr 2021 21:51:52 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_list_tags_descending.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_list_tags_descending.yaml index caa9ec2b698c..618ef8ad6b84 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: - - Mon, 05 Apr 2021 17:11:05 GMT + - Mon, 05 Apr 2021 21:51:53 GMT docker-distribution-api-version: - registry/2.0 server: @@ -71,7 +71,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 17:11:07 GMT + - Mon, 05 Apr 2021 21:51:55 GMT server: - openresty strict-transport-security: @@ -109,7 +109,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 17:11:07 GMT + - Mon, 05 Apr 2021 21:51:55 GMT server: - openresty strict-transport-security: @@ -117,7 +117,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.233333' + - '333.266667' status: code: 200 message: OK @@ -152,7 +152,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 17:11:07 GMT + - Mon, 05 Apr 2021 21:51:55 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 3e6b9ac88600..684bec6c02b7 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: - - Mon, 05 Apr 2021 16:04:02 GMT + - Mon, 05 Apr 2021 17:59:37 GMT docker-distribution-api-version: - registry/2.0 server: @@ -71,7 +71,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 16:04:03 GMT + - Mon, 05 Apr 2021 17:59:38 GMT server: - openresty strict-transport-security: @@ -79,7 +79,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.25' + - '333.283333' status: code: 200 message: OK @@ -109,7 +109,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 16:04:03 GMT + - Mon, 05 Apr 2021 17:59:38 GMT server: - openresty strict-transport-security: @@ -117,7 +117,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.233333' + - '333.266667' status: code: 200 message: OK @@ -136,7 +136,7 @@ interactions: uri: https://fake_url.azurecr.io/acr/v1/repo_set160e197b/_manifests response: body: - string: '{"registry":"fake_url.azurecr.io","imageName":"repo_set160e197b","manifests":[{"digest":"sha256:88b2e00179bd6c4064612403c8d42a13de7ca809d61fee966ce9e129860a8a90","imageSize":0,"createdTime":"2021-04-05T12:31:47.7364945Z","lastUpdateTime":"2021-04-05T12:31:47.7364945Z","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-05T12:31:47.4875043Z","lastUpdateTime":"2021-04-05T12:31:47.4875043Z","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-05T12:31:47.7756455Z","lastUpdateTime":"2021-04-05T12:31:47.7756455Z","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-05T12:31:48.0077255Z","lastUpdateTime":"2021-04-05T12:31:48.0077255Z","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-05T12:31:47.5978659Z","lastUpdateTime":"2021-04-05T12:31:47.5978659Z","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-05T12:31:47.6853878Z","lastUpdateTime":"2021-04-05T12:31:47.6853878Z","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-05T12:31:47.2554292Z","lastUpdateTime":"2021-04-05T12:31:47.2554292Z","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":"repo_set160e197b","manifests":[{"digest":"sha256:963612c5503f3f1674f315c67089dee577d8cc6afc18565e0b4183ae355fb343","imageSize":0,"createdTime":"2021-04-05T12:31:47.4875043Z","lastUpdateTime":"2021-04-05T12:31:47.4875043Z","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-05T12:31:47.7756455Z","lastUpdateTime":"2021-04-05T12:31:47.7756455Z","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-05T12:31:48.0077255Z","lastUpdateTime":"2021-04-05T12:31:48.0077255Z","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-05T12:31:47.5978659Z","lastUpdateTime":"2021-04-05T12:31:47.5978659Z","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-05T12:31:47.6853878Z","lastUpdateTime":"2021-04-05T12:31:47.6853878Z","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-05T12:31:47.2554292Z","lastUpdateTime":"2021-04-05T12:31:47.2554292Z","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: - - Mon, 05 Apr 2021 16:04:04 GMT + - Mon, 05 Apr 2021 17:59:39 GMT docker-distribution-api-version: - registry/2.0 server: @@ -182,7 +182,7 @@ interactions: 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/repo_set160e197b/_manifests/sha256%3A88b2e00179bd6c4064612403c8d42a13de7ca809d61fee966ce9e129860a8a90 + uri: https://fake_url.azurecr.io/acr/v1/repo_set160e197b/_manifests/sha256%3A963612c5503f3f1674f315c67089dee577d8cc6afc18565e0b4183ae355fb343 response: body: string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, @@ -202,7 +202,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 16:04:04 GMT + - Mon, 05 Apr 2021 17:59:39 GMT docker-distribution-api-version: - registry/2.0 server: @@ -242,7 +242,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 16:04:04 GMT + - Mon, 05 Apr 2021 17:59:39 GMT server: - openresty strict-transport-security: @@ -250,7 +250,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.216667' + - '333.25' status: code: 200 message: OK @@ -280,7 +280,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 16:04:04 GMT + - Mon, 05 Apr 2021 17:59:39 GMT server: - openresty strict-transport-security: @@ -288,7 +288,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.2' + - '333.233333' status: code: 200 message: OK @@ -309,12 +309,12 @@ interactions: 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/repo_set160e197b/_manifests/sha256%3A88b2e00179bd6c4064612403c8d42a13de7ca809d61fee966ce9e129860a8a90 + uri: https://fake_url.azurecr.io/acr/v1/repo_set160e197b/_manifests/sha256%3A963612c5503f3f1674f315c67089dee577d8cc6afc18565e0b4183ae355fb343 response: body: - string: '{"registry":"fake_url.azurecr.io","imageName":"repo_set160e197b","manifest":{"digest":"sha256:88b2e00179bd6c4064612403c8d42a13de7ca809d61fee966ce9e129860a8a90","imageSize":0,"createdTime":"2021-04-05T12:31:47.7364945Z","lastUpdateTime":"2021-04-05T12:31:47.7364945Z","architecture":"mips64le","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":false,"writeEnabled":false,"readEnabled":false,"listEnabled":false,"quarantineDetails":"{\"state\":\"Scan - InProgress\",\"link\":\"https://aka.ms/test\",\"scanner\":\"Azure Security - Monitoring-Qualys Scanner\",\"result\":{\"version\":\"4/5/2021 3:51:58 PM\",\"summary\":[{\"severity\":\"High\",\"count\":0},{\"severity\":\"Medium\",\"count\":0},{\"severity\":\"Low\",\"count\":0}]}}","quarantineState":"Passed"}}} + string: '{"registry":"fake_url.azurecr.io","imageName":"repo_set160e197b","manifest":{"digest":"sha256:963612c5503f3f1674f315c67089dee577d8cc6afc18565e0b4183ae355fb343","imageSize":0,"createdTime":"2021-04-05T12:31:47.4875043Z","lastUpdateTime":"2021-04-05T12:31:47.4875043Z","architecture":"arm64","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":false,"writeEnabled":false,"readEnabled":false,"listEnabled":false,"quarantineDetails":"{\"state\":\"Scan + Failed\",\"link\":\"https://aka.ms/test\",\"scanner\":\"Azure Security Monitoring-Qualys + Scanner\",\"result\":{\"version\":\"4/5/2021 4:04:09 PM\",\"summary\":[{\"severity\":\"High\",\"count\":0},{\"severity\":\"Medium\",\"count\":0},{\"severity\":\"Low\",\"count\":0}]}}","quarantineState":"Passed"}}} ' headers: @@ -326,11 +326,11 @@ interactions: connection: - keep-alive content-length: - - '826' + - '819' content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 16:04:05 GMT + - Mon, 05 Apr 2021 17:59:40 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_does_not_exist.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_set_manifest_properties_does_not_exist.yaml index bac7c18c89f4..63dcdb106b46 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_set_manifest_properties_does_not_exist.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_set_manifest_properties_does_not_exist.yaml @@ -35,7 +35,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 16:04:05 GMT + - Mon, 05 Apr 2021 17:59:40 GMT docker-distribution-api-version: - registry/2.0 server: @@ -75,7 +75,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 16:04:07 GMT + - Mon, 05 Apr 2021 17:59:42 GMT server: - openresty strict-transport-security: @@ -113,7 +113,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 16:04:07 GMT + - Mon, 05 Apr 2021 17:59:42 GMT server: - openresty strict-transport-security: @@ -160,7 +160,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 16:04:07 GMT + - Mon, 05 Apr 2021 17:59:42 GMT docker-distribution-api-version: - registry/2.0 server: 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 d1058e335e8c..96c8b63df43d 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: - - Mon, 05 Apr 2021 16:08:21 GMT + - Mon, 05 Apr 2021 17:59:58 GMT docker-distribution-api-version: - registry/2.0 server: @@ -71,7 +71,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 16:08:23 GMT + - Mon, 05 Apr 2021 17:59:59 GMT server: - openresty strict-transport-security: @@ -79,7 +79,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.283333' + - '332.633333' status: code: 200 message: OK @@ -109,7 +109,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 16:08:23 GMT + - Mon, 05 Apr 2021 17:59:59 GMT server: - openresty strict-transport-security: @@ -117,7 +117,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.266667' + - '332.616667' status: code: 200 message: OK @@ -152,7 +152,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 16:08:23 GMT + - Mon, 05 Apr 2021 18:00:00 GMT docker-distribution-api-version: - registry/2.0 server: @@ -202,7 +202,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 16:08:23 GMT + - Mon, 05 Apr 2021 18:00:00 GMT docker-distribution-api-version: - registry/2.0 server: @@ -242,7 +242,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 16:08:24 GMT + - Mon, 05 Apr 2021 18:00:00 GMT server: - openresty strict-transport-security: @@ -250,7 +250,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.25' + - '332.6' status: code: 200 message: OK @@ -280,7 +280,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 16:08:24 GMT + - Mon, 05 Apr 2021 18:00:00 GMT server: - openresty strict-transport-security: @@ -288,7 +288,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.233333' + - '332.583333' status: code: 200 message: OK @@ -328,7 +328,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 16:08:24 GMT + - Mon, 05 Apr 2021 18:00:01 GMT docker-distribution-api-version: - registry/2.0 server: diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_set_tag_properties_does_not_exist.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_set_tag_properties_does_not_exist.yaml index f139ab32fad4..49e730c6e736 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_set_tag_properties_does_not_exist.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client.test_set_tag_properties_does_not_exist.yaml @@ -35,7 +35,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 16:08:24 GMT + - Mon, 05 Apr 2021 18:00:01 GMT docker-distribution-api-version: - registry/2.0 server: @@ -75,7 +75,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 16:08:26 GMT + - Mon, 05 Apr 2021 18:00:02 GMT server: - openresty strict-transport-security: @@ -83,7 +83,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.25' + - '333.266667' status: code: 200 message: OK @@ -113,7 +113,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 16:08:26 GMT + - Mon, 05 Apr 2021 18:00:03 GMT server: - openresty strict-transport-security: @@ -121,7 +121,7 @@ interactions: transfer-encoding: - chunked x-ms-ratelimit-remaining-calls-per-second: - - '333.233333' + - '332.366667' status: code: 200 message: OK @@ -161,7 +161,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 05 Apr 2021 16:08:26 GMT + - Mon, 05 Apr 2021 18:00:03 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 index 5df3670ca707..f4772c7015ba 100644 --- 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 @@ -19,7 +19,7 @@ interactions: connection: keep-alive content-length: '215' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:10:34 GMT + date: Mon, 05 Apr 2021 17:56:34 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: Mon, 05 Apr 2021 12:10:35 GMT + date: Mon, 05 Apr 2021 17:56:35 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '333.3' + x-ms-ratelimit-remaining-calls-per-second: '332.833333' status: code: 200 message: OK @@ -75,11 +75,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:10:35 GMT + date: Mon, 05 Apr 2021 17:56:35 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '333.033333' + x-ms-ratelimit-remaining-calls-per-second: '332.816667' status: code: 200 message: OK @@ -95,14 +95,14 @@ interactions: uri: https://fake_url.azurecr.io/acr/v1/repod2be1c42/_manifests response: body: - string: '{"registry":"fake_url.azurecr.io","imageName":"repod2be1c42","manifests":[{"digest":"sha256:1b26826f602946860c279fce658f31050cff2c596583af237d971f4629b57792","imageSize":0,"createdTime":"2021-04-05T12:10:27.3776431Z","lastUpdateTime":"2021-04-05T12:10:27.3776431Z","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-02T17:57:22.9455252Z","lastUpdateTime":"2021-04-02T17:57:22.9455252Z","mediaType":"application/vnd.docker.distribution.manifest.list.v2+json","tags":["latest"],"changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true}},{"digest":"sha256:50b8560ad574c779908da71f7ce370c0a2471c098d44d1c8f6b513c5a55eeeb1","imageSize":0,"createdTime":"2021-04-02T17:57:24.0973102Z","lastUpdateTime":"2021-04-02T17:57:24.0973102Z","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-02T17:57:26.2228419Z","lastUpdateTime":"2021-04-02T17:57:26.2228419Z","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-02T17:57:24.5058634Z","lastUpdateTime":"2021-04-02T17:57:24.5058634Z","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-02T17:57:25.2021028Z","lastUpdateTime":"2021-04-02T17:57:25.2021028Z","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-02T17:57:24.2369208Z","lastUpdateTime":"2021-04-02T17:57:24.2369208Z","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-02T17:57:25.6885989Z","lastUpdateTime":"2021-04-02T17:57:25.6885989Z","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-02T17:57:23.9666468Z","lastUpdateTime":"2021-04-02T17:57:23.9666468Z","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-02T17:57:25.1100057Z","lastUpdateTime":"2021-04-02T17:57:25.1100057Z","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":"repod2be1c42","manifests":[{"digest":"sha256:1b26826f602946860c279fce658f31050cff2c596583af237d971f4629b57792","imageSize":0,"createdTime":"2021-04-05T17:56:14.9735035Z","lastUpdateTime":"2021-04-05T17:56:14.9735035Z","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-02T17:57:22.9455252Z","lastUpdateTime":"2021-04-02T17:57:22.9455252Z","mediaType":"application/vnd.docker.distribution.manifest.list.v2+json","tags":["latest"],"changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true}},{"digest":"sha256:50b8560ad574c779908da71f7ce370c0a2471c098d44d1c8f6b513c5a55eeeb1","imageSize":0,"createdTime":"2021-04-02T17:57:24.0973102Z","lastUpdateTime":"2021-04-02T17:57:24.0973102Z","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-02T17:57:26.2228419Z","lastUpdateTime":"2021-04-02T17:57:26.2228419Z","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-02T17:57:24.5058634Z","lastUpdateTime":"2021-04-02T17:57:24.5058634Z","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-02T17:57:25.2021028Z","lastUpdateTime":"2021-04-02T17:57:25.2021028Z","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-02T17:57:24.2369208Z","lastUpdateTime":"2021-04-02T17:57:24.2369208Z","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-02T17:57:25.6885989Z","lastUpdateTime":"2021-04-02T17:57:25.6885989Z","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-02T17:57:23.9666468Z","lastUpdateTime":"2021-04-02T17:57:23.9666468Z","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-02T17:57:25.1100057Z","lastUpdateTime":"2021-04-02T17:57:25.1100057Z","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: Mon, 05 Apr 2021 12:10:35 GMT + date: Mon, 05 Apr 2021 17:56:36 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: '208' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:10:36 GMT + date: Mon, 05 Apr 2021 17:56:36 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: Mon, 05 Apr 2021 12:10:36 GMT + date: Mon, 05 Apr 2021 17:56:36 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.8' status: code: 200 message: OK @@ -188,11 +188,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:10:36 GMT + date: Mon, 05 Apr 2021 17:56:36 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '333' + x-ms-ratelimit-remaining-calls-per-second: '332.783333' status: code: 200 message: OK @@ -213,7 +213,7 @@ interactions: access-control-expose-headers: X-Ms-Correlation-Request-Id connection: keep-alive content-length: '0' - date: Mon, 05 Apr 2021 12:10:36 GMT + date: Mon, 05 Apr 2021 17:56:36 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains @@ -243,7 +243,7 @@ interactions: connection: keep-alive content-length: '215' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:10:37 GMT + date: Mon, 05 Apr 2021 17:56:37 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains @@ -271,11 +271,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:10:37 GMT + date: Mon, 05 Apr 2021 17:56:37 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '332.983333' + x-ms-ratelimit-remaining-calls-per-second: '332.766667' status: code: 200 message: OK @@ -299,11 +299,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:10:37 GMT + date: Mon, 05 Apr 2021 17:56:37 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.75' status: code: 200 message: OK @@ -326,7 +326,7 @@ interactions: access-control-expose-headers: X-Ms-Correlation-Request-Id connection: keep-alive content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:10:38 GMT + date: Mon, 05 Apr 2021 17:56:37 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.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_delete_repository.yaml index 028aabd65557..e0822bc5a902 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: Mon, 05 Apr 2021 12:10:56 GMT + date: Mon, 05 Apr 2021 17:56:53 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: Mon, 05 Apr 2021 12:10:57 GMT + date: Mon, 05 Apr 2021 17:56:54 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: '333.316667' status: code: 200 message: OK @@ -75,11 +75,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:10:57 GMT + date: Mon, 05 Apr 2021 17:56:54 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '332.4' + x-ms-ratelimit-remaining-calls-per-second: '333.3' status: code: 200 message: OK @@ -95,15 +95,15 @@ interactions: uri: https://fake_url.azurecr.io/acr/v1/_catalog response: body: - string: '{"repositories":["alpine/git","debian","hello-world","library/hello-world","repo160e197b","repo2e8319c5","repo308e19dd","repo6ce51658","repo9b321760","repob7cc1bf8","repod2be1c42","repoeb7113db","to_be_deleted","ubuntu"]} + string: '{"repositories":["alpine/git","debian","hello-world","library/hello-world","repo160e197b","repo2e8319c5","repo308e19dd","repo6ce51658","repo9b321760","repo_set160e197b","repo_set_manib7cc1bf8","repob7cc1bf8","repod2be1c42","repoeb7113db","to_be_deleted","ubuntu"]} ' headers: access-control-expose-headers: X-Ms-Correlation-Request-Id connection: keep-alive - content-length: '222' + content-length: '265' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:10:57 GMT + date: Mon, 05 Apr 2021 17:56:55 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: Mon, 05 Apr 2021 12:10:58 GMT + date: Mon, 05 Apr 2021 17:56:55 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: Mon, 05 Apr 2021 12:10:59 GMT + date: Mon, 05 Apr 2021 17:56:56 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '332.533333' + x-ms-ratelimit-remaining-calls-per-second: '332.733333' status: code: 200 message: OK @@ -188,11 +188,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:10:59 GMT + date: Mon, 05 Apr 2021 17:56:56 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '332.516667' + x-ms-ratelimit-remaining-calls-per-second: '332.716667' status: code: 200 message: OK @@ -216,7 +216,7 @@ interactions: connection: keep-alive content-length: '788' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:11:02 GMT + date: Mon, 05 Apr 2021 17:56:58 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: Mon, 05 Apr 2021 12:11:07 GMT + date: Mon, 05 Apr 2021 17:57:04 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: Mon, 05 Apr 2021 12:11:07 GMT + date: Mon, 05 Apr 2021 17:57:04 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '332.65' + x-ms-ratelimit-remaining-calls-per-second: '333.266667' status: code: 200 message: OK @@ -302,11 +302,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:11:07 GMT + date: Mon, 05 Apr 2021 17:57:04 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '332.383333' + x-ms-ratelimit-remaining-calls-per-second: '333.033333' status: code: 200 message: OK @@ -322,15 +322,15 @@ interactions: uri: https://fake_url.azurecr.io/acr/v1/_catalog response: body: - string: '{"repositories":["alpine/git","debian","hello-world","library/hello-world","repo160e197b","repo2e8319c5","repo308e19dd","repo6ce51658","repo9b321760","repob7cc1bf8","repod2be1c42","repoeb7113db","ubuntu"]} + string: '{"repositories":["alpine/git","debian","hello-world","library/hello-world","repo160e197b","repo2e8319c5","repo308e19dd","repo6ce51658","repo9b321760","repo_set160e197b","repo_set_manib7cc1bf8","repob7cc1bf8","repod2be1c42","repoeb7113db","ubuntu"]} ' headers: access-control-expose-headers: X-Ms-Correlation-Request-Id connection: keep-alive - content-length: '206' + content-length: '249' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:11:07 GMT + date: Mon, 05 Apr 2021 17:57:04 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 e956a5d28be0..cac096d15a06 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: Mon, 05 Apr 2021 12:11:08 GMT + date: Mon, 05 Apr 2021 17:57: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: Mon, 05 Apr 2021 12:11:09 GMT + date: Mon, 05 Apr 2021 17:57:06 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.183333' status: code: 200 message: OK @@ -75,11 +75,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:11:09 GMT + date: Mon, 05 Apr 2021 17:57:06 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '332.316667' + x-ms-ratelimit-remaining-calls-per-second: '332.166667' status: code: 200 message: OK @@ -104,7 +104,7 @@ interactions: connection: keep-alive content-length: '122' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:11:09 GMT + date: Mon, 05 Apr 2021 17:57: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_async.test_delete_tag.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_delete_tag.yaml index 7a68a6cbfaf5..cca726a90bb2 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 @@ -19,7 +19,7 @@ interactions: connection: keep-alive content-length: '215' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:11:27 GMT + date: Mon, 05 Apr 2021 17:57:21 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains @@ -47,7 +47,7 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:11:28 GMT + date: Mon, 05 Apr 2021 17:57:22 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked @@ -75,11 +75,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:11:28 GMT + date: Mon, 05 Apr 2021 17:57:22 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '332.35' + x-ms-ratelimit-remaining-calls-per-second: '332.4' status: code: 200 message: OK @@ -95,7 +95,7 @@ interactions: uri: https://fake_url.azurecr.io/acr/v1/repo6ce51658/_tags/to_be_deleted response: body: - string: '{"registry":"fake_url.azurecr.io","imageName":"repo6ce51658","tag":{"name":"to_be_deleted","digest":"sha256:308866a43596e83578c7dfa15e27a73011bdd402185a84c5cd7f32a88b501a24","createdTime":"2021-04-05T12:11:19.1192239Z","lastUpdateTime":"2021-04-05T12:11:19.1192239Z","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-05T17:57:12.6894864Z","lastUpdateTime":"2021-04-05T17:57:12.6894864Z","signed":false,"changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true}}} ' headers: @@ -103,7 +103,7 @@ interactions: connection: keep-alive content-length: '388' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:11:28 GMT + date: Mon, 05 Apr 2021 17:57:22 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: '208' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:11:28 GMT + date: Mon, 05 Apr 2021 17:57:22 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: Mon, 05 Apr 2021 12:11:29 GMT + date: Mon, 05 Apr 2021 17:57:23 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '332.333333' + x-ms-ratelimit-remaining-calls-per-second: '332.383333' status: code: 200 message: OK @@ -188,11 +188,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:11:29 GMT + date: Mon, 05 Apr 2021 17:57:23 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '332.316667' + x-ms-ratelimit-remaining-calls-per-second: '332.366667' status: code: 200 message: OK @@ -213,7 +213,7 @@ interactions: access-control-expose-headers: X-Ms-Correlation-Request-Id connection: keep-alive content-length: '0' - date: Mon, 05 Apr 2021 12:11:29 GMT + date: Mon, 05 Apr 2021 17:57:23 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains @@ -244,7 +244,7 @@ interactions: connection: keep-alive content-length: '215' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:11:34 GMT + date: Mon, 05 Apr 2021 17:57:28 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains @@ -272,11 +272,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:11:35 GMT + date: Mon, 05 Apr 2021 17:57:28 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '332.666667' + x-ms-ratelimit-remaining-calls-per-second: '332.316667' status: code: 200 message: OK @@ -300,11 +300,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:11:35 GMT + date: Mon, 05 Apr 2021 17:57:29 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '332.65' + x-ms-ratelimit-remaining-calls-per-second: '332.3' status: code: 200 message: OK @@ -329,7 +329,7 @@ interactions: connection: keep-alive content-length: '81' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:11:35 GMT + date: Mon, 05 Apr 2021 17:57:29 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_does_not_exist.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_delete_tag_does_not_exist.yaml index 7a51d07f6384..b5b7842de20e 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_delete_tag_does_not_exist.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_delete_tag_does_not_exist.yaml @@ -19,7 +19,7 @@ interactions: connection: keep-alive content-length: '207' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:11:35 GMT + date: Mon, 05 Apr 2021 17:57:29 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: Mon, 05 Apr 2021 12:11:36 GMT + date: Mon, 05 Apr 2021 17:57:30 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '333.2' + x-ms-ratelimit-remaining-calls-per-second: '333.066667' status: code: 200 message: OK @@ -75,11 +75,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:11:37 GMT + date: Mon, 05 Apr 2021 17:57:30 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.833333' status: code: 200 message: OK @@ -104,7 +104,7 @@ interactions: connection: keep-alive content-length: '81' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 12:11:37 GMT + date: Mon, 05 Apr 2021 17:57:30 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_list_registry_artifacts.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_list_registry_artifacts.yaml index 025285c079ff..7935564d6712 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_list_registry_artifacts.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_list_registry_artifacts.yaml @@ -19,7 +19,7 @@ interactions: connection: keep-alive content-length: '214' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 17:21:02 GMT + date: Mon, 05 Apr 2021 21:50:51 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: Mon, 05 Apr 2021 17:21:03 GMT + date: Mon, 05 Apr 2021 21:50:52 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '333.283333' + 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: Mon, 05 Apr 2021 17:21:03 GMT + date: Mon, 05 Apr 2021 21:50:52 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '333.233333' + x-ms-ratelimit-remaining-calls-per-second: '333.3' status: code: 200 message: OK @@ -102,7 +102,7 @@ interactions: access-control-expose-headers: X-Ms-Correlation-Request-Id connection: keep-alive content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 17:21:04 GMT + date: Mon, 05 Apr 2021 21:50:53 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_list_registry_artifacts_ascending.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_list_registry_artifacts_ascending.yaml index 095222cdcfe6..a5716f0ae6bd 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_list_registry_artifacts_ascending.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_list_registry_artifacts_ascending.yaml @@ -19,7 +19,7 @@ interactions: connection: keep-alive content-length: '214' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 17:21:04 GMT + date: Mon, 05 Apr 2021 21:50:53 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: Mon, 05 Apr 2021 17:21:05 GMT + date: Mon, 05 Apr 2021 21:50:55 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '333.25' + 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: Mon, 05 Apr 2021 17:21:05 GMT + date: Mon, 05 Apr 2021 21:50:55 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '333.233333' + x-ms-ratelimit-remaining-calls-per-second: '333.3' status: code: 200 message: OK @@ -102,7 +102,7 @@ interactions: access-control-expose-headers: X-Ms-Correlation-Request-Id connection: keep-alive content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 17:21:06 GMT + date: Mon, 05 Apr 2021 21:50:56 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_list_registry_artifacts_by_page.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_list_registry_artifacts_by_page.yaml new file mode 100644 index 000000000000..445bf53a277c --- /dev/null +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_list_registry_artifacts_by_page.yaml @@ -0,0 +1,575 @@ +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/hello-world/_manifests?n=2 + 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: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '214' + content-type: application/json; charset=utf-8 + date: Mon, 05 Apr 2021 21:50:57 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/hello-world/_manifests?n=2 +- 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: Mon, 05 Apr 2021 21:50:57 GMT + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + x-ms-ratelimit-remaining-calls-per-second: '333.316667' + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/oauth2/exchange +- request: + body: + grant_type: refresh_token + refresh_token: REDACTED + scope: repository:hello-world: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: Mon, 05 Apr 2021 21:50:58 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 + 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/hello-world/_manifests?n=2 + 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":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"}}]} + + ' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '915' + content-type: application/json; charset=utf-8 + date: Mon, 05 Apr 2021 21:50:58 GMT + docker-distribution-api-version: registry/2.0 + link: ; + rel="next" + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/acr/v1/hello-world/_manifests?n=2 +- 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/hello-world/_manifests?last=sha256:308866a43596e83578c7dfa15e27a73011bdd402185a84c5cd7f32a88b501a24&n=2&orderby= + 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: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '214' + content-type: application/json; charset=utf-8 + date: Mon, 05 Apr 2021 21:50:58 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/hello-world/_manifests?last=sha256:308866a43596e83578c7dfa15e27a73011bdd402185a84c5cd7f32a88b501a24&n=2&orderby= +- 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: Mon, 05 Apr 2021 21:50:58 GMT + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + x-ms-ratelimit-remaining-calls-per-second: '333.283333' + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/oauth2/exchange +- request: + body: + grant_type: refresh_token + refresh_token: REDACTED + scope: repository:hello-world: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: Mon, 05 Apr 2021 21:50:58 GMT + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + x-ms-ratelimit-remaining-calls-per-second: '333.266667' + 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/hello-world/_manifests?last=sha256:308866a43596e83578c7dfa15e27a73011bdd402185a84c5cd7f32a88b501a24&n=2&orderby= + response: + body: + string: '{"registry":"fake_url.azurecr.io","imageName":"hello-world","manifests":[{"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"}}]} + + ' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '928' + content-type: application/json; charset=utf-8 + date: Mon, 05 Apr 2021 21:50:59 GMT + docker-distribution-api-version: registry/2.0 + link: ; + rel="next" + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/acr/v1/hello-world/_manifests?last=sha256:308866a43596e83578c7dfa15e27a73011bdd402185a84c5cd7f32a88b501a24&n=2&orderby= +- 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/hello-world/_manifests?last=sha256:88b2e00179bd6c4064612403c8d42a13de7ca809d61fee966ce9e129860a8a90&n=2&orderby= + 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: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '214' + content-type: application/json; charset=utf-8 + date: Mon, 05 Apr 2021 21:50:59 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/hello-world/_manifests?last=sha256:88b2e00179bd6c4064612403c8d42a13de7ca809d61fee966ce9e129860a8a90&n=2&orderby= +- 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: Mon, 05 Apr 2021 21:50:59 GMT + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + x-ms-ratelimit-remaining-calls-per-second: '333.25' + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/oauth2/exchange +- request: + body: + grant_type: refresh_token + refresh_token: REDACTED + scope: repository:hello-world: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: Mon, 05 Apr 2021 21:50:59 GMT + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + x-ms-ratelimit-remaining-calls-per-second: '333.233333' + 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/hello-world/_manifests?last=sha256:88b2e00179bd6c4064612403c8d42a13de7ca809d61fee966ce9e129860a8a90&n=2&orderby= + response: + body: + string: '{"registry":"fake_url.azurecr.io","imageName":"hello-world","manifests":[{"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"}}]} + + ' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '929' + content-type: application/json; charset=utf-8 + date: Mon, 05 Apr 2021 21:51:00 GMT + docker-distribution-api-version: registry/2.0 + link: ; + rel="next" + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/acr/v1/hello-world/_manifests?last=sha256:88b2e00179bd6c4064612403c8d42a13de7ca809d61fee966ce9e129860a8a90&n=2&orderby= +- 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/hello-world/_manifests?last=sha256:b0408a0f1d74eced127a2658429f336ed8fa48e36d59878f155b19865e5dbd70&n=2&orderby= + 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: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '214' + content-type: application/json; charset=utf-8 + date: Mon, 05 Apr 2021 21:51:00 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/hello-world/_manifests?last=sha256:b0408a0f1d74eced127a2658429f336ed8fa48e36d59878f155b19865e5dbd70&n=2&orderby= +- 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: Mon, 05 Apr 2021 21:51:00 GMT + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + x-ms-ratelimit-remaining-calls-per-second: '333.216667' + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/oauth2/exchange +- request: + body: + grant_type: refresh_token + refresh_token: REDACTED + scope: repository:hello-world: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: Mon, 05 Apr 2021 21:51:00 GMT + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + x-ms-ratelimit-remaining-calls-per-second: '333.2' + 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/hello-world/_manifests?last=sha256:b0408a0f1d74eced127a2658429f336ed8fa48e36d59878f155b19865e5dbd70&n=2&orderby= + response: + body: + string: '{"registry":"fake_url.azurecr.io","imageName":"hello-world","manifests":[{"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"}}]} + + ' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '927' + content-type: application/json; charset=utf-8 + date: Mon, 05 Apr 2021 21:51:00 GMT + docker-distribution-api-version: registry/2.0 + link: ; + rel="next" + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/acr/v1/hello-world/_manifests?last=sha256:b0408a0f1d74eced127a2658429f336ed8fa48e36d59878f155b19865e5dbd70&n=2&orderby= +- 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/hello-world/_manifests?last=sha256:cb55d8f7347376e1ba38ca740904b43c9a52f66c7d2ae1ef1a0de1bc9f40df98&n=2&orderby= + 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: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '214' + content-type: application/json; charset=utf-8 + date: Mon, 05 Apr 2021 21:51:01 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/hello-world/_manifests?last=sha256:cb55d8f7347376e1ba38ca740904b43c9a52f66c7d2ae1ef1a0de1bc9f40df98&n=2&orderby= +- 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: Mon, 05 Apr 2021 21:51:01 GMT + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + x-ms-ratelimit-remaining-calls-per-second: '333.183333' + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/oauth2/exchange +- request: + body: + grant_type: refresh_token + refresh_token: REDACTED + scope: repository:hello-world: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: Mon, 05 Apr 2021 21:51:01 GMT + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + x-ms-ratelimit-remaining-calls-per-second: '333.166667' + 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/hello-world/_manifests?last=sha256:cb55d8f7347376e1ba38ca740904b43c9a52f66c7d2ae1ef1a0de1bc9f40df98&n=2&orderby= + response: + body: + string: '{"registry":"fake_url.azurecr.io","imageName":"hello-world","manifests":[{"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: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '925' + content-type: application/json; charset=utf-8 + date: Mon, 05 Apr 2021 21:51:01 GMT + docker-distribution-api-version: registry/2.0 + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/acr/v1/hello-world/_manifests?last=sha256:cb55d8f7347376e1ba38ca740904b43c9a52f66c7d2ae1ef1a0de1bc9f40df98&n=2&orderby= +version: 1 diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_list_registry_artifacts_descending.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_list_registry_artifacts_descending.yaml index f080b48ce907..fd3b312530cb 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_list_registry_artifacts_descending.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_list_registry_artifacts_descending.yaml @@ -19,7 +19,7 @@ interactions: connection: keep-alive content-length: '214' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 17:21:06 GMT + date: Mon, 05 Apr 2021 21:52:37 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: Mon, 05 Apr 2021 17:21:07 GMT + date: Mon, 05 Apr 2021 21:52:38 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '333.216667' + 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: Mon, 05 Apr 2021 17:21:07 GMT + date: Mon, 05 Apr 2021 21:52:38 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '333.2' + x-ms-ratelimit-remaining-calls-per-second: '333.3' status: code: 200 message: OK @@ -102,7 +102,7 @@ interactions: access-control-expose-headers: X-Ms-Correlation-Request-Id connection: keep-alive content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 17:21:08 GMT + date: Mon, 05 Apr 2021 21:52:39 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_list_tags.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_list_tags.yaml new file mode 100644 index 000000000000..65c354562597 --- /dev/null +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_list_tags.yaml @@ -0,0 +1,115 @@ +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/hello-world/_tags + 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: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '214' + content-type: application/json; charset=utf-8 + date: Mon, 05 Apr 2021 21:51:04 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/hello-world/_tags +- 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: Mon, 05 Apr 2021 21:51:05 GMT + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + x-ms-ratelimit-remaining-calls-per-second: '333.15' + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/oauth2/exchange +- request: + body: + grant_type: refresh_token + refresh_token: REDACTED + scope: repository:hello-world: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: Mon, 05 Apr 2021 21:51:05 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 + 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/hello-world/_tags + response: + body: + string: '{"registry":"fake_url.azurecr.io","imageName":"hello-world","tags":[{"name":"latest","digest":"sha256:308866a43596e83578c7dfa15e27a73011bdd402185a84c5cd7f32a88b501a24","createdTime":"2021-03-30T12:18:52.8272444Z","lastUpdateTime":"2021-03-30T12:18:52.8272444Z","signed":false,"quarantineState":"Passed","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true}}]} + + ' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '410' + content-type: application/json; charset=utf-8 + date: Mon, 05 Apr 2021 21:51:05 GMT + docker-distribution-api-version: registry/2.0 + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/acr/v1/hello-world/_tags +version: 1 diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_list_tags_ascending.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_list_tags_ascending.yaml index 513422256332..b57f29df7ec1 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_list_tags_ascending.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_list_tags_ascending.yaml @@ -19,7 +19,7 @@ interactions: connection: keep-alive content-length: '214' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 17:11:07 GMT + date: Mon, 05 Apr 2021 21:51:06 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: Mon, 05 Apr 2021 17:11:08 GMT + date: Mon, 05 Apr 2021 21:51:07 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '333.316667' + x-ms-ratelimit-remaining-calls-per-second: '333.283333' status: code: 200 message: OK @@ -75,11 +75,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 17:11:09 GMT + date: Mon, 05 Apr 2021 21:51:07 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '333.3' + x-ms-ratelimit-remaining-calls-per-second: '333.166667' status: code: 200 message: OK @@ -103,7 +103,7 @@ interactions: connection: keep-alive content-length: '410' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 17:11:09 GMT + date: Mon, 05 Apr 2021 21:51:07 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_list_tags_by_page.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_list_tags_by_page.yaml new file mode 100644 index 000000000000..878ce33b2b43 --- /dev/null +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_list_tags_by_page.yaml @@ -0,0 +1,115 @@ +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/hello-world/_tags?n=2 + 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: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '214' + content-type: application/json; charset=utf-8 + date: Mon, 05 Apr 2021 21:51:08 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/hello-world/_tags?n=2 +- 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: Mon, 05 Apr 2021 21:51:08 GMT + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + x-ms-ratelimit-remaining-calls-per-second: '333.316667' + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/oauth2/exchange +- request: + body: + grant_type: refresh_token + refresh_token: REDACTED + scope: repository:hello-world: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: Mon, 05 Apr 2021 21:51:09 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 + 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/hello-world/_tags?n=2 + response: + body: + string: '{"registry":"fake_url.azurecr.io","imageName":"hello-world","tags":[{"name":"latest","digest":"sha256:308866a43596e83578c7dfa15e27a73011bdd402185a84c5cd7f32a88b501a24","createdTime":"2021-03-30T12:18:52.8272444Z","lastUpdateTime":"2021-03-30T12:18:52.8272444Z","signed":false,"quarantineState":"Passed","changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true}}]} + + ' + headers: + access-control-expose-headers: X-Ms-Correlation-Request-Id + connection: keep-alive + content-length: '410' + content-type: application/json; charset=utf-8 + date: Mon, 05 Apr 2021 21:51:09 GMT + docker-distribution-api-version: registry/2.0 + server: openresty + strict-transport-security: max-age=31536000; includeSubDomains + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://seankane.azurecr.io/acr/v1/hello-world/_tags?n=2 +version: 1 diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_list_tags_descending.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_list_tags_descending.yaml index d354893a3be6..c55819a7c382 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_list_tags_descending.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_list_tags_descending.yaml @@ -19,7 +19,7 @@ interactions: connection: keep-alive content-length: '214' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 17:11:09 GMT + date: Mon, 05 Apr 2021 21:51:09 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: Mon, 05 Apr 2021 17:11:10 GMT + date: Mon, 05 Apr 2021 21:51:10 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '333.216667' + x-ms-ratelimit-remaining-calls-per-second: '333.15' status: code: 200 message: OK @@ -75,11 +75,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 17:11:10 GMT + date: Mon, 05 Apr 2021 21:51:10 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '333.2' + x-ms-ratelimit-remaining-calls-per-second: '333.133333' status: code: 200 message: OK @@ -103,7 +103,7 @@ interactions: connection: keep-alive content-length: '410' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 17:11:10 GMT + date: Mon, 05 Apr 2021 21:51:10 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_set_manifest_properties.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_set_manifest_properties.yaml index 2561bcfeb77b..25e522706b29 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_set_manifest_properties.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_set_manifest_properties.yaml @@ -19,7 +19,7 @@ interactions: connection: keep-alive content-length: '224' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 16:04:22 GMT + date: Mon, 05 Apr 2021 17:57:58 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: Mon, 05 Apr 2021 16:04:23 GMT + date: Mon, 05 Apr 2021 17:57:59 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.216667' status: code: 200 message: OK @@ -75,11 +75,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 16:04:23 GMT + date: Mon, 05 Apr 2021 17:58:00 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '333' + x-ms-ratelimit-remaining-calls-per-second: '332.666667' status: code: 200 message: OK @@ -95,14 +95,14 @@ interactions: uri: https://fake_url.azurecr.io/acr/v1/repo_set_manib7cc1bf8/_manifests response: body: - string: '{"registry":"fake_url.azurecr.io","imageName":"repo_set_manib7cc1bf8","manifests":[{"digest":"sha256:1b26826f602946860c279fce658f31050cff2c596583af237d971f4629b57792","imageSize":0,"createdTime":"2021-04-05T16:04:13.9896414Z","lastUpdateTime":"2021-04-05T16:04:13.9896414Z","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-05T16:04:13.7605754Z","lastUpdateTime":"2021-04-05T16:04:13.7605754Z","mediaType":"application/vnd.docker.distribution.manifest.list.v2+json","tags":["tagb7cc1bf8"],"changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true}},{"digest":"sha256:50b8560ad574c779908da71f7ce370c0a2471c098d44d1c8f6b513c5a55eeeb1","imageSize":0,"createdTime":"2021-04-05T16:04:14.6424319Z","lastUpdateTime":"2021-04-05T16:04:14.6424319Z","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-05T16:04:16.0206773Z","lastUpdateTime":"2021-04-05T16:04:16.0206773Z","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-05T16:04:15.0622895Z","lastUpdateTime":"2021-04-05T16:04:15.0622895Z","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-05T16:04:14.9215416Z","lastUpdateTime":"2021-04-05T16:04:14.9215416Z","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-05T16:04:15.1287374Z","lastUpdateTime":"2021-04-05T16:04:15.1287374Z","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-05T16:04:14.5703775Z","lastUpdateTime":"2021-04-05T16:04:14.5703775Z","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-05T16:04:14.7170816Z","lastUpdateTime":"2021-04-05T16:04:14.7170816Z","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-05T16:04:14.8097552Z","lastUpdateTime":"2021-04-05T16:04:14.8097552Z","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":"repo_set_manib7cc1bf8","manifests":[{"digest":"sha256:308866a43596e83578c7dfa15e27a73011bdd402185a84c5cd7f32a88b501a24","imageSize":0,"createdTime":"2021-04-05T16:04:13.7605754Z","lastUpdateTime":"2021-04-05T16:04:13.7605754Z","mediaType":"application/vnd.docker.distribution.manifest.list.v2+json","tags":["tagb7cc1bf8"],"changeableAttributes":{"deleteEnabled":true,"writeEnabled":true,"readEnabled":true,"listEnabled":true}},{"digest":"sha256:50b8560ad574c779908da71f7ce370c0a2471c098d44d1c8f6b513c5a55eeeb1","imageSize":0,"createdTime":"2021-04-05T16:04:14.6424319Z","lastUpdateTime":"2021-04-05T16:04:14.6424319Z","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-05T16:04:16.0206773Z","lastUpdateTime":"2021-04-05T16:04:16.0206773Z","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-05T16:04:15.0622895Z","lastUpdateTime":"2021-04-05T16:04:15.0622895Z","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-05T16:04:14.9215416Z","lastUpdateTime":"2021-04-05T16:04:14.9215416Z","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-05T16:04:15.1287374Z","lastUpdateTime":"2021-04-05T16:04:15.1287374Z","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-05T16:04:14.5703775Z","lastUpdateTime":"2021-04-05T16:04:14.5703775Z","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-05T16:04:14.7170816Z","lastUpdateTime":"2021-04-05T16:04:14.7170816Z","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-05T16:04:14.8097552Z","lastUpdateTime":"2021-04-05T16:04:14.8097552Z","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: Mon, 05 Apr 2021 16:04:24 GMT + date: Mon, 05 Apr 2021 17:58:00 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains @@ -125,7 +125,7 @@ interactions: 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/repo_set_manib7cc1bf8/_manifests/sha256:1b26826f602946860c279fce658f31050cff2c596583af237d971f4629b57792 + uri: https://fake_url.azurecr.io/acr/v1/repo_set_manib7cc1bf8/_manifests/sha256:308866a43596e83578c7dfa15e27a73011bdd402185a84c5cd7f32a88b501a24 response: body: string: '{"errors":[{"code":"UNAUTHORIZED","message":"authentication required, @@ -137,7 +137,7 @@ interactions: connection: keep-alive content-length: '225' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 16:04:24 GMT + date: Mon, 05 Apr 2021 17:58:00 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains @@ -146,7 +146,7 @@ interactions: status: code: 401 message: Unauthorized - url: https://seankane.azurecr.io/acr/v1/repo_set_manib7cc1bf8/_manifests/sha256:1b26826f602946860c279fce658f31050cff2c596583af237d971f4629b57792 + url: https://seankane.azurecr.io/acr/v1/repo_set_manib7cc1bf8/_manifests/sha256:308866a43596e83578c7dfa15e27a73011bdd402185a84c5cd7f32a88b501a24 - request: body: access_token: REDACTED @@ -165,11 +165,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 16:04:24 GMT + date: Mon, 05 Apr 2021 17:58:00 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '332.983333' + x-ms-ratelimit-remaining-calls-per-second: '332.65' status: code: 200 message: OK @@ -193,11 +193,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 16:04:25 GMT + date: Mon, 05 Apr 2021 17:58:00 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.633333' status: code: 200 message: OK @@ -215,20 +215,18 @@ interactions: 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/repo_set_manib7cc1bf8/_manifests/sha256:1b26826f602946860c279fce658f31050cff2c596583af237d971f4629b57792 + uri: https://fake_url.azurecr.io/acr/v1/repo_set_manib7cc1bf8/_manifests/sha256:308866a43596e83578c7dfa15e27a73011bdd402185a84c5cd7f32a88b501a24 response: body: - string: '{"registry":"fake_url.azurecr.io","imageName":"repo_set_manib7cc1bf8","manifest":{"digest":"sha256:1b26826f602946860c279fce658f31050cff2c596583af237d971f4629b57792","imageSize":0,"createdTime":"2021-04-05T16:04:13.9896414Z","lastUpdateTime":"2021-04-05T16:04:13.9896414Z","architecture":"amd64","os":"linux","mediaType":"application/vnd.docker.distribution.manifest.v2+json","changeableAttributes":{"deleteEnabled":false,"writeEnabled":false,"readEnabled":false,"listEnabled":false,"quarantineDetails":"{\"state\":\"Scan - Passed\",\"link\":\"https://aka.ms/test\",\"scanner\":\"Azure Security Monitoring-Qualys - Scanner\",\"result\":{\"version\":\"2021-04-02T20:09:40.8950004Z\",\"summary\":[{\"severity\":\"High\",\"count\":3},{\"severity\":\"Medium\",\"count\":8},{\"severity\":\"Low\",\"count\":0}]}}","quarantineState":"Passed"}}} + string: '{"registry":"fake_url.azurecr.io","imageName":"repo_set_manib7cc1bf8","manifest":{"digest":"sha256:308866a43596e83578c7dfa15e27a73011bdd402185a84c5cd7f32a88b501a24","imageSize":0,"createdTime":"2021-04-05T16:04:13.7605754Z","lastUpdateTime":"2021-04-05T16:04:13.7605754Z","mediaType":"application/vnd.docker.distribution.manifest.list.v2+json","tags":["tagb7cc1bf8"],"changeableAttributes":{"deleteEnabled":false,"writeEnabled":false,"readEnabled":false,"listEnabled":false},"references":[{"digest":"sha256:1b26826f602946860c279fce658f31050cff2c596583af237d971f4629b57792","architecture":"amd64","os":"linux"},{"digest":"sha256:e5785cb0c62cebbed4965129bae371f0589cadd6d84798fb58c2c5f9e237efd9","architecture":"arm","os":"linux"},{"digest":"sha256:50b8560ad574c779908da71f7ce370c0a2471c098d44d1c8f6b513c5a55eeeb1","architecture":"arm","os":"linux"},{"digest":"sha256:963612c5503f3f1674f315c67089dee577d8cc6afc18565e0b4183ae355fb343","architecture":"arm64","os":"linux"},{"digest":"sha256:cb55d8f7347376e1ba38ca740904b43c9a52f66c7d2ae1ef1a0de1bc9f40df98","architecture":"386","os":"linux"},{"digest":"sha256:88b2e00179bd6c4064612403c8d42a13de7ca809d61fee966ce9e129860a8a90","architecture":"mips64le","os":"linux"},{"digest":"sha256:bb7ab0fa94fdd78aca84b27a1bd46c4b811051f9b69905d81f5f267fc6546a9d","architecture":"ppc64le","os":"linux"},{"digest":"sha256:e49abad529e5d9bd6787f3abeab94e09ba274fe34731349556a850b9aebbf7bf","architecture":"s390x","os":"linux"},{"digest":"sha256:b0408a0f1d74eced127a2658429f336ed8fa48e36d59878f155b19865e5dbd70","architecture":"amd64","os":"windows"}]}} ' headers: access-control-expose-headers: X-Ms-Correlation-Request-Id connection: keep-alive - content-length: '833' + content-length: '1582' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 16:04:25 GMT + date: Mon, 05 Apr 2021 17:58:01 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains @@ -236,5 +234,5 @@ interactions: status: code: 200 message: OK - url: https://seankane.azurecr.io/acr/v1/repo_set_manib7cc1bf8/_manifests/sha256:1b26826f602946860c279fce658f31050cff2c596583af237d971f4629b57792 + url: https://seankane.azurecr.io/acr/v1/repo_set_manib7cc1bf8/_manifests/sha256:308866a43596e83578c7dfa15e27a73011bdd402185a84c5cd7f32a88b501a24 version: 1 diff --git a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_set_manifest_properties_does_not_exist.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_set_manifest_properties_does_not_exist.yaml index f06fa8df58e9..ec5ab39a4129 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_set_manifest_properties_does_not_exist.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_set_manifest_properties_does_not_exist.yaml @@ -23,7 +23,7 @@ interactions: connection: keep-alive content-length: '216' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 16:04:25 GMT + date: Mon, 05 Apr 2021 17:58:01 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains @@ -51,11 +51,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 16:04:26 GMT + date: Mon, 05 Apr 2021 17:58:02 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.2' status: code: 200 message: OK @@ -79,11 +79,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 16:04:27 GMT + date: Mon, 05 Apr 2021 17:58:02 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.033333' status: code: 200 message: OK @@ -111,7 +111,7 @@ interactions: connection: keep-alive content-length: '70' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 16:04:27 GMT + date: Mon, 05 Apr 2021 17:58: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_repository_client_async.test_set_tag_properties.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_set_tag_properties.yaml index 516ec9a34e80..ea9259ad3134 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_set_tag_properties.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_set_tag_properties.yaml @@ -19,7 +19,7 @@ interactions: connection: keep-alive content-length: '215' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 16:08:43 GMT + date: Mon, 05 Apr 2021 17:58: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: Mon, 05 Apr 2021 16:08:44 GMT + date: Mon, 05 Apr 2021 17:58:19 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '332.7' + x-ms-ratelimit-remaining-calls-per-second: '333.3' status: code: 200 message: OK @@ -75,11 +75,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 16:08:44 GMT + date: Mon, 05 Apr 2021 17:58:19 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: '333.283333' status: code: 200 message: OK @@ -103,7 +103,7 @@ interactions: connection: keep-alive content-length: '390' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 16:08:44 GMT + date: Mon, 05 Apr 2021 17:58:19 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains @@ -137,7 +137,7 @@ interactions: connection: keep-alive content-length: '216' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 16:08:44 GMT + date: Mon, 05 Apr 2021 17:58:19 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains @@ -165,11 +165,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 16:08:44 GMT + date: Mon, 05 Apr 2021 17:58:20 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '332.666667' + x-ms-ratelimit-remaining-calls-per-second: '333.266667' status: code: 200 message: OK @@ -193,11 +193,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 16:08:44 GMT + date: Mon, 05 Apr 2021 17:58:20 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '332.65' + x-ms-ratelimit-remaining-calls-per-second: '333.25' status: code: 200 message: OK @@ -226,7 +226,7 @@ interactions: connection: keep-alive content-length: '390' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 16:08:45 GMT + date: Mon, 05 Apr 2021 17:58:20 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_set_tag_properties_does_not_exist.yaml b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_set_tag_properties_does_not_exist.yaml index 755bc43c4750..dc45876a519f 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_set_tag_properties_does_not_exist.yaml +++ b/sdk/containerregistry/azure-containerregistry/tests/recordings/test_container_repository_client_async.test_set_tag_properties_does_not_exist.yaml @@ -23,7 +23,7 @@ interactions: connection: keep-alive content-length: '216' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 16:08:45 GMT + date: Mon, 05 Apr 2021 17:58:20 GMT docker-distribution-api-version: registry/2.0 server: openresty strict-transport-security: max-age=31536000; includeSubDomains @@ -51,11 +51,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 16:08:46 GMT + date: Mon, 05 Apr 2021 17:58:21 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '333.283333' + x-ms-ratelimit-remaining-calls-per-second: '333.266667' status: code: 200 message: OK @@ -79,11 +79,11 @@ interactions: headers: connection: keep-alive content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 16:08:46 GMT + date: Mon, 05 Apr 2021 17:58:22 GMT server: openresty strict-transport-security: max-age=31536000; includeSubDomains transfer-encoding: chunked - x-ms-ratelimit-remaining-calls-per-second: '333.266667' + x-ms-ratelimit-remaining-calls-per-second: '333.233333' status: code: 200 message: OK @@ -112,7 +112,7 @@ interactions: connection: keep-alive content-length: '81' content-type: application/json; charset=utf-8 - date: Mon, 05 Apr 2021 16:08:47 GMT + date: Mon, 05 Apr 2021 17:58:22 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/test_container_registry_client.py b/sdk/containerregistry/azure-containerregistry/tests/test_container_registry_client.py index b61e42a25666..b3b859dea6aa 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/test_container_registry_client.py +++ b/sdk/containerregistry/azure-containerregistry/tests/test_container_registry_client.py @@ -22,7 +22,6 @@ class TestContainerRegistryClient(ContainerRegistryTestClass): - @acr_preparer() def test_list_repositories(self, containerregistry_baseurl): client = self.create_registry_client(containerregistry_baseurl) @@ -40,6 +39,27 @@ def test_list_repositories(self, containerregistry_baseurl): assert count > 0 + @acr_preparer() + def test_list_repositories_by_page(self, containerregistry_baseurl): + client = self.create_registry_client(containerregistry_baseurl) + results_per_page = 2 + total_pages = 0 + + repository_pages = client.list_repositories(results_per_page=results_per_page) + + prev = None + for page in repository_pages.by_page(): + page_count = 0 + for repo in page: + assert isinstance(repo, six.string_types) + assert prev != repo + prev = repo + page_count += 1 + assert page_count <= results_per_page + total_pages += 1 + + assert total_pages > 1 + @acr_preparer() def test_delete_repository(self, containerregistry_baseurl, containerregistry_resource_group): repository = self.get_resource_name("repo") diff --git a/sdk/containerregistry/azure-containerregistry/tests/test_container_registry_client_async.py b/sdk/containerregistry/azure-containerregistry/tests/test_container_registry_client_async.py index 48e95b6ba0fa..7d6bd5b2c4dc 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/test_container_registry_client_async.py +++ b/sdk/containerregistry/azure-containerregistry/tests/test_container_registry_client_async.py @@ -23,7 +23,6 @@ class TestContainerRegistryClient(AsyncContainerRegistryTestClass): - @acr_preparer() async def test_list_repositories(self, containerregistry_baseurl): client = self.create_registry_client(containerregistry_baseurl) @@ -40,6 +39,27 @@ async def test_list_repositories(self, containerregistry_baseurl): assert count > 0 + @acr_preparer() + async def test_list_repositories_by_page(self, containerregistry_baseurl): + client = self.create_registry_client(containerregistry_baseurl) + results_per_page = 2 + total_pages = 0 + + repository_pages = client.list_repositories(results_per_page=results_per_page) + + prev = None + async for page in repository_pages.by_page(): + page_count = 0 + async for repo in page: + assert isinstance(repo, six.string_types) + assert prev != repo + prev = repo + page_count += 1 + assert page_count <= results_per_page + total_pages += 1 + + assert total_pages >= 1 + @acr_preparer() async def test_delete_repository(self, containerregistry_baseurl, containerregistry_resource_group): repository = self.get_resource_name("repo") 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 32bb7c7ec655..8e8e4638a124 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/test_container_repository_client.py +++ b/sdk/containerregistry/azure-containerregistry/tests/test_container_repository_client.py @@ -31,18 +31,20 @@ class TestContainerRepositoryClient(ContainerRegistryTestClass): @acr_preparer() def test_delete_tag(self, containerregistry_baseurl, 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) + tag = self.get_resource_name("tag") + self._import_tag_to_be_deleted( + containerregistry_baseurl, resource_group=containerregistry_resource_group, repository=repo, tag=tag + ) client = self.create_repository_client(containerregistry_baseurl, repo) - tag = client.get_tag_properties(TO_BE_DELETED) - assert tag is not None - - client.delete_tag(TO_BE_DELETED) - self.sleep(5) + tag_props = client.get_tag_properties(tag) + assert tag_props is not None + client.delete_tag(tag) + self.sleep(10) with pytest.raises(ResourceNotFoundError): - client.get_tag_properties(TO_BE_DELETED) + client.get_tag_properties(tag) @acr_preparer() def test_delete_tag_does_not_exist(self, containerregistry_baseurl): @@ -60,9 +62,7 @@ def test_get_properties(self, containerregistry_baseurl): @acr_preparer() def test_get_tag(self, containerregistry_baseurl): - client = self.create_repository_client( - containerregistry_baseurl, self.repository - ) + client = self.create_repository_client(containerregistry_baseurl, self.repository) tag = client.get_tag_properties("latest") @@ -85,6 +85,22 @@ def test_list_registry_artifacts(self, containerregistry_baseurl): assert count > 0 + @acr_preparer() + def test_list_registry_artifacts_by_page(self, containerregistry_baseurl): + client = self.create_repository_client(containerregistry_baseurl, self.repository) + results_per_page = 2 + + pages = client.list_registry_artifacts(results_per_page=results_per_page) + page_count = 0 + for page in pages.by_page(): + reg_count = 0 + for tag in page: + reg_count += 1 + assert reg_count <= results_per_page + page_count += 1 + + assert page_count >= 1 + @acr_preparer() def test_list_registry_artifacts_descending(self, containerregistry_baseurl): client = self.create_repository_client(containerregistry_baseurl, self.repository) @@ -125,9 +141,7 @@ def test_get_registry_artifact_properties(self, containerregistry_baseurl): @acr_preparer() def test_list_tags(self, containerregistry_baseurl): - client = self.create_repository_client( - containerregistry_baseurl, self.repository - ) + client = self.create_repository_client(containerregistry_baseurl, self.repository) tags = client.list_tags() assert isinstance(tags, ItemPaged) @@ -137,6 +151,23 @@ def test_list_tags(self, containerregistry_baseurl): assert count > 0 + @acr_preparer() + def test_list_tags_by_page(self, containerregistry_baseurl): + client = self.create_repository_client(containerregistry_baseurl, self.repository) + + results_per_page = 2 + + pages = client.list_tags(results_per_page=results_per_page) + page_count = 0 + for page in pages.by_page(): + tag_count = 0 + for tag in page: + tag_count += 1 + assert tag_count <= results_per_page + page_count += 1 + + assert page_count >= 1 + @acr_preparer() def test_list_tags_descending(self, containerregistry_baseurl): client = self.create_repository_client(containerregistry_baseurl, self.repository) @@ -167,9 +198,7 @@ def test_list_tags_ascending(self, containerregistry_baseurl): @pytest.mark.live_test_only # Recordings error, recieves more than 100 headers, not that many present @acr_preparer() - def test_set_tag_properties( - self, containerregistry_baseurl, containerregistry_resource_group - ): + def test_set_tag_properties(self, containerregistry_baseurl, containerregistry_resource_group): repository = self.get_resource_name("repo") tag_identifier = self.get_resource_name("tag") self.import_repo_to_be_deleted( @@ -184,9 +213,15 @@ def test_set_tag_properties( tag_props = client.get_tag_properties(tag_identifier) permissions = tag_props.content_permissions - received = client.set_tag_properties(tag_identifier, ContentPermissions( - can_delete=False, can_list=False, can_read=False, can_write=False, - )) + received = client.set_tag_properties( + tag_identifier, + ContentPermissions( + can_delete=False, + can_list=False, + can_read=False, + can_write=False, + ), + ) assert not received.content_permissions.can_write assert not received.content_permissions.can_read @@ -218,9 +253,15 @@ def test_set_manifest_properties(self, containerregistry_baseurl, containerregis for artifact in client.list_registry_artifacts(): permissions = artifact.content_permissions - received_permissions = client.set_manifest_properties(artifact.digest, ContentPermissions( - can_delete=False, can_list=False, can_read=False, can_write=False, - )) + received_permissions = client.set_manifest_properties( + artifact.digest, + ContentPermissions( + can_delete=False, + can_list=False, + can_read=False, + can_write=False, + ), + ) assert not received_permissions.content_permissions.can_delete assert not received_permissions.content_permissions.can_read @@ -239,7 +280,9 @@ def test_set_manifest_properties_does_not_exist(self, containerregistry_baseurl) @acr_preparer() def test_delete_repository(self, containerregistry_baseurl, containerregistry_resource_group): - self.import_repo_to_be_deleted(containerregistry_baseurl, resource_group=containerregistry_resource_group, repository=TO_BE_DELETED) + self.import_repo_to_be_deleted( + containerregistry_baseurl, resource_group=containerregistry_resource_group, repository=TO_BE_DELETED + ) reg_client = self.create_registry_client(containerregistry_baseurl) existing_repos = list(reg_client.list_repositories()) @@ -255,7 +298,6 @@ def test_delete_repository(self, containerregistry_baseurl, containerregistry_re existing_repos = list(reg_client.list_repositories()) assert TO_BE_DELETED not in existing_repos - @acr_preparer() def test_delete_repository_doesnt_exist(self, containerregistry_baseurl): repo_client = self.create_repository_client(containerregistry_baseurl, DOES_NOT_EXIST) @@ -265,7 +307,9 @@ def test_delete_repository_doesnt_exist(self, containerregistry_baseurl): @acr_preparer() def test_delete_registry_artifact(self, containerregistry_baseurl, containerregistry_resource_group): repository = self.get_resource_name("repo") - self.import_repo_to_be_deleted(containerregistry_baseurl, resource_group=containerregistry_resource_group, repository=repository) + self.import_repo_to_be_deleted( + containerregistry_baseurl, resource_group=containerregistry_resource_group, repository=repository + ) repo_client = self.create_repository_client(containerregistry_baseurl, repository) 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 925bc9d69493..2a89d8e203cb 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 @@ -18,18 +18,98 @@ ) from azure.containerregistry.aio import ContainerRegistryClient, ContainerRepositoryClient from azure.core.exceptions import ResourceNotFoundError -from azure.core.paging import ItemPaged +from azure.core.async_paging import AsyncItemPaged from asynctestcase import AsyncContainerRegistryTestClass from preparer import acr_preparer from constants import TO_BE_DELETED -class TestContainerRegistryClient(AsyncContainerRegistryTestClass): +class TestContainerRepositoryClient(AsyncContainerRegistryTestClass): + @acr_preparer() + async def test_list_registry_artifacts(self, containerregistry_baseurl): + client = self.create_repository_client(containerregistry_baseurl, self.repository) + + async for artifact in client.list_registry_artifacts(): + assert artifact is not None + assert isinstance(artifact, RegistryArtifactProperties) + assert artifact.created_on is not None + assert isinstance(artifact.created_on, datetime) + assert artifact.last_updated_on is not None + assert isinstance(artifact.last_updated_on, datetime) + + @acr_preparer() + async def test_list_registry_artifacts_by_page(self, containerregistry_baseurl): + client = self.create_repository_client(containerregistry_baseurl, self.repository) + results_per_page = 2 + + pages = client.list_registry_artifacts(results_per_page=results_per_page) + page_count = 0 + async for page in pages.by_page(): + reg_count = 0 + async for tag in page: + reg_count += 1 + assert reg_count <= results_per_page + page_count += 1 + + assert page_count >= 1 + + @acr_preparer() + async def test_list_tags(self, containerregistry_baseurl): + client = self.create_repository_client(containerregistry_baseurl, self.repository) + + tags = client.list_tags() + assert isinstance(tags, AsyncItemPaged) + count = 0 + async for tag in tags: + count += 1 + + assert count > 0 + + @acr_preparer() + async def test_list_tags_by_page(self, containerregistry_baseurl): + client = self.create_repository_client(containerregistry_baseurl, self.repository) + + results_per_page = 2 + + pages = client.list_tags(results_per_page=results_per_page) + page_count = 0 + async for page in pages.by_page(): + tag_count = 0 + async for tag in page: + tag_count += 1 + assert tag_count <= results_per_page + page_count += 1 + + assert page_count >= 1 + + @acr_preparer() + async def test_list_tags_descending(self, containerregistry_baseurl): + client = self.create_repository_client(containerregistry_baseurl, self.repository) + + # TODO: This is giving time in ascending order + tags = client.list_tags(order_by=TagOrderBy.LAST_UPDATE_TIME_DESCENDING) + assert isinstance(tags, AsyncItemPaged) + last_updated_on = None + count = 0 + async for tag in tags: + print(tag.last_updated_on) + # if last_updated_on: + # assert tag.last_updated_on < last_updated_on + last_updated_on = tag.last_updated_on + count += 1 + + assert count > 0 + @acr_preparer() async def test_delete_tag(self, containerregistry_baseurl, 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) + 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, repo) @@ -51,7 +131,9 @@ async def test_delete_tag_does_not_exist(self, containerregistry_baseurl): @acr_preparer() async def test_delete_repository(self, containerregistry_baseurl, containerregistry_resource_group): - self.import_repo_to_be_deleted(containerregistry_baseurl, resource_group=containerregistry_resource_group, repository=TO_BE_DELETED) + self.import_repo_to_be_deleted( + containerregistry_baseurl, resource_group=containerregistry_resource_group, repository=TO_BE_DELETED + ) reg_client = self.create_registry_client(containerregistry_baseurl) existing_repos = [] @@ -82,7 +164,9 @@ async def test_delete_repository_doesnt_exist(self, containerregistry_baseurl): @acr_preparer() async def test_delete_registry_artifact(self, containerregistry_baseurl, containerregistry_resource_group): repository = self.get_resource_name("repo") - self.import_repo_to_be_deleted(containerregistry_baseurl, resource_group=containerregistry_resource_group, repository=repository) + self.import_repo_to_be_deleted( + containerregistry_baseurl, resource_group=containerregistry_resource_group, repository=repository + ) repo_client = self.create_repository_client(containerregistry_baseurl, repository) @@ -101,9 +185,7 @@ async def test_delete_registry_artifact(self, containerregistry_baseurl, contain assert len(artifacts) == count - 1 @acr_preparer() - async def test_set_tag_properties( - self, containerregistry_baseurl, containerregistry_resource_group - ): + async def test_set_tag_properties(self, containerregistry_baseurl, containerregistry_resource_group): repository = self.get_resource_name("repo") tag_identifier = self.get_resource_name("tag") self.import_repo_to_be_deleted( @@ -118,9 +200,15 @@ async def test_set_tag_properties( tag_props = await client.get_tag_properties(tag_identifier) permissions = tag_props.content_permissions - received = await client.set_tag_properties(tag_identifier, ContentPermissions( - can_delete=False, can_list=False, can_read=False, can_write=False, - )) + received = await client.set_tag_properties( + tag_identifier, + ContentPermissions( + can_delete=False, + can_list=False, + can_read=False, + can_write=False, + ), + ) assert not received.content_permissions.can_write assert not received.content_permissions.can_read @@ -150,9 +238,15 @@ async def test_set_manifest_properties(self, containerregistry_baseurl, containe async for artifact in client.list_registry_artifacts(): permissions = artifact.content_permissions - received_permissions = await client.set_manifest_properties(artifact.digest, ContentPermissions( - can_delete=False, can_list=False, can_read=False, can_write=False, - )) + received_permissions = await client.set_manifest_properties( + artifact.digest, + ContentPermissions( + can_delete=False, + can_list=False, + can_read=False, + can_write=False, + ), + ) assert not received_permissions.content_permissions.can_delete assert not received_permissions.content_permissions.can_read assert not received_permissions.content_permissions.can_list @@ -195,7 +289,6 @@ async def test_list_tags_ascending(self, containerregistry_baseurl): assert count > 0 - @acr_preparer() async def test_list_registry_artifacts(self, containerregistry_baseurl): client = self.create_repository_client(containerregistry_baseurl, self.repository) @@ -218,7 +311,9 @@ async def test_list_registry_artifacts_descending(self, containerregistry_baseur prev_last_updated_on = None count = 0 - async for artifact in client.list_registry_artifacts(order_by=RegistryArtifactOrderBy.LAST_UPDATE_TIME_DESCENDING): + async for artifact in client.list_registry_artifacts( + order_by=RegistryArtifactOrderBy.LAST_UPDATE_TIME_DESCENDING + ): if prev_last_updated_on: assert artifact.last_updated_on < prev_last_updated_on prev_last_updated_on = artifact.last_updated_on @@ -232,10 +327,12 @@ async def test_list_registry_artifacts_ascending(self, containerregistry_baseurl prev_last_updated_on = None count = 0 - async for artifact in client.list_registry_artifacts(order_by=RegistryArtifactOrderBy.LAST_UPDATE_TIME_ASCENDING): + async for artifact in client.list_registry_artifacts( + order_by=RegistryArtifactOrderBy.LAST_UPDATE_TIME_ASCENDING + ): if prev_last_updated_on: assert artifact.last_updated_on > prev_last_updated_on prev_last_updated_on = artifact.last_updated_on count += 1 - assert count > 0 \ No newline at end of file + assert count > 0 diff --git a/sdk/containerregistry/azure-containerregistry/tests/testcase.py b/sdk/containerregistry/azure-containerregistry/tests/testcase.py index 340484a5dac4..13fd9a7138c4 100644 --- a/sdk/containerregistry/azure-containerregistry/tests/testcase.py +++ b/sdk/containerregistry/azure-containerregistry/tests/testcase.py @@ -6,7 +6,6 @@ import copy from datetime import datetime import json -import os import re import six import subprocess @@ -32,6 +31,7 @@ class AcrBodyReplacer(RecordingProcessor): """Replace request body for oauth2 exchanges""" + def __init__(self, replacement="redacted"): self._replacement = replacement self._401_replacement = 'Bearer realm="https://fake_url.azurecr.io/oauth2/token",service="fake_url.azurecr.io",scope="fake_scope",error="invalid_token"' @@ -52,7 +52,7 @@ def _scrub_body(self, body): v = REDACTED s[idx] = "=".join([k, v]) s = "&".join(s) - return bytes(s, "utf-8") + return s.encode("utf-8") def _scrub_body_dict(self, body): new_body = copy.deepcopy(body) @@ -69,20 +69,20 @@ def process_request(self, request): def process_response(self, response): try: - headers = response['headers'] + headers = response["headers"] auth_header = None if "www-authenticate" in headers: - response['headers']["www-authenticate"] = self._401_replacement + response["headers"]["www-authenticate"] = self._401_replacement - body = response['body'] + body = response["body"] try: - refresh = json.loads(body['string']) + refresh = json.loads(body["string"]) if "refresh_token" in refresh.keys(): - refresh['refresh_token'] = REDACTED - body['string'] = json.dumps(refresh) + refresh["refresh_token"] = REDACTED + body["string"] = json.dumps(refresh) if "access_token" in refresh.keys(): refresh["access_token"] = REDACTED - body['string'] = json.dumps(refresh) + body["string"] = json.dumps(refresh) except json.decoder.JSONDecodeError: pass @@ -96,6 +96,7 @@ class FakeTokenCredential(object): """Protocol for classes able to provide OAuth tokens. :param str scopes: Lets you specify the type of access needed. """ + def __init__(self): self.token = AccessToken("YOU SHALL NOT PASS", 0) @@ -114,9 +115,7 @@ def sleep(self, t): if self.is_live: time.sleep(t) - def _import_tag_to_be_deleted( - self, endpoint, repository="hello-world", resource_group="fake_rg", tag=None - ): + def _import_tag_to_be_deleted(self, endpoint, repository="hello-world", resource_group="fake_rg", tag=None): if not self.is_live: return @@ -142,9 +141,7 @@ def _import_tag_to_be_deleted( ] subprocess.check_call(command) - def import_repo_to_be_deleted( - self, endpoint, repository="hello-world", resource_group="fake_rg", tag=None - ): + def import_repo_to_be_deleted(self, endpoint, repository="hello-world", resource_group="fake_rg", tag=None): if not self.is_live: return @@ -192,19 +189,10 @@ def get_credential(self): return FakeTokenCredential() def create_registry_client(self, endpoint, **kwargs): - return ContainerRegistryClient( - endpoint=endpoint, - credential=self.get_credential(), - **kwargs - ) + return ContainerRegistryClient(endpoint=endpoint, credential=self.get_credential(), **kwargs) def create_repository_client(self, endpoint, name, **kwargs): - return ContainerRepositoryClient( - endpoint=endpoint, - repository=name, - credential=self.get_credential(), - **kwargs - ) + return ContainerRepositoryClient(endpoint=endpoint, repository=name, credential=self.get_credential(), **kwargs) def assert_content_permission(self, content_perm, content_perm2): assert isinstance(content_perm, ContentPermissions)