diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-04-25 03:38:03 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-25 03:38:03 -0400 |
commit | ba6356280a86531d3cda7016859aef98bb3d8272 (patch) | |
tree | 74b087a2cf032240f4d3566154b5ac1ade62553d /pkg | |
parent | f65f3320e1124c94db053c1f811487920ae2a70e (diff) | |
parent | 0d83f4b768af46b95d6c5a652b2c56c2ae2093f0 (diff) | |
download | podman-ba6356280a86531d3cda7016859aef98bb3d8272.tar.gz podman-ba6356280a86531d3cda7016859aef98bb3d8272.tar.bz2 podman-ba6356280a86531d3cda7016859aef98bb3d8272.zip |
Merge pull request #13988 from rhatdan/apiv2
Allow filtering of "removing", it is a valid status
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/domain/filters/containers.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/domain/filters/containers.go b/pkg/domain/filters/containers.go index 0557e75d6..3e5b9cad9 100644 --- a/pkg/domain/filters/containers.go +++ b/pkg/domain/filters/containers.go @@ -52,8 +52,8 @@ func GenerateContainerFilterFuncs(filter string, filterValues []string, r *libpo }, nil case "status": for _, filterValue := range filterValues { - if !util.StringInSlice(filterValue, []string{"created", "running", "paused", "stopped", "exited", "unknown"}) { - return nil, errors.Errorf("%s is not a valid status", filterValue) + if _, err := define.StringToContainerStatus(filterValue); err != nil { + return nil, err } } return func(c *libpod.Container) bool { |