summaryrefslogtreecommitdiff
path: root/pkg/ps
diff options
context:
space:
mode:
authorBrent Baude <bbaude@redhat.com>2020-04-14 09:02:28 -0500
committerBrent Baude <bbaude@redhat.com>2020-04-14 09:40:43 -0500
commit830f3a4462953b3698a21031db3964d0f0ae63b3 (patch)
tree26730d69cf6a96990b933bf3af2de3f2e891c4a4 /pkg/ps
parent004826653f2a8b064af8c1f055b1a402f4060d1c (diff)
downloadpodman-830f3a4462953b3698a21031db3964d0f0ae63b3.tar.gz
podman-830f3a4462953b3698a21031db3964d0f0ae63b3.tar.bz2
podman-830f3a4462953b3698a21031db3964d0f0ae63b3.zip
v2podman ps revert structure changes
reverting name changes to the listcontainer structure because it negatively impacted the direct consumption of the restful API. instead we now use a local structure in the CLI to modify the output as needed. Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/ps')
-rw-r--r--pkg/ps/ps.go34
1 files changed, 17 insertions, 17 deletions
diff --git a/pkg/ps/ps.go b/pkg/ps/ps.go
index 9217fa595..58fcc2c21 100644
--- a/pkg/ps/ps.go
+++ b/pkg/ps/ps.go
@@ -148,23 +148,23 @@ func ListContainerBatch(rt *libpod.Runtime, ctr *libpod.Container, opts entities
}
ps := entities.ListContainer{
- Cmd: conConfig.Command,
- Created: conConfig.CreatedTime.Unix(),
- Exited: exited,
- ExitCode: exitCode,
- ExitedAt: exitedTime.Unix(),
- ID: conConfig.ID,
- Image: conConfig.RootfsImageName,
- IsInfra: conConfig.IsInfra,
- Labels: conConfig.Labels,
- Mounts: ctr.UserVolumes(),
- ContainerNames: []string{conConfig.Name},
- Pid: pid,
- Pod: conConfig.Pod,
- PortMappings: conConfig.PortMappings,
- ContainerSize: size,
- StartedAt: startedTime.Unix(),
- ContainerState: conState.String(),
+ Command: conConfig.Command,
+ Created: conConfig.CreatedTime.Unix(),
+ Exited: exited,
+ ExitCode: exitCode,
+ ExitedAt: exitedTime.Unix(),
+ ID: conConfig.ID,
+ Image: conConfig.RootfsImageName,
+ IsInfra: conConfig.IsInfra,
+ Labels: conConfig.Labels,
+ Mounts: ctr.UserVolumes(),
+ Names: []string{conConfig.Name},
+ Pid: pid,
+ Pod: conConfig.Pod,
+ Ports: conConfig.PortMappings,
+ Size: size,
+ StartedAt: startedTime.Unix(),
+ State: conState.String(),
}
if opts.Pod && len(conConfig.Pod) > 0 {
pod, err := rt.GetPod(conConfig.Pod)