20
20
from ._helpers import _is_tag , _parse_next_link
21
21
from ._models import (
22
22
DeleteRepositoryResult ,
23
- RegistryArtifactProperties ,
23
+ ArtifactManifestProperties ,
24
24
RepositoryProperties ,
25
25
ArtifactTagProperties ,
26
26
)
@@ -105,19 +105,20 @@ def get_properties(self, **kwargs):
105
105
106
106
@distributed_trace
107
107
def get_registry_artifact_properties (self , tag_or_digest , ** kwargs ):
108
- # type: (str, Dict[str, Any]) -> RegistryArtifactProperties
108
+ # type: (str, Dict[str, Any]) -> ArtifactManifestProperties
109
109
"""Get the properties of a registry artifact
110
110
111
111
:param tag_or_digest: The tag/digest of a registry artifact
112
112
:type tag_or_digest: str
113
- :returns: :class:`~azure.containerregistry.RegistryArtifactProperties `
113
+ :returns: :class:`~azure.containerregistry.ArtifactManifestProperties `
114
114
:raises: :class:`~azure.core.exceptions.ResourceNotFoundError`
115
115
"""
116
116
if _is_tag (tag_or_digest ):
117
117
tag_or_digest = self ._get_digest_from_tag (tag_or_digest )
118
118
119
- return RegistryArtifactProperties ._from_generated ( # pylint: disable=protected-access
120
- self ._client .container_registry .get_manifest_properties (self .repository , tag_or_digest , ** kwargs )
119
+ return ArtifactManifestProperties ._from_generated ( # pylint: disable=protected-access
120
+ self ._client .container_registry .get_manifest_properties (self .repository , tag_or_digest , ** kwargs ),
121
+ repository = self .repository
121
122
)
122
123
123
124
@distributed_trace
@@ -137,17 +138,17 @@ def get_tag_properties(self, tag, **kwargs):
137
138
138
139
@distributed_trace
139
140
def list_registry_artifacts (self , ** kwargs ):
140
- # type: (Dict[str, Any]) -> ItemPaged[RegistryArtifactProperties ]
141
+ # type: (Dict[str, Any]) -> ItemPaged[ArtifactManifestProperties ]
141
142
"""List the artifacts for a repository
142
143
143
144
:keyword last: Query parameter for the last item in the previous call. Ensuing
144
145
call will return values after last lexically
145
146
:paramtype last: str
146
147
:keyword order_by: Query parameter for ordering by time ascending or descending
147
- :paramtype order_by: :class:`~azure.containerregistry.RegistryArtifactOrderBy `
148
+ :paramtype order_by: :class:`~azure.containerregistry.ManifestOrderBy `
148
149
:keyword results_per_page: Number of repositories to return per page
149
150
:paramtype results_per_page: int
150
- :return: ItemPaged[:class:`RegistryArtifactProperties `]
151
+ :return: ItemPaged[:class:`ArtifactManifestProperties `]
151
152
:rtype: :class:`~azure.core.paging.ItemPaged`
152
153
:raises: :class:`~azure.core.exceptions.ResourceNotFoundError`
153
154
"""
@@ -158,7 +159,7 @@ def list_registry_artifacts(self, **kwargs):
158
159
cls = kwargs .pop (
159
160
"cls" ,
160
161
lambda objs : [
161
- RegistryArtifactProperties ._from_generated (x ) for x in objs # pylint: disable=protected-access
162
+ ArtifactManifestProperties ._from_generated (x , repository = self . repository ) for x in objs # pylint: disable=protected-access
162
163
],
163
164
)
164
165
@@ -377,20 +378,21 @@ def get_next(next_link=None):
377
378
378
379
@distributed_trace
379
380
def set_manifest_properties (self , digest , permissions , ** kwargs ):
380
- # type: (str, ContentProperties, Dict[str, Any]) -> RegistryArtifactProperties
381
+ # type: (str, ContentProperties, Dict[str, Any]) -> ArtifactManifestProperties
381
382
"""Set the properties for a manifest
382
383
383
384
:param digest: Digest of a manifest
384
385
:type digest: str
385
386
:param permissions: The property's values to be set
386
387
:type permissions: ContentProperties
387
- :returns: :class:`~azure.containerregistry.RegistryArtifactProperties `
388
+ :returns: :class:`~azure.containerregistry.ArtifactManifestProperties `
388
389
:raises: :class:`~azure.core.exceptions.ResourceNotFoundError`
389
390
"""
390
- return RegistryArtifactProperties ._from_generated ( # pylint: disable=protected-access
391
+ return ArtifactManifestProperties ._from_generated ( # pylint: disable=protected-access
391
392
self ._client .container_registry .update_manifest_properties (
392
393
self .repository , digest , value = permissions ._to_generated (), ** kwargs # pylint: disable=protected-access
393
- )
394
+ ),
395
+ repository = self .repository
394
396
)
395
397
396
398
@distributed_trace
0 commit comments