summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-03-08 08:05:45 -0800
committerGitHub <noreply@github.com>2019-03-08 08:05:45 -0800
commit90319bcf5202bb54e6e6bf59e4b887fa462e4714 (patch)
tree275c7f8a10b617a5efa010762f4594167efad87e
parent8c54126b6f60d216350cda29a5a5ed8b216854fe (diff)
parentfbd8f33a59f18d48df5c3e07d9dab87fe788bcf0 (diff)
downloadpodman-90319bcf5202bb54e6e6bf59e4b887fa462e4714.tar.gz
podman-90319bcf5202bb54e6e6bf59e4b887fa462e4714.tar.bz2
podman-90319bcf5202bb54e6e6bf59e4b887fa462e4714.zip
Merge pull request #2586 from mheon/fix_ps_states
Remove 'podman ps' restarting filter and fix stopped
-rw-r--r--cmd/podman/ps.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/podman/ps.go b/cmd/podman/ps.go
index 9793d67f8..6caac2406 100644
--- a/cmd/podman/ps.go
+++ b/cmd/podman/ps.go
@@ -419,7 +419,7 @@ func generateContainerFilterFuncs(filter, filterValue string, runtime *libpod.Ru
return false
}, nil
case "status":
- if !util.StringInSlice(filterValue, []string{"created", "restarting", "running", "paused", "exited", "unknown"}) {
+ if !util.StringInSlice(filterValue, []string{"created", "running", "paused", "exited", "unknown"}) {
return nil, errors.Errorf("%s is not a valid status", filterValue)
}
return func(c *libpod.Container) bool {
@@ -430,6 +430,8 @@ func generateContainerFilterFuncs(filter, filterValue string, runtime *libpod.Ru
state := status.String()
if status == libpod.ContainerStateConfigured {
state = "created"
+ } else if status == libpod.ContainerStateStopped {
+ state = "exited"
}
return state == filterValue
}, nil