summaryrefslogtreecommitdiff
path: root/cmd/podman/shared/pod.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-06-27 16:01:45 +0200
committerGitHub <noreply@github.com>2019-06-27 16:01:45 +0200
commit0906b32087c3d7db6844873a7d46241430a1b065 (patch)
tree3c68a0c2d6e2e5742b4cc314136ddb8e9877ec75 /cmd/podman/shared/pod.go
parent5e3d63a53c0762c99c5eb7863ef7fc8d0b2e8eec (diff)
parent8561b996447793999a6465f9b9e3f0f7bbea2c6a (diff)
downloadpodman-0906b32087c3d7db6844873a7d46241430a1b065.tar.gz
podman-0906b32087c3d7db6844873a7d46241430a1b065.tar.bz2
podman-0906b32087c3d7db6844873a7d46241430a1b065.zip
Merge pull request #3442 from baude/removelibpodfrommainphase2
libpod removal from main (phase 2)
Diffstat (limited to 'cmd/podman/shared/pod.go')
-rw-r--r--cmd/podman/shared/pod.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/cmd/podman/shared/pod.go b/cmd/podman/shared/pod.go
index 3f4cb0312..ab6d1f144 100644
--- a/cmd/podman/shared/pod.go
+++ b/cmd/podman/shared/pod.go
@@ -4,6 +4,7 @@ import (
"strconv"
"github.com/containers/libpod/libpod"
+ "github.com/containers/libpod/libpod/define"
"github.com/cri-o/ocicni/pkg/ocicni"
"github.com/docker/go-connections/nat"
"github.com/pkg/errors"
@@ -29,7 +30,7 @@ func GetPodStatus(pod *libpod.Pod) (string, error) {
return CreatePodStatusResults(ctrStatuses)
}
-func CreatePodStatusResults(ctrStatuses map[string]libpod.ContainerStatus) (string, error) {
+func CreatePodStatusResults(ctrStatuses map[string]define.ContainerStatus) (string, error) {
ctrNum := len(ctrStatuses)
if ctrNum == 0 {
return PodStateCreated, nil
@@ -43,15 +44,15 @@ func CreatePodStatusResults(ctrStatuses map[string]libpod.ContainerStatus) (stri
}
for _, ctrStatus := range ctrStatuses {
switch ctrStatus {
- case libpod.ContainerStateExited:
+ case define.ContainerStateExited:
fallthrough
- case libpod.ContainerStateStopped:
+ case define.ContainerStateStopped:
statuses[PodStateStopped]++
- case libpod.ContainerStateRunning:
+ case define.ContainerStateRunning:
statuses[PodStateRunning]++
- case libpod.ContainerStatePaused:
+ case define.ContainerStatePaused:
statuses[PodStatePaused]++
- case libpod.ContainerStateCreated, libpod.ContainerStateConfigured:
+ case define.ContainerStateCreated, define.ContainerStateConfigured:
statuses[PodStateCreated]++
default:
statuses[PodStateErrored]++