summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/tunnel/images.go
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2020-03-31 17:02:10 -0700
committerJhon Honce <jhonce@redhat.com>2020-04-01 08:07:43 -0700
commit46e3b2efb84580cc12b0bc5ad0863957b88ae202 (patch)
treedbe09731facf6a80406a62a6ca95b3f1514c2047 /pkg/domain/infra/tunnel/images.go
parent82cbebcbea7f92be7e82bc11fdf1b30d7e194cdc (diff)
downloadpodman-46e3b2efb84580cc12b0bc5ad0863957b88ae202.tar.gz
podman-46e3b2efb84580cc12b0bc5ad0863957b88ae202.tar.bz2
podman-46e3b2efb84580cc12b0bc5ad0863957b88ae202.zip
V2 podman inspect
* Expose podman container inspect * Expose podman image inspect Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'pkg/domain/infra/tunnel/images.go')
-rw-r--r--pkg/domain/infra/tunnel/images.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/pkg/domain/infra/tunnel/images.go b/pkg/domain/infra/tunnel/images.go
index d7f281243..6a8b9be37 100644
--- a/pkg/domain/infra/tunnel/images.go
+++ b/pkg/domain/infra/tunnel/images.go
@@ -145,3 +145,15 @@ func (ir *ImageEngine) Untag(ctx context.Context, nameOrId string, tags []string
}
return nil
}
+
+func (ir *ImageEngine) Inspect(_ context.Context, names []string, opts entities.InspectOptions) (*entities.ImageInspectReport, error) {
+ report := entities.ImageInspectReport{}
+ for _, id := range names {
+ r, err := images.GetImage(ir.ClientCxt, id, &opts.Size)
+ if err != nil {
+ report.Errors[id] = err
+ }
+ report.Images = append(report.Images, r)
+ }
+ return &report, nil
+}