diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2020-05-20 20:46:43 -0400 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2020-05-21 09:28:42 -0400 |
commit | a4c8198afd2b92b40b95c6fe01756cf2d0076cb6 (patch) | |
tree | bc447a449a45e27a73579e762f48fc0e05cd2e9b /pkg/domain/infra/abi | |
parent | 8db7b9ea219ef06c50919dcfabdfdca5676e1456 (diff) | |
download | podman-a4c8198afd2b92b40b95c6fe01756cf2d0076cb6.tar.gz podman-a4c8198afd2b92b40b95c6fe01756cf2d0076cb6.tar.bz2 podman-a4c8198afd2b92b40b95c6fe01756cf2d0076cb6.zip |
Fix remote handling of podman images calls
Enable three more tests
Fix handling of image filters
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
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 + } } } |