summaryrefslogtreecommitdiff
path: root/libpod/define
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-12-02 16:31:11 +0100
committerGitHub <noreply@github.com>2019-12-02 16:31:11 +0100
commite4275b3453598c3cdcf1ee00ff73c55780aef444 (patch)
tree15915f36125dfd9db9d56440f2a89f0610aa52fc /libpod/define
parent39c705e9405faa4d02b71165d05eec1e7bb44d93 (diff)
parent6c405b5fbcc83ba49c187087eb4e1ccc1a7ff147 (diff)
downloadpodman-e4275b3453598c3cdcf1ee00ff73c55780aef444.tar.gz
podman-e4275b3453598c3cdcf1ee00ff73c55780aef444.tar.bz2
podman-e4275b3453598c3cdcf1ee00ff73c55780aef444.zip
Merge pull request #4493 from mheon/add_removing_state
Add ContainerStateRemoving
Diffstat (limited to 'libpod/define')
-rw-r--r--libpod/define/containerstate.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/libpod/define/containerstate.go b/libpod/define/containerstate.go
index ab2527b3e..e7d258e21 100644
--- a/libpod/define/containerstate.go
+++ b/libpod/define/containerstate.go
@@ -25,6 +25,9 @@ const (
// ContainerStateExited indicates the the container has stopped and been
// cleaned up
ContainerStateExited ContainerStatus = iota
+ // ContainerStateRemoving indicates the container is in the process of
+ // being removed.
+ ContainerStateRemoving ContainerStatus = iota
)
// ContainerStatus returns a string representation for users
@@ -45,6 +48,8 @@ func (t ContainerStatus) String() string {
return "paused"
case ContainerStateExited:
return "exited"
+ case ContainerStateRemoving:
+ return "removing"
}
return "bad state"
}
@@ -67,6 +72,8 @@ func StringToContainerStatus(status string) (ContainerStatus, error) {
return ContainerStatePaused, nil
case ContainerStateExited.String():
return ContainerStateExited, nil
+ case ContainerStateRemoving.String():
+ return ContainerStateRemoving, nil
default:
return ContainerStateUnknown, errors.Wrapf(ErrInvalidArg, "unknown container state: %s", status)
}