summaryrefslogtreecommitdiff
path: root/pkg/bindings
diff options
context:
space:
mode:
authorBrent Baude <bbaude@redhat.com>2020-03-26 13:37:09 -0500
committerBrent Baude <bbaude@redhat.com>2020-03-26 15:54:26 -0500
commit2fa78938a94e90e41755b68dd1af36f5b817ed55 (patch)
treef6a1161387751d8a413c0ebe66ba253f4a91a1af /pkg/bindings
parent6a46a87d08bd1e9ddda3dd3c9c30d21d2226a654 (diff)
downloadpodman-2fa78938a94e90e41755b68dd1af36f5b817ed55.tar.gz
podman-2fa78938a94e90e41755b68dd1af36f5b817ed55.tar.bz2
podman-2fa78938a94e90e41755b68dd1af36f5b817ed55.zip
podmanv2 container inspect
add ability to inspect a container Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/bindings')
-rw-r--r--pkg/bindings/containers/containers.go5
-rw-r--r--pkg/bindings/containers/healthcheck.go6
2 files changed, 5 insertions, 6 deletions
diff --git a/pkg/bindings/containers/containers.go b/pkg/bindings/containers/containers.go
index 231b6f232..c2f10345f 100644
--- a/pkg/bindings/containers/containers.go
+++ b/pkg/bindings/containers/containers.go
@@ -6,7 +6,6 @@ import (
"net/url"
"strconv"
- "github.com/containers/libpod/libpod"
"github.com/containers/libpod/libpod/define"
lpapiv2 "github.com/containers/libpod/pkg/api/handlers/libpod"
"github.com/containers/libpod/pkg/bindings"
@@ -106,7 +105,7 @@ func Remove(ctx context.Context, nameOrID string, force, volumes *bool) error {
// or a partial/full ID. The size bool determines whether the size of the container's root filesystem
// should be calculated. Calculating the size of a container requires extra work from the filesystem and
// is therefore slower.
-func Inspect(ctx context.Context, nameOrID string, size *bool) (*libpod.InspectContainerData, error) {
+func Inspect(ctx context.Context, nameOrID string, size *bool) (*define.InspectContainerData, error) {
conn, err := bindings.GetClient(ctx)
if err != nil {
return nil, err
@@ -119,7 +118,7 @@ func Inspect(ctx context.Context, nameOrID string, size *bool) (*libpod.InspectC
if err != nil {
return nil, err
}
- inspect := libpod.InspectContainerData{}
+ inspect := define.InspectContainerData{}
return &inspect, response.Process(&inspect)
}
diff --git a/pkg/bindings/containers/healthcheck.go b/pkg/bindings/containers/healthcheck.go
index 85cc2814c..2b783ac73 100644
--- a/pkg/bindings/containers/healthcheck.go
+++ b/pkg/bindings/containers/healthcheck.go
@@ -4,19 +4,19 @@ import (
"context"
"net/http"
- "github.com/containers/libpod/libpod"
+ "github.com/containers/libpod/libpod/define"
"github.com/containers/libpod/pkg/bindings"
)
// RunHealthCheck executes the container's healthcheck and returns the health status of the
// container.
-func RunHealthCheck(ctx context.Context, nameOrID string) (*libpod.HealthCheckResults, error) {
+func RunHealthCheck(ctx context.Context, nameOrID string) (*define.HealthCheckResults, error) {
conn, err := bindings.GetClient(ctx)
if err != nil {
return nil, err
}
var (
- status libpod.HealthCheckResults
+ status define.HealthCheckResults
)
response, err := conn.DoRequest(nil, http.MethodGet, "/containers/%s/healthcheck", nil, nameOrID)
if err != nil {