diff options
author | Matthew Heon <mheon@redhat.com> | 2019-09-11 10:53:21 -0400 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2019-09-11 10:53:21 -0400 |
commit | 3c277a67d51eab51ab1baad0c59b8b9d92893320 (patch) | |
tree | 6bbb5b8747d86d73d975851c40a6e0728453e31b | |
parent | c1761ba1ac4155bab82fb9b847ccf96489b98265 (diff) | |
download | podman-3c277a67d51eab51ab1baad0c59b8b9d92893320.tar.gz podman-3c277a67d51eab51ab1baad0c59b8b9d92893320.tar.bz2 podman-3c277a67d51eab51ab1baad0c59b8b9d92893320.zip |
Add further fields to StorageContainer
This will be used when we allow 'podman ps' to display info on
storage containers instead of Libpod containers.
Signed-off-by: Matthew Heon <mheon@redhat.com>
-rw-r--r-- | libpod/runtime_cstorage.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libpod/runtime_cstorage.go b/libpod/runtime_cstorage.go index 586db5a1e..1e84aef4b 100644 --- a/libpod/runtime_cstorage.go +++ b/libpod/runtime_cstorage.go @@ -1,6 +1,8 @@ package libpod import ( + "time" + "github.com/containers/libpod/libpod/define" "github.com/containers/storage" "github.com/pkg/errors" @@ -12,6 +14,8 @@ import ( type StorageContainer struct { ID string Names []string + Image string + CreateTime time.Time PresentInLibpod bool } @@ -31,6 +35,8 @@ func (r *Runtime) ListStorageContainers() ([]*StorageContainer, error) { storageCtr := new(StorageContainer) storageCtr.ID = ctr.ID storageCtr.Names = ctr.Names + storageCtr.Image = ctr.ImageID + storageCtr.CreateTime = ctr.Created // Look up if container is in state hasCtr, err := r.state.HasContainer(ctr.ID) |