diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-05-21 17:13:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-21 17:13:36 +0200 |
commit | 363f8820bc6d9ee19d2c95cfcbb05e93938cd53c (patch) | |
tree | 039de0bf1249b2762fa385ee8397ce569c83b9c0 /pkg/domain/infra/abi | |
parent | 58baeab3303f0a666bca1f3dce706908f60626e1 (diff) | |
parent | 9add1abd12bbadef3dac778a72072fae3cb9c08b (diff) | |
download | podman-363f8820bc6d9ee19d2c95cfcbb05e93938cd53c.tar.gz podman-363f8820bc6d9ee19d2c95cfcbb05e93938cd53c.tar.bz2 podman-363f8820bc6d9ee19d2c95cfcbb05e93938cd53c.zip |
Merge pull request #6312 from rhatdan/image
Fix remote handling of podman images calls
Diffstat (limited to 'pkg/domain/infra/abi')
-rw-r--r-- | pkg/domain/infra/abi/images_list.go | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/pkg/domain/infra/abi/images_list.go b/pkg/domain/infra/abi/images_list.go index c559e250c..3034e36ec 100644 --- a/pkg/domain/infra/abi/images_list.go +++ b/pkg/domain/infra/abi/images_list.go @@ -13,14 +13,7 @@ func (ir *ImageEngine) List(ctx context.Context, opts entities.ImageListOptions) err error ) - // TODO: Future work support for domain.Filters - // filters := utils.ToLibpodFilters(opts.Filters) - - if len(opts.Filter) > 0 { - images, err = ir.Libpod.ImageRuntime().GetImagesWithFilters(opts.Filter) - } else { - images, err = ir.Libpod.ImageRuntime().GetImages() - } + images, err = ir.Libpod.ImageRuntime().GetImagesWithFilters(opts.Filter) if err != nil { return nil, err } @@ -40,9 +33,18 @@ func (ir *ImageEngine) List(ctx context.Context, opts entities.ImageListOptions) } } } else { - repoTags, _ = img.RepoTags() - if len(repoTags) == 0 { - continue + repoTags, err = img.RepoTags() + if err != nil { + return nil, err + } + if len(img.Names()) == 0 { + parent, err := img.IsParent(ctx) + if err != nil { + return nil, err + } + if parent { + continue + } } } |