summaryrefslogtreecommitdiff
path: root/cmd/podman/inspect.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-03-15 10:06:49 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-03-20 16:20:12 +0000
commit38a1b2f16d210525eafcc845e7a9cce598207113 (patch)
tree5616a12d68ebe55138fbde85f936a6bc90d4c8fd /cmd/podman/inspect.go
parentecfa321288f10b70a59166f93296c77d262317fc (diff)
downloadpodman-38a1b2f16d210525eafcc845e7a9cce598207113.tar.gz
podman-38a1b2f16d210525eafcc845e7a9cce598207113.tar.bz2
podman-38a1b2f16d210525eafcc845e7a9cce598207113.zip
Image library stage 4 - create and commit
Migrate the podman create and commit subcommandis to leverage the images library. I also had to migrate the cmd/ portions of run and rmi. Signed-off-by: baude <bbaude@redhat.com> Closes: #498 Approved by: mheon
Diffstat (limited to 'cmd/podman/inspect.go')
-rw-r--r--cmd/podman/inspect.go16
1 files changed, 6 insertions, 10 deletions
diff --git a/cmd/podman/inspect.go b/cmd/podman/inspect.go
index cfd257af4..b691b7a12 100644
--- a/cmd/podman/inspect.go
+++ b/cmd/podman/inspect.go
@@ -128,31 +128,27 @@ func iterateInput(c *cli.Context, args []string, runtime *libpod.Runtime, inspec
break
}
case inspectTypeImage:
- newImage := runtime.NewImage(input)
- newImage.GetLocalImageName()
- image, err := runtime.GetImage(newImage.LocalName)
+ image, err := runtime.ImageRuntime().NewFromLocal(input)
if err != nil {
inspectError = errors.Wrapf(err, "error getting image %q", input)
break
}
- data, err = runtime.GetImageInspectInfo(*image)
+ data, err = libpod.GetImageData(image)
if err != nil {
- inspectError = errors.Wrapf(err, "error parsing image data %q", image.ID)
+ inspectError = errors.Wrapf(err, "error parsing image data %q", image.ID())
break
}
case inspectAll:
ctr, err := runtime.LookupContainer(input)
if err != nil {
- newImage := runtime.NewImage(input)
- newImage.GetLocalImageName()
- image, err := runtime.GetImage(newImage.LocalName)
+ image, err := runtime.ImageRuntime().NewFromLocal(input)
if err != nil {
inspectError = errors.Wrapf(err, "error getting image %q", input)
break
}
- data, err = runtime.GetImageInspectInfo(*image)
+ data, err = libpod.GetImageData(image)
if err != nil {
- inspectError = errors.Wrapf(err, "error parsing image data %q", image.ID)
+ inspectError = errors.Wrapf(err, "error parsing image data %q", image.ID())
break
}
} else {