summaryrefslogtreecommitdiff
path: root/pkg/api/handlers/libpod
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2020-03-23 09:04:31 -0700
committerJhon Honce <jhonce@redhat.com>2020-03-24 16:06:01 -0700
commit1d7cb7cc48d06631e2bdfd0e25eeccc8e87b042f (patch)
treea9ce6c3b2e91a797cf8174d7a4e9d62eccb4d1e8 /pkg/api/handlers/libpod
parent0c084d9719772a9b68d5eb67114cf5bf001958b2 (diff)
downloadpodman-1d7cb7cc48d06631e2bdfd0e25eeccc8e87b042f.tar.gz
podman-1d7cb7cc48d06631e2bdfd0e25eeccc8e87b042f.tar.bz2
podman-1d7cb7cc48d06631e2bdfd0e25eeccc8e87b042f.zip
V2 podman images/image list
* Updated entities to support flags/options * Updated bindings caused by entities changes * Removed handlers.ImageSummary in favor of entities.ImageSummary * Introduced StringSet() container object to simply error checking Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'pkg/api/handlers/libpod')
-rw-r--r--pkg/api/handlers/libpod/images.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/api/handlers/libpod/images.go b/pkg/api/handlers/libpod/images.go
index b6f2f58e8..f8e666451 100644
--- a/pkg/api/handlers/libpod/images.go
+++ b/pkg/api/handlers/libpod/images.go
@@ -21,6 +21,7 @@ import (
image2 "github.com/containers/libpod/libpod/image"
"github.com/containers/libpod/pkg/api/handlers"
"github.com/containers/libpod/pkg/api/handlers/utils"
+ "github.com/containers/libpod/pkg/domain/entities"
"github.com/containers/libpod/pkg/util"
"github.com/gorilla/schema"
"github.com/pkg/errors"
@@ -101,7 +102,7 @@ func GetImages(w http.ResponseWriter, r *http.Request) {
utils.Error(w, "Something went wrong.", http.StatusInternalServerError, errors.Wrap(err, "Failed get images"))
return
}
- var summaries = make([]*handlers.ImageSummary, len(images))
+ var summaries = make([]*entities.ImageSummary, len(images))
for j, img := range images {
is, err := handlers.ImageToImageSummary(img)
if err != nil {
@@ -109,7 +110,7 @@ func GetImages(w http.ResponseWriter, r *http.Request) {
return
}
// libpod has additional fields that we need to populate.
- is.CreatedTime = img.Created()
+ is.Created = img.Created().Unix()
is.ReadOnly = img.IsReadOnly()
summaries[j] = is
}