summaryrefslogtreecommitdiff
path: root/pkg/domain/infra
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-01-15 20:39:16 +0100
committerGitHub <noreply@github.com>2022-01-15 20:39:16 +0100
commit3c9e41bb5393e0a857d8755bb50345544cc31b50 (patch)
tree9f2af691f56081271e7fff6971ddd7e5fe45271a /pkg/domain/infra
parentfff9e8755c298bfe2b3b0c33c4b96ffd43a1eab6 (diff)
parent14940a067d007af445560a0a7eb414f6547a7cd4 (diff)
downloadpodman-3c9e41bb5393e0a857d8755bb50345544cc31b50.tar.gz
podman-3c9e41bb5393e0a857d8755bb50345544cc31b50.tar.bz2
podman-3c9e41bb5393e0a857d8755bb50345544cc31b50.zip
Merge pull request #12572 from rhatdan/image
Remove two GetImages functions from API
Diffstat (limited to 'pkg/domain/infra')
-rw-r--r--pkg/domain/infra/abi/images_list.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/pkg/domain/infra/abi/images_list.go b/pkg/domain/infra/abi/images_list.go
index 2ec4ad244..47b47b065 100644
--- a/pkg/domain/infra/abi/images_list.go
+++ b/pkg/domain/infra/abi/images_list.go
@@ -26,9 +26,9 @@ func (ir *ImageEngine) List(ctx context.Context, opts entities.ImageListOptions)
summaries := []*entities.ImageSummary{}
for _, img := range images {
- digests := make([]string, len(img.Digests()))
- for j, d := range img.Digests() {
- digests[j] = string(d)
+ repoDigests, err := img.RepoDigests()
+ if err != nil {
+ return nil, errors.Wrapf(err, "getting repoDigests from image %q", img.ID())
}
isDangling, err := img.IsDangling(ctx)
if err != nil {
@@ -37,11 +37,12 @@ func (ir *ImageEngine) List(ctx context.Context, opts entities.ImageListOptions)
e := entities.ImageSummary{
ID: img.ID(),
- // ConfigDigest: string(img.ConfigDigest),
+ // TODO: libpod/image didn't set it but libimage should
+ // ConfigDigest: string(img.ConfigDigest),
Created: img.Created().Unix(),
Dangling: isDangling,
Digest: string(img.Digest()),
- RepoDigests: digests,
+ RepoDigests: repoDigests,
History: img.NamesHistory(),
Names: img.Names(),
ReadOnly: img.IsReadOnly(),