From e154249b46ad9c637be866b4763e40e9724090c8 Mon Sep 17 00:00:00 2001 From: Brent Baude Date: Thu, 16 Apr 2020 09:21:44 -0500 Subject: allow filters to work when listing containers enable filters when listing containers on the libpod endpoint. Fixes: #5841 Signed-off-by: Brent Baude --- pkg/api/handlers/libpod/containers.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'pkg/api') diff --git a/pkg/api/handlers/libpod/containers.go b/pkg/api/handlers/libpod/containers.go index 086bef847..3902bdc9b 100644 --- a/pkg/api/handlers/libpod/containers.go +++ b/pkg/api/handlers/libpod/containers.go @@ -32,10 +32,6 @@ func ContainerExists(w http.ResponseWriter, r *http.Request) { } func ListContainers(w http.ResponseWriter, r *http.Request) { - var ( - //filterFuncs []libpod.ContainerFilter - //pss []entities.ListContainer - ) decoder := r.Context().Value("decoder").(*schema.Decoder) query := struct { All bool `schema:"all"` @@ -54,10 +50,10 @@ func ListContainers(w http.ResponseWriter, r *http.Request) { errors.Wrapf(err, "Failed to parse parameters for %s", r.URL.String())) return } - runtime := r.Context().Value("runtime").(*libpod.Runtime) opts := entities.ContainerListOptions{ All: query.All, + Filters: query.Filters, Last: query.Last, Size: query.Size, Sort: "", -- cgit v1.2.3-54-g00ecf