diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2020-05-20 21:05:32 -0400 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2020-05-21 09:28:42 -0400 |
commit | 9add1abd12bbadef3dac778a72072fae3cb9c08b (patch) | |
tree | 05568d1e084696166849d7a007d4a5379910880b /pkg/domain/infra/tunnel/images.go | |
parent | a4c8198afd2b92b40b95c6fe01756cf2d0076cb6 (diff) | |
download | podman-9add1abd12bbadef3dac778a72072fae3cb9c08b.tar.gz podman-9add1abd12bbadef3dac778a72072fae3cb9c08b.tar.bz2 podman-9add1abd12bbadef3dac778a72072fae3cb9c08b.zip |
Handle filters correctly for podman prune
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'pkg/domain/infra/tunnel/images.go')
-rw-r--r-- | pkg/domain/infra/tunnel/images.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pkg/domain/infra/tunnel/images.go b/pkg/domain/infra/tunnel/images.go index a547a24d7..3d5626c45 100644 --- a/pkg/domain/infra/tunnel/images.go +++ b/pkg/domain/infra/tunnel/images.go @@ -67,8 +67,13 @@ func (ir *ImageEngine) History(ctx context.Context, nameOrId string, opts entiti } func (ir *ImageEngine) Prune(ctx context.Context, opts entities.ImagePruneOptions) (*entities.ImagePruneReport, error) { + filters := make(map[string][]string, len(opts.Filter)) + for _, filter := range opts.Filter { + f := strings.Split(filter, "=") + filters[f[0]] = f[1:] + } - results, err := images.Prune(ir.ClientCxt, &opts.All, opts.Filters) + results, err := images.Prune(ir.ClientCxt, &opts.All, filters) if err != nil { return nil, err } |