summaryrefslogtreecommitdiff
path: root/pkg/api/handlers
diff options
context:
space:
mode:
authorSteve Taylor <steven@taylormuff.co.uk>2020-03-05 22:47:11 +0000
committerSteve Taylor <steven@taylormuff.co.uk>2020-03-05 22:47:11 +0000
commit1ef96364fe2a665ef6867adc3f9953b50232601c (patch)
tree273426cff2ef967034cd7f830d046e3f89b1e3f0 /pkg/api/handlers
parent9088a8a387c365d635d2db305872747532fc3b5a (diff)
downloadpodman-1ef96364fe2a665ef6867adc3f9953b50232601c.tar.gz
podman-1ef96364fe2a665ef6867adc3f9953b50232601c.tar.bz2
podman-1ef96364fe2a665ef6867adc3f9953b50232601c.zip
Map configured status to created to match docker API states
Signed-off-by: Steve Taylor <steven@taylormuff.co.uk>
Diffstat (limited to 'pkg/api/handlers')
-rw-r--r--pkg/api/handlers/types.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/pkg/api/handlers/types.go b/pkg/api/handlers/types.go
index 2930a9567..0c3548370 100644
--- a/pkg/api/handlers/types.go
+++ b/pkg/api/handlers/types.go
@@ -355,11 +355,17 @@ func LibpodToContainer(l *libpod.Container, infoData []define.InfoData) (*Contai
sizeRootFs int64
sizeRW int64
state define.ContainerStatus
+ stateStr string
)
if state, err = l.State(); err != nil {
return nil, err
}
+ stateStr = state.String()
+ if stateStr == "configured" {
+ stateStr = "created"
+ }
+
if sizeRW, err = l.RWSize(); err != nil {
return nil, err
}
@@ -378,7 +384,7 @@ func LibpodToContainer(l *libpod.Container, infoData []define.InfoData) (*Contai
SizeRw: sizeRW,
SizeRootFs: sizeRootFs,
Labels: l.Labels(),
- State: string(state),
+ State: stateStr,
Status: "",
HostConfig: struct {
NetworkMode string `json:",omitempty"`