diff options
author | baude <bbaude@redhat.com> | 2018-03-22 10:17:50 -0500 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-03-23 15:35:37 +0000 |
commit | f7c8dd5836002f3bf85a7bbe6c949cdece5194df (patch) | |
tree | 6cee5a91ff32b016efcf8e9dbcff398b42ce5c4a /cmd/podman/load.go | |
parent | 8ca3bcc85d6bbf05e7838b20bfb1ae74afa8d35d (diff) | |
download | podman-f7c8dd5836002f3bf85a7bbe6c949cdece5194df.tar.gz podman-f7c8dd5836002f3bf85a7bbe6c949cdece5194df.tar.bz2 podman-f7c8dd5836002f3bf85a7bbe6c949cdece5194df.zip |
Stage 4 Image cleanup
Cull funcs from runtime_img.go which are no longer needed. Also, fix any remaining
spots that use the old image technique.
Signed-off-by: baude <bbaude@redhat.com>
Closes: #532
Approved by: mheon
Diffstat (limited to 'cmd/podman/load.go')
-rw-r--r-- | cmd/podman/load.go | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/cmd/podman/load.go b/cmd/podman/load.go index d3a15a2ae..8146f4c5d 100644 --- a/cmd/podman/load.go +++ b/cmd/podman/load.go @@ -8,6 +8,7 @@ import ( "github.com/pkg/errors" "github.com/projectatomic/libpod/libpod" + libpodImage "github.com/projectatomic/libpod/libpod/image" "github.com/urfave/cli" ) @@ -44,6 +45,7 @@ func loadCmd(c *cli.Context) error { args := c.Args() var image string + if len(args) == 1 { image = args[0] } @@ -96,28 +98,23 @@ func loadCmd(c *cli.Context) error { writer = os.Stderr } - options := libpod.CopyOptions{ - SignaturePolicyPath: c.String("signature-policy"), - Writer: writer, - } - src := libpod.DockerArchive + ":" + input - imgName, err := runtime.PullImage(src, options) + newImage, err := runtime.ImageRuntime().New(src, c.String("signature-policy"), "", writer, &libpodImage.DockerRegistryOptions{}, libpodImage.SigningOptions{}) if err != nil { // generate full src name with specified image:tag fullSrc := libpod.OCIArchive + ":" + input if image != "" { fullSrc = fullSrc + ":" + image } - imgName, err = runtime.PullImage(fullSrc, options) + newImage, err = runtime.ImageRuntime().New(fullSrc, c.String("signature-policy"), "", writer, &libpodImage.DockerRegistryOptions{}, libpodImage.SigningOptions{}) if err != nil { src = libpod.DirTransport + ":" + input - imgName, err = runtime.PullImage(src, options) + newImage, err = runtime.ImageRuntime().New(src, c.String("signature-policy"), "", writer, &libpodImage.DockerRegistryOptions{}, libpodImage.SigningOptions{}) if err != nil { return errors.Wrapf(err, "error pulling %q", src) } } } - fmt.Println("Loaded image: ", imgName) + fmt.Println("Loaded image: ", newImage.InputName) return nil } |