diff options
author | Sujil02 <sushah@redhat.com> | 2020-03-09 20:07:55 -0400 |
---|---|---|
committer | Sujil02 <sushah@redhat.com> | 2020-03-17 17:46:20 -0400 |
commit | 15326f051d6938e5d3cdcec2f95f86ad3aa5c5fa (patch) | |
tree | 45efba0ddc6a4e5edf821f2d44e847b8d744abe2 /pkg/api/handlers/libpod/pods.go | |
parent | f3a28de3249032e5d7be14114b126c7bddf3d479 (diff) | |
download | podman-15326f051d6938e5d3cdcec2f95f86ad3aa5c5fa.tar.gz podman-15326f051d6938e5d3cdcec2f95f86ad3aa5c5fa.tar.bz2 podman-15326f051d6938e5d3cdcec2f95f86ad3aa5c5fa.zip |
Filter pods through pod list api
Refactored current filter pods flow through the shared pod functions
so filter pod functionalities can be shared between api and cmd.
Signed-off-by: Sujil02 <sushah@redhat.com>
Diffstat (limited to 'pkg/api/handlers/libpod/pods.go')
-rw-r--r-- | pkg/api/handlers/libpod/pods.go | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/pkg/api/handlers/libpod/pods.go b/pkg/api/handlers/libpod/pods.go index f93c8f8d5..27ec64d89 100644 --- a/pkg/api/handlers/libpod/pods.go +++ b/pkg/api/handlers/libpod/pods.go @@ -103,7 +103,6 @@ func PodCreate(w http.ResponseWriter, r *http.Request) { func Pods(w http.ResponseWriter, r *http.Request) { var ( - runtime = r.Context().Value("runtime").(*libpod.Runtime) podInspectData []*libpod.PodInspect ) decoder := r.Context().Value("decoder").(*schema.Decoder) @@ -118,12 +117,8 @@ func Pods(w http.ResponseWriter, r *http.Request) { return } - if len(query.Filters) > 0 { - utils.Error(w, "filters are not implemented yet", http.StatusInternalServerError, define.ErrNotImplemented) - return - } + pods, err := utils.GetPods(w, r) - pods, err := runtime.GetAllPods() if err != nil { utils.Error(w, "Something went wrong", http.StatusInternalServerError, err) return |