summaryrefslogtreecommitdiff
path: root/pkg/api
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-07-29 14:11:10 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2020-07-29 14:17:56 -0400
commit23294c9cf6a85a36fcd7d67c2cc3b7389b4691eb (patch)
tree9b7d14bed3764616fbf5c97e4fa8ce1dae1d6884 /pkg/api
parent7f38774ee7758e56cf31e87c81ae0bc9208d0ede (diff)
downloadpodman-23294c9cf6a85a36fcd7d67c2cc3b7389b4691eb.tar.gz
podman-23294c9cf6a85a36fcd7d67c2cc3b7389b4691eb.tar.bz2
podman-23294c9cf6a85a36fcd7d67c2cc3b7389b4691eb.zip
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 <dwalsh@redhat.com>
Diffstat (limited to 'pkg/api')
-rw-r--r--pkg/api/handlers/types.go11
1 files changed, 1 insertions, 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
}