diff options
author | baude <bbaude@redhat.com> | 2019-06-25 08:40:19 -0500 |
---|---|---|
committer | baude <bbaude@redhat.com> | 2019-06-27 07:56:24 -0500 |
commit | 8561b996447793999a6465f9b9e3f0f7bbea2c6a (patch) | |
tree | 133cf8d959934eac882535e6b572aee5d0acf3c5 /pkg/adapter/runtime.go | |
parent | 58a1777f518657ff12744bb69ccf2dab3d429625 (diff) | |
download | podman-8561b996447793999a6465f9b9e3f0f7bbea2c6a.tar.gz podman-8561b996447793999a6465f9b9e3f0f7bbea2c6a.tar.bz2 podman-8561b996447793999a6465f9b9e3f0f7bbea2c6a.zip |
libpod removal from main (phase 2)
this is phase 2 for the removal of libpod from main.
Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/adapter/runtime.go')
-rw-r--r-- | pkg/adapter/runtime.go | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/pkg/adapter/runtime.go b/pkg/adapter/runtime.go index 37ee1b737..dd77b3a3e 100644 --- a/pkg/adapter/runtime.go +++ b/pkg/adapter/runtime.go @@ -5,6 +5,7 @@ package adapter import ( "bufio" "context" + "github.com/containers/libpod/libpod/define" "io" "io/ioutil" "os" @@ -313,8 +314,13 @@ func IsImageNotFound(err error) bool { } // HealthCheck is a wrapper to same named function in libpod -func (r *LocalRuntime) HealthCheck(c *cliconfig.HealthCheckValues) (libpod.HealthCheckStatus, error) { - return r.Runtime.HealthCheck(c.InputArgs[0]) +func (r *LocalRuntime) HealthCheck(c *cliconfig.HealthCheckValues) (string, error) { + output := "unhealthy" + status, err := r.Runtime.HealthCheck(c.InputArgs[0]) + if status == libpod.HealthCheckSuccess { + output = "healthy" + } + return output, err } // Events is a wrapper to libpod to obtain libpod/podman events @@ -395,8 +401,8 @@ func (r *LocalRuntime) GetPodsByStatus(statuses []string) ([]*libpod.Pod, error) } // GetVersion is an alias to satisfy interface{} -func (r *LocalRuntime) GetVersion() (libpod.Version, error) { - return libpod.GetVersion() +func (r *LocalRuntime) GetVersion() (define.Version, error) { + return define.GetVersion() } // RemoteEndpoint resolve interface requirement |