summaryrefslogtreecommitdiff
path: root/pkg/ps
diff options
context:
space:
mode:
authorBrent Baude <bbaude@redhat.com>2020-04-07 15:10:15 -0500
committerBrent Baude <bbaude@redhat.com>2020-04-08 09:11:26 -0500
commit8ce23775a62b816c599e6d65c92985f62acc85c5 (patch)
tree1684970ce1400bb1f3d814a97cc4e941faaa87c1 /pkg/ps
parent522dcd604edb6630b06ce1e2184ef11c0ea889f0 (diff)
downloadpodman-8ce23775a62b816c599e6d65c92985f62acc85c5.tar.gz
podman-8ce23775a62b816c599e6d65c92985f62acc85c5.tar.bz2
podman-8ce23775a62b816c599e6d65c92985f62acc85c5.zip
v2podman ps alter formats
in order to get the go templating to work for custom input, we now use structure methods instead of template map funcs. this requires some manipulation of fields so that the funcs can have the proper names. 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 58fcc2c21..9217fa595 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{
- 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(),
+ 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(),
}
if opts.Pod && len(conConfig.Pod) > 0 {
pod, err := rt.GetPod(conConfig.Pod)