[Container Registry] Update API for Beta 2#18392
Conversation
...tainerregistry/azure-containerregistry/azure/containerregistry/_container_registry_client.py
Outdated
Show resolved
Hide resolved
sdk/containerregistry/azure-containerregistry/azure/containerregistry/_container_repository.py
Outdated
Show resolved
Hide resolved
| from ._models import ContentProperties | ||
|
|
||
|
|
||
| class ContainerRepository(ContainerRegistryBaseClient): |
There was a problem hiding this comment.
Why is this no longer a client? Is it because a user cannot instantiate it themselves?
There was a problem hiding this comment.
A user could instantiate it themselves but it would look a little awkward. We received feedback from the service team that the two clients made it confusing on where a user should start. Krystof and Anne Thompson came up with a design where both ContainerRepository and RegistryArtifact have client-like properties (being able to make service calls) but are more like models. This produces a more intuitive starting point with ContainerRegistryClient.
|
|
||
|
|
||
| class RegistryArtifactOrderBy(str, Enum): | ||
| class ManifestOrderBy(str, Enum): |
There was a problem hiding this comment.
I feel like this should just be called ManifestOrder or ManifestOrdering.
Then it reads better: order_by=ManifestOrder.LAST_UPDATE_TIME_DESCENDING
| # type: (str, str, TokenCredential, Dict[str, Any]) -> None | ||
| """Create a ContainerRepositoryClient from an endpoint, repository name, and credential | ||
| class RegistryArtifact(ContainerRegistryBaseClient): | ||
| def __init__(self, endpoint, repository, tag_or_digest, credential, **kwargs): |
There was a problem hiding this comment.
It looks like this is also kind of a client - but it didn't have the pipeline/transport wrapping in the methods that construct it.
There was a problem hiding this comment.
The reasoning is the same as for ContainerRegistry, but I do need to add the pipeline/transport wrapping constructs.
|
|
||
| @distributed_trace | ||
| def list_manifests(self, **kwargs): | ||
| # type: (Dict[str, Any]) -> ItemPaged[ArtifactManifestProperties] |
There was a problem hiding this comment.
Are the listed items here the same data that I would get from a get_manifest_properties call?
We're using the same response object for both - so just checking that they both include the same information.
There was a problem hiding this comment.
Yes they are, both calls return the same data.
| :paramtype last: str | ||
| :keyword order_by: Query parameter for ordering by time ascending or descending | ||
| :paramtype order_by: :class:`~azure.containerregistry.TagOrderBy` | ||
| :paramtype order_by: :class:`~azure.containerregistry.TagOrder` |
There was a problem hiding this comment.
The param documentation should include str as a valid input where ever we also use enums :)
Though it doesn't need to be fixed for this preview.
| "ContainerRepository", | ||
| "ContentProperties", | ||
| "ManifestOrderBy", | ||
| "DeleteRepositoryResult", |
There was a problem hiding this comment.
What information do we get back from a delete operation?
There was a problem hiding this comment.
The manifests and tags deleted as part of the repository delete operation
| :vartype last_updated_on: :class:`datetime.datetime` | ||
| :ivar int manifest_count: Number of manifest in the repository | ||
| :ivar str name: Name of the repository | ||
| :ivar str registry: Registry the repository belongs to |
There was a problem hiding this comment.
We don't think this would be useful info?
There was a problem hiding this comment.
This was an error on my part, the registry is not included in the response object.
| if not endpoint.startswith("https://") and not endpoint.startswith("http://"): | ||
| endpoint = "https://" + endpoint | ||
| self._endpoint = endpoint | ||
| self.name = name |
There was a problem hiding this comment.
Should this also have something like the property on RegistryArtifact:
self.fully_qualified_name = self._endpoint + self.repositoryThere was a problem hiding this comment.
Yes adding it now.
|
Hello @seankane-msft! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
…into azure_purview_scanning * 'master' of https://github.com/Azure/azure-sdk-for-python: (31 commits) [purview] add catalog client (Azure#17788) Add spellcheck for modified files (Azure#18496) [Container Registry] Update API for Beta 2 (Azure#18392) First version of Confidential Ledger Python SDK (Azure#17951) [llc] add quickstart (Azure#18537) [Storage][Fix]Copy source is redirecting (Azure#18577) [Tables] pre-release script (Azure#18505) Update changelogs (Azure#18575) [formrecognizer] Adding to_dict() on custom models (Azure#18402) Raise CredentialUnavailableError when CLI subprocess times out (Azure#18509) Extend Check Enforcer timeout (Azure#18526) Core raw streaming (Azure#17920) hide secrets in mgmt sdk (Azure#18535) add filter samples for list methods (Azure#18480) Revert changes to SetDevVersion. (Azure#18555) add support for filtering/paging/sorting options for "list_**" methods (Azure#18302) [Tables] Misc client updates (Azure#18462) [EventHub&ServiceBus] Prepare for release (Azure#18527) [Communication]: Updated communication connection strings to be consistent across packages and languages (Azure#18519) [AppConfig] Fixing samples (Azure#18542) ...
…into agrifood_nspkg * 'master' of https://github.com/Azure/azure-sdk-for-python: (31 commits) [purview] add catalog client (Azure#17788) Add spellcheck for modified files (Azure#18496) [Container Registry] Update API for Beta 2 (Azure#18392) First version of Confidential Ledger Python SDK (Azure#17951) [llc] add quickstart (Azure#18537) [Storage][Fix]Copy source is redirecting (Azure#18577) [Tables] pre-release script (Azure#18505) Update changelogs (Azure#18575) [formrecognizer] Adding to_dict() on custom models (Azure#18402) Raise CredentialUnavailableError when CLI subprocess times out (Azure#18509) Extend Check Enforcer timeout (Azure#18526) Core raw streaming (Azure#17920) hide secrets in mgmt sdk (Azure#18535) add filter samples for list methods (Azure#18480) Revert changes to SetDevVersion. (Azure#18555) add support for filtering/paging/sorting options for "list_**" methods (Azure#18302) [Tables] Misc client updates (Azure#18462) [EventHub&ServiceBus] Prepare for release (Azure#18527) [Communication]: Updated communication connection strings to be consistent across packages and languages (Azure#18519) [AppConfig] Fixing samples (Azure#18542) ...
No description provided.