diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-04-16 08:50:11 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-16 08:50:11 -0700 |
commit | c1bafb8b5a70d2d9431f5e4a580fb09c890cc832 (patch) | |
tree | f3536a5448771678191eeb1dbae93f3047f3f72a | |
parent | 8857ba20a0651e8fa71762da90d774e3aa290883 (diff) | |
parent | e154249b46ad9c637be866b4763e40e9724090c8 (diff) | |
download | podman-c1bafb8b5a70d2d9431f5e4a580fb09c890cc832.tar.gz podman-c1bafb8b5a70d2d9431f5e4a580fb09c890cc832.tar.bz2 podman-c1bafb8b5a70d2d9431f5e4a580fb09c890cc832.zip |
Merge pull request #5844 from baude/apiv2filteridfix
allow filters to work when listing containers
-rw-r--r-- | pkg/api/handlers/libpod/containers.go | 6 |
1 files changed, 1 insertions, 5 deletions
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: "", |