summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2019-01-15 14:31:03 -0600
committerbaude <bbaude@redhat.com>2019-01-15 14:50:30 -0600
commit341f91da480bbf337dfb13107389307835b1f0c3 (patch)
treec1ace140bfd9cfdbae370404f27159748dc2c851 /cmd/podman
parent1b2f75298d98f59fac73a63599cdca3478bef835 (diff)
downloadpodman-341f91da480bbf337dfb13107389307835b1f0c3.tar.gz
podman-341f91da480bbf337dfb13107389307835b1f0c3.tar.bz2
podman-341f91da480bbf337dfb13107389307835b1f0c3.zip
Collaberative podman-remote container exists
Began frameout of container super structs for adapted methods. This allows for the use of container exists. Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/exists.go8
-rw-r--r--cmd/podman/images.go5
-rw-r--r--cmd/podman/varlink/io.podman.varlink2
3 files changed, 8 insertions, 7 deletions
diff --git a/cmd/podman/exists.go b/cmd/podman/exists.go
index e6d2c8a11..a957e1ef7 100644
--- a/cmd/podman/exists.go
+++ b/cmd/podman/exists.go
@@ -88,13 +88,13 @@ func containerExistsCmd(c *cli.Context) error {
if len(args) > 1 || len(args) < 1 {
return errors.New("you may only check for the existence of one container at a time")
}
- 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)
- if _, err := runtime.LookupContainer(args[0]); err != nil {
- if errors.Cause(err) == libpod.ErrNoSuchCtr {
+ defer runtime.Runtime.Shutdown(false)
+ if _, err := runtime.Runtime.LookupContainer(args[0]); err != nil {
+ if errors.Cause(err) == libpod.ErrNoSuchCtr || err.Error() == "io.podman.ContainerNotFound" {
os.Exit(1)
}
return err
diff --git a/cmd/podman/images.go b/cmd/podman/images.go
index 2b4187a9a..7f2fb7ae0 100644
--- a/cmd/podman/images.go
+++ b/cmd/podman/images.go
@@ -2,14 +2,15 @@ package main
import (
"context"
- "github.com/containers/libpod/cmd/podman/imagefilters"
- "github.com/containers/libpod/libpod/adapter"
"reflect"
"sort"
"strings"
"time"
"unicode"
+ "github.com/containers/libpod/cmd/podman/imagefilters"
+ "github.com/containers/libpod/libpod/adapter"
+
"github.com/containers/libpod/cmd/podman/formats"
"github.com/containers/libpod/libpod/image"
"github.com/docker/go-units"
diff --git a/cmd/podman/varlink/io.podman.varlink b/cmd/podman/varlink/io.podman.varlink
index a3e8c050e..c6f1d3f1b 100644
--- a/cmd/podman/varlink/io.podman.varlink
+++ b/cmd/podman/varlink/io.podman.varlink
@@ -61,7 +61,7 @@ type ImageSearch (
star_count: int
)
-# ListContainer is the returned struct for an individual container
+# ListContainerData is the returned struct for an individual container
type ListContainerData (
id: string,
image: string,