summaryrefslogtreecommitdiff
path: root/pkg/api/handlers/compat/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/api/handlers/compat/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/api/handlers/compat/images.go')
-rw-r--r--pkg/api/handlers/compat/images.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/api/handlers/compat/images.go b/pkg/api/handlers/compat/images.go
index cce718f54..354a13bf5 100644
--- a/pkg/api/handlers/compat/images.go
+++ b/pkg/api/handlers/compat/images.go
@@ -64,6 +64,7 @@ func PruneImages(w http.ResponseWriter, r *http.Request) {
runtime := r.Context().Value("runtime").(*libpod.Runtime)
query := struct {
+ All bool
Filters map[string][]string `schema:"filters"`
}{
// This is where you can override the golang default value for one of fields
@@ -80,7 +81,7 @@ func PruneImages(w http.ResponseWriter, r *http.Request) {
filters = append(filters, fmt.Sprintf("%s=%s", k, val))
}
}
- pruneCids, err := runtime.ImageRuntime().PruneImages(r.Context(), false, filters)
+ pruneCids, err := runtime.ImageRuntime().PruneImages(r.Context(), query.All, filters)
if err != nil {
utils.InternalServerError(w, err)
return