mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-09-22 07:37:50 +00:00
Merge pull request #3989 from mheon/storage_containers_add_info
Add further fields to StorageContainer
This commit is contained in:
commit
42332a3ea2
1 changed files with 6 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue