summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-01-15 07:49:55 -0800
committerGitHub <noreply@github.com>2019-01-15 07:49:55 -0800
commit077156d45cfea915cc249e92a5a45280e5ed71e1 (patch)
tree10dcf43431d1830c2d9c43bc33f46317ba5bf7c7 /cmd
parent500fb2ca4c23288f5086d0ceede7166d3d376c1f (diff)
parentf9f72823ad5f773ee50b9e438c922a9cf0f3edcb (diff)
downloadpodman-077156d45cfea915cc249e92a5a45280e5ed71e1.tar.gz
podman-077156d45cfea915cc249e92a5a45280e5ed71e1.tar.bz2
podman-077156d45cfea915cc249e92a5a45280e5ed71e1.zip
Merge pull request #2156 from baude/remotermi
podman remote client -- add rmi
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/rmi.go17
1 files changed, 8 insertions, 9 deletions
diff --git a/cmd/podman/rmi.go b/cmd/podman/rmi.go
index 5e8ac81a2..58a78a924 100644
--- a/cmd/podman/rmi.go
+++ b/cmd/podman/rmi.go
@@ -4,8 +4,7 @@ import (
"fmt"
"os"
- "github.com/containers/libpod/cmd/podman/libpodruntime"
- "github.com/containers/libpod/libpod/image"
+ "github.com/containers/libpod/libpod/adapter"
"github.com/containers/storage"
"github.com/pkg/errors"
"github.com/urfave/cli"
@@ -58,11 +57,11 @@ func rmiCmd(c *cli.Context) error {
return err
}
removeAll := c.Bool("all")
- runtime, err := libpodruntime.GetRuntime(c)
+ runtime, err := adapter.GetRuntime(c)
if err != nil {
return errors.Wrapf(err, "could not get runtime")
}
- defer runtime.Shutdown(false)
+ defer runtime.Runtime.Shutdown(false)
args := c.Args()
if len(args) == 0 && !removeAll {
@@ -74,7 +73,7 @@ func rmiCmd(c *cli.Context) error {
images := args[:]
- removeImage := func(img *image.Image) {
+ removeImage := func(img *adapter.ContainerImage) {
deleted = true
msg, deleteErr = runtime.RemoveImage(ctx, img, c.Bool("force"))
if deleteErr != nil {
@@ -91,8 +90,8 @@ func rmiCmd(c *cli.Context) error {
}
if removeAll {
- var imagesToDelete []*image.Image
- imagesToDelete, err = runtime.ImageRuntime().GetImages()
+ var imagesToDelete []*adapter.ContainerImage
+ imagesToDelete, err = runtime.GetImages()
if err != nil {
return errors.Wrapf(err, "unable to query local images")
}
@@ -112,7 +111,7 @@ func rmiCmd(c *cli.Context) error {
removeImage(i)
}
lastNumberofImages = len(imagesToDelete)
- imagesToDelete, err = runtime.ImageRuntime().GetImages()
+ imagesToDelete, err = runtime.GetImages()
if err != nil {
return err
}
@@ -130,7 +129,7 @@ func rmiCmd(c *cli.Context) error {
// See https://github.com/containers/libpod/issues/930 as
// an exemplary inconsistency issue.
for _, i := range images {
- newImage, err := runtime.ImageRuntime().NewFromLocal(i)
+ newImage, err := runtime.NewImageFromLocal(i)
if err != nil {
fmt.Fprintln(os.Stderr, err)
continue