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/tunnel | |
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/tunnel')
-rw-r--r-- | pkg/domain/infra/tunnel/images.go | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/pkg/domain/infra/tunnel/images.go b/pkg/domain/infra/tunnel/images.go index 4d00d331b..3d5626c45 100644 --- a/pkg/domain/infra/tunnel/images.go +++ b/pkg/domain/infra/tunnel/images.go @@ -4,6 +4,7 @@ import ( "context" "io/ioutil" "os" + "strings" "github.com/containers/common/pkg/config" "github.com/containers/image/v5/docker/reference" @@ -25,8 +26,13 @@ func (ir *ImageEngine) Remove(ctx context.Context, imagesArg []string, opts enti } func (ir *ImageEngine) List(ctx context.Context, opts entities.ImageListOptions) ([]*entities.ImageSummary, error) { - images, err := images.List(ir.ClientCxt, &opts.All, opts.Filters) + filters := make(map[string][]string, len(opts.Filter)) + for _, filter := range opts.Filter { + f := strings.Split(filter, "=") + filters[f[0]] = f[1:] + } + images, err := images.List(ir.ClientCxt, &opts.All, filters) if err != nil { return nil, err } @@ -61,7 +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) { - results, err := images.Prune(ir.ClientCxt, &opts.All, opts.Filters) + 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, filters) if err != nil { return nil, err } |