diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-02-12 16:59:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-12 16:59:45 +0100 |
commit | ee27c39f85507993c0a3dfe3c4dfab4c7b7e5e00 (patch) | |
tree | 6e02056b44d75afb4cdb032c7772dab30bc1c26c /pkg/varlinkapi/util.go | |
parent | bdf537f4fc983c30c945297d9ee33891a127f9bd (diff) | |
parent | 2448129e4d27b95ce172f0ab5ac32c891aae7519 (diff) | |
download | podman-ee27c39f85507993c0a3dfe3c4dfab4c7b7e5e00.tar.gz podman-ee27c39f85507993c0a3dfe3c4dfab4c7b7e5e00.tar.bz2 podman-ee27c39f85507993c0a3dfe3c4dfab4c7b7e5e00.zip |
Merge pull request #2264 from larskarlitski/varlink-api
Make varlink API more idiomatic
Diffstat (limited to 'pkg/varlinkapi/util.go')
-rw-r--r-- | pkg/varlinkapi/util.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/varlinkapi/util.go b/pkg/varlinkapi/util.go index a80c8db41..7f6f95d3b 100644 --- a/pkg/varlinkapi/util.go +++ b/pkg/varlinkapi/util.go @@ -15,7 +15,7 @@ func getContext() context.Context { return context.TODO() } -func makeListContainer(containerID string, batchInfo shared.BatchContainerStruct) iopodman.ListContainerData { +func makeListContainer(containerID string, batchInfo shared.BatchContainerStruct) iopodman.Container { var ( mounts []iopodman.ContainerMount ports []iopodman.ContainerPortMappings @@ -56,12 +56,12 @@ func makeListContainer(containerID string, batchInfo shared.BatchContainerStruct Ipc: ns.IPC, } - lc := iopodman.ListContainerData{ + lc := iopodman.Container{ Id: containerID, Image: batchInfo.ConConfig.RootfsImageName, Imageid: batchInfo.ConConfig.RootfsImageID, Command: batchInfo.ConConfig.Spec.Process.Args, - Createdat: batchInfo.ConConfig.CreatedTime.String(), + Createdat: batchInfo.ConConfig.CreatedTime.Format(time.RFC3339), Runningfor: time.Since(batchInfo.ConConfig.CreatedTime).String(), Status: batchInfo.ConState.String(), Ports: ports, @@ -107,7 +107,7 @@ func makeListPod(pod *libpod.Pod, batchInfo shared.PsOptions) (iopodman.ListPodD listPodsContainers = append(listPodsContainers, makeListPodContainers(ctr.ID(), batchInfo)) } listPod := iopodman.ListPodData{ - Createdat: pod.CreatedTime().String(), + Createdat: pod.CreatedTime().Format(time.RFC3339), Id: pod.ID(), Name: pod.Name(), Status: status, |