summaryrefslogtreecommitdiff
path: root/libpod/adapter/images_remote.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2019-01-17 08:43:34 -0600
committerbaude <bbaude@redhat.com>2019-01-18 15:43:11 -0600
commiteadaa5fb420e3e8e6b0e277ac88cc528f9950ee4 (patch)
treea846f4b272229aaf51e4cca161bfe9b5268d7613 /libpod/adapter/images_remote.go
parentf897cccbdeb2c1e92b9a1b866128a67d5ccb957d (diff)
downloadpodman-eadaa5fb420e3e8e6b0e277ac88cc528f9950ee4.tar.gz
podman-eadaa5fb420e3e8e6b0e277ac88cc528f9950ee4.tar.bz2
podman-eadaa5fb420e3e8e6b0e277ac88cc528f9950ee4.zip
podman-remote inspect
base enablement of the inspect command. Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'libpod/adapter/images_remote.go')
-rw-r--r--libpod/adapter/images_remote.go19
1 files changed, 13 insertions, 6 deletions
diff --git a/libpod/adapter/images_remote.go b/libpod/adapter/images_remote.go
index 77b0629a7..e7b38dccc 100644
--- a/libpod/adapter/images_remote.go
+++ b/libpod/adapter/images_remote.go
@@ -3,15 +3,22 @@
package adapter
import (
- "github.com/containers/libpod/libpod"
+ "context"
+ "encoding/json"
+
+ iopodman "github.com/containers/libpod/cmd/podman/varlink"
+ "github.com/containers/libpod/pkg/inspect"
)
-// Images returns information for the host system and its components
-func (r RemoteRuntime) Images() ([]libpod.InfoData, error) {
- conn, err := r.Connect()
+// 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
}
- _ = conn
- return nil, nil
+ data := inspect.ImageData{}
+ if err := json.Unmarshal([]byte(reply), &data); err != nil {
+ return nil, err
+ }
+ return &data, nil
}