Move libkpod/image libkpod/layer to libpod/images and libpod/layers
Begin moving image and layer handling out of libkpod into libpod. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
parent
47ef2f66df
commit
e18e962238
26 changed files with 272 additions and 104 deletions
|
@ -4,7 +4,7 @@ import (
|
|||
"os"
|
||||
|
||||
"github.com/containers/storage"
|
||||
libkpodimage "github.com/kubernetes-incubator/cri-o/libkpod/image"
|
||||
"github.com/kubernetes-incubator/cri-o/libpod/images"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/urfave/cli"
|
||||
|
@ -83,7 +83,7 @@ func saveCmd(c *cli.Context) error {
|
|||
func saveImage(store storage.Store, opts saveOptions) error {
|
||||
dst := dockerArchive + opts.output
|
||||
|
||||
pushOpts := libkpodimage.CopyOptions{
|
||||
pushOpts := images.CopyOptions{
|
||||
SignaturePolicyPath: "",
|
||||
Store: store,
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ func saveImage(store storage.Store, opts saveOptions) error {
|
|||
// future pull requests will fix this
|
||||
for _, image := range opts.images {
|
||||
dest := dst + ":" + image
|
||||
if err := libkpodimage.PushImage(image, dest, pushOpts); err != nil {
|
||||
if err := images.PushImage(image, dest, pushOpts); err != nil {
|
||||
return errors.Wrapf(err, "unable to save %q", image)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue