Change OCI data model to use a content retriever for the various manifest operations
This commit is contained in:
parent
cbfb6054e5
commit
82ee21bfbd
5 changed files with 61 additions and 46 deletions
|
@ -225,8 +225,8 @@ class DockerSchema2ManifestList(ManifestInterface):
|
|||
|
||||
@property
|
||||
def blob_digests(self):
|
||||
manifests = self._parsed[DOCKER_SCHEMA2_MANIFESTLIST_MANIFESTS_KEY]
|
||||
return [m[DOCKER_SCHEMA2_MANIFESTLIST_DIGEST_KEY] for m in manifests]
|
||||
# Manifest lists have no blob digests, since everything is stored as a manifest.
|
||||
return []
|
||||
|
||||
@property
|
||||
def local_blob_digests(self):
|
||||
|
|
|
@ -79,7 +79,7 @@ def test_valid_manifestlist():
|
|||
assert manifestlist.media_type == 'application/vnd.docker.distribution.manifest.list.v2+json'
|
||||
assert manifestlist.bytes == MANIFESTLIST_BYTES
|
||||
assert manifestlist.manifest_dict == json.loads(MANIFESTLIST_BYTES)
|
||||
assert set(manifestlist.blob_digests) == {'sha256:e6', 'sha256:5b'}
|
||||
assert not manifestlist.blob_digests
|
||||
|
||||
for index, manifest in enumerate(manifestlist.manifests(retriever)):
|
||||
if index == 0:
|
||||
|
|
Reference in a new issue