summaryrefslogtreecommitdiff
path: root/cmd/podman/inspect.go
diff options
context:
space:
mode:
authorumohnani8 <umohnani@redhat.com>2018-04-18 16:48:35 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-04-19 14:08:47 +0000
commit27107fdac1d75f97caab47cd13efb1d9900cf350 (patch)
treef5edafbb52505829b15e19ea6a9e66f4440e862b /cmd/podman/inspect.go
parent6a9dbf3305e93e5e1c3bff09402a9b801c935fbd (diff)
downloadpodman-27107fdac1d75f97caab47cd13efb1d9900cf350.tar.gz
podman-27107fdac1d75f97caab47cd13efb1d9900cf350.tar.bz2
podman-27107fdac1d75f97caab47cd13efb1d9900cf350.zip
Vendor in latest containers/image and contaners/storage
Made necessary changes to functions to include contex.Context wherever needed Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #640 Approved by: baude
Diffstat (limited to 'cmd/podman/inspect.go')
-rw-r--r--cmd/podman/inspect.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/cmd/podman/inspect.go b/cmd/podman/inspect.go
index 4c4154d88..ce6ccd77f 100644
--- a/cmd/podman/inspect.go
+++ b/cmd/podman/inspect.go
@@ -1,6 +1,7 @@
package main
import (
+ "context"
"encoding/json"
"strings"
@@ -86,7 +87,7 @@ func inspectCmd(c *cli.Context) error {
inspectType = inspectTypeContainer
}
- inspectedObjects, iterateErr := iterateInput(c, args, runtime, inspectType)
+ inspectedObjects, iterateErr := iterateInput(getContext(), c, args, runtime, inspectType)
var out formats.Writer
if outputFormat != "" && outputFormat != formats.JSONString {
@@ -102,7 +103,7 @@ func inspectCmd(c *cli.Context) error {
}
// func iterateInput iterates the images|containers the user has requested and returns the inspect data and error
-func iterateInput(c *cli.Context, args []string, runtime *libpod.Runtime, inspectType string) ([]interface{}, error) {
+func iterateInput(ctx context.Context, c *cli.Context, args []string, runtime *libpod.Runtime, inspectType string) ([]interface{}, error) {
var (
data interface{}
inspectedItems []interface{}
@@ -133,7 +134,7 @@ func iterateInput(c *cli.Context, args []string, runtime *libpod.Runtime, inspec
inspectError = errors.Wrapf(err, "error getting image %q", input)
break
}
- data, err = image.Inspect()
+ data, err = image.Inspect(ctx)
if err != nil {
inspectError = errors.Wrapf(err, "error parsing image data %q", image.ID())
break
@@ -146,7 +147,7 @@ func iterateInput(c *cli.Context, args []string, runtime *libpod.Runtime, inspec
inspectError = errors.Wrapf(err, "error getting image %q", input)
break
}
- data, err = image.Inspect()
+ data, err = image.Inspect(ctx)
if err != nil {
inspectError = errors.Wrapf(err, "error parsing image data %q", image.ID())
break