From 1ef96364fe2a665ef6867adc3f9953b50232601c Mon Sep 17 00:00:00 2001 From: Steve Taylor Date: Thu, 5 Mar 2020 22:47:11 +0000 Subject: Map configured status to created to match docker API states Signed-off-by: Steve Taylor --- pkg/api/handlers/types.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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"` -- cgit v1.2.3-54-g00ecf