From 581dd312af6ada92b96e16dd95d45967bde5fd8a Mon Sep 17 00:00:00 2001 From: Jhon Honce Date: Thu, 26 Mar 2020 17:16:59 -0700 Subject: 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 --- pkg/api/handlers/compat/images.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pkg/api/handlers/compat/images.go') 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 -- cgit v1.2.3-54-g00ecf