summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2019-01-14 15:55:00 -0600
committerbaude <bbaude@redhat.com>2019-01-15 08:19:26 -0600
commitf9f72823ad5f773ee50b9e438c922a9cf0f3edcb (patch)
tree77351c49cc9de1c622b9bd38d18e1b37d31a1ff0 /cmd/podman
parent1ffb0fc2d1d0e1acb43791591ebf2225a460df6d (diff)
downloadpodman-f9f72823ad5f773ee50b9e438c922a9cf0f3edcb.tar.gz
podman-f9f72823ad5f773ee50b9e438c922a9cf0f3edcb.tar.bz2
podman-f9f72823ad5f773ee50b9e438c922a9cf0f3edcb.zip
podman remote integrations tests
add exists and rmi tests back in ... Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/rmi.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/cmd/podman/rmi.go b/cmd/podman/rmi.go
index 482e6fff4..58a78a924 100644
--- a/cmd/podman/rmi.go
+++ b/cmd/podman/rmi.go
@@ -2,9 +2,9 @@ package main
import (
"fmt"
- "github.com/containers/libpod/libpod/adapter"
"os"
+ "github.com/containers/libpod/libpod/adapter"
"github.com/containers/storage"
"github.com/pkg/errors"
"github.com/urfave/cli"
@@ -57,11 +57,11 @@ func rmiCmd(c *cli.Context) error {
return err
}
removeAll := c.Bool("all")
- localRuntime, err := adapter.GetRuntime(c)
+ runtime, err := adapter.GetRuntime(c)
if err != nil {
return errors.Wrapf(err, "could not get runtime")
}
- defer localRuntime.Runtime.Shutdown(false)
+ defer runtime.Runtime.Shutdown(false)
args := c.Args()
if len(args) == 0 && !removeAll {
@@ -75,7 +75,7 @@ func rmiCmd(c *cli.Context) error {
removeImage := func(img *adapter.ContainerImage) {
deleted = true
- msg, deleteErr = localRuntime.RemoveImage(ctx, img, c.Bool("force"))
+ msg, deleteErr = runtime.RemoveImage(ctx, img, c.Bool("force"))
if deleteErr != nil {
if errors.Cause(deleteErr) == storage.ErrImageUsedByContainer {
fmt.Printf("A container associated with containers/storage, i.e. via Buildah, CRI-O, etc., may be associated with this image: %-12.12s\n", img.ID())
@@ -91,7 +91,7 @@ func rmiCmd(c *cli.Context) error {
if removeAll {
var imagesToDelete []*adapter.ContainerImage
- imagesToDelete, err = localRuntime.GetImages()
+ imagesToDelete, err = runtime.GetImages()
if err != nil {
return errors.Wrapf(err, "unable to query local images")
}
@@ -111,7 +111,7 @@ func rmiCmd(c *cli.Context) error {
removeImage(i)
}
lastNumberofImages = len(imagesToDelete)
- imagesToDelete, err = localRuntime.GetImages()
+ imagesToDelete, err = runtime.GetImages()
if err != nil {
return err
}
@@ -129,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 := localRuntime.NewImageFromLocal(i)
+ newImage, err := runtime.NewImageFromLocal(i)
if err != nil {
fmt.Fprintln(os.Stderr, err)
continue