summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/tunnel/images.go
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2020-03-26 17:16:59 -0700
committerJhon Honce <jhonce@redhat.com>2020-03-26 18:32:44 -0700
commit581dd312af6ada92b96e16dd95d45967bde5fd8a (patch)
tree13e55270aa70201f5514b769410a736a07b102af /pkg/domain/infra/tunnel/images.go
parent1710eca4e930f7ed3a2b060029c627c1a66a2349 (diff)
downloadpodman-581dd312af6ada92b96e16dd95d45967bde5fd8a.tar.gz
podman-581dd312af6ada92b96e16dd95d45967bde5fd8a.tar.bz2
podman-581dd312af6ada92b96e16dd95d45967bde5fd8a.zip
V2 podman image prune
* Fixed header for `podman image ls` * Implemented prune `all` flag, preserved filter method for backwards capability * Updated binding tests Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'pkg/domain/infra/tunnel/images.go')
-rw-r--r--pkg/domain/infra/tunnel/images.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/pkg/domain/infra/tunnel/images.go b/pkg/domain/infra/tunnel/images.go
index 6a241641e..6a3adc9ee 100644
--- a/pkg/domain/infra/tunnel/images.go
+++ b/pkg/domain/infra/tunnel/images.go
@@ -2,7 +2,6 @@ package tunnel
import (
"context"
- "net/url"
images "github.com/containers/libpod/pkg/bindings/images"
"github.com/containers/libpod/pkg/domain/entities"
@@ -72,12 +71,17 @@ 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, url.Values{})
+ results, err := images.Prune(ir.ClientCxt, &opts.All, opts.Filters)
if err != nil {
return nil, err
}
- report := entities.ImagePruneReport{}
- copy(report.Report.Id, results)
+ report := entities.ImagePruneReport{
+ Report: entities.Report{
+ Id: results,
+ Err: nil,
+ },
+ Size: 0,
+ }
return &report, nil
}