summaryrefslogtreecommitdiff
path: root/pkg/adapter/images_remote.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-02-24 03:13:25 +0100
committerGitHub <noreply@github.com>2019-02-24 03:13:25 +0100
commitcc4adddeb77ef38ecd36be04e95685b2e7b8b86c (patch)
tree9dffece816ad32c2c0b7651cb7c88be70954a88f /pkg/adapter/images_remote.go
parent8e4be923b83aadfaa58569326119890ed9c1d459 (diff)
parent4bf973a9f61eae3b02925a42ccfa784baeb917dc (diff)
downloadpodman-cc4adddeb77ef38ecd36be04e95685b2e7b8b86c.tar.gz
podman-cc4adddeb77ef38ecd36be04e95685b2e7b8b86c.tar.bz2
podman-cc4adddeb77ef38ecd36be04e95685b2e7b8b86c.zip
Merge pull request #2413 from baude/remotepodstop
Enable more podman-remote pod commands
Diffstat (limited to 'pkg/adapter/images_remote.go')
-rw-r--r--pkg/adapter/images_remote.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/pkg/adapter/images_remote.go b/pkg/adapter/images_remote.go
new file mode 100644
index 000000000..e7b38dccc
--- /dev/null
+++ b/pkg/adapter/images_remote.go
@@ -0,0 +1,24 @@
+// +build remoteclient
+
+package adapter
+
+import (
+ "context"
+ "encoding/json"
+
+ iopodman "github.com/containers/libpod/cmd/podman/varlink"
+ "github.com/containers/libpod/pkg/inspect"
+)
+
+// Inspect returns returns an ImageData struct from over a varlink connection
+func (i *ContainerImage) Inspect(ctx context.Context) (*inspect.ImageData, error) {
+ reply, err := iopodman.InspectImage().Call(i.Runtime.Conn, i.ID())
+ if err != nil {
+ return nil, err
+ }
+ data := inspect.ImageData{}
+ if err := json.Unmarshal([]byte(reply), &data); err != nil {
+ return nil, err
+ }
+ return &data, nil
+}