From 23294c9cf6a85a36fcd7d67c2cc3b7389b4691eb Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Wed, 29 Jul 2020 14:11:10 -0400 Subject: Return NamesHistory when returning remote images We are returning bogus data in podman-remote images --format json. This change will match the same data returned my podman images --format json. Signed-off-by: Daniel J Walsh --- pkg/api/handlers/types.go | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/pkg/api/handlers/types.go b/pkg/api/handlers/types.go index a17f5df56..0ccaa95bb 100644 --- a/pkg/api/handlers/types.go +++ b/pkg/api/handlers/types.go @@ -203,15 +203,6 @@ func ImageToImageSummary(l *libpodImage.Image) (*entities.ImageSummary, error) { return nil, errors.Wrapf(err, "Failed to obtain RepoTags for image %s", l.ID()) } - history, err := l.History(context.TODO()) - if err != nil { - return nil, errors.Wrapf(err, "Failed to obtain History for image %s", l.ID()) - } - historyIds := make([]string, len(history)) - for i, h := range history { - historyIds[i] = h.ID - } - digests := make([]string, len(l.Digests())) for i, d := range l.Digests() { digests[i] = string(d) @@ -233,7 +224,7 @@ func ImageToImageSummary(l *libpodImage.Image) (*entities.ImageSummary, error) { Digest: string(l.Digest()), Digests: digests, ConfigDigest: string(l.ConfigDigest), - History: historyIds, + History: l.NamesHistory(), } return &is, nil } -- cgit v1.2.3-54-g00ecf