summaryrefslogtreecommitdiff
path: root/pkg/bindings
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-04-06 15:23:19 +0200
committerGitHub <noreply@github.com>2020-04-06 15:23:19 +0200
commitba64186750a23675f42744ca4203b524e7b1b378 (patch)
tree018be18b7e1f9dec076120ab2d9ca65a56eebb10 /pkg/bindings
parent8dea3c3419629de432bfaaa03d785fdb63b902d5 (diff)
parent7cbc09971a4d7322a6b29d86ef1d1fcb71f68f04 (diff)
downloadpodman-ba64186750a23675f42744ca4203b524e7b1b378.tar.gz
podman-ba64186750a23675f42744ca4203b524e7b1b378.tar.bz2
podman-ba64186750a23675f42744ca4203b524e7b1b378.zip
Merge pull request #5689 from sujil02/v2-pod-inspect
podmanv2 pod inspect
Diffstat (limited to 'pkg/bindings')
-rw-r--r--pkg/bindings/pods/pods.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/pkg/bindings/pods/pods.go b/pkg/bindings/pods/pods.go
index ae87c00e9..83847614a 100644
--- a/pkg/bindings/pods/pods.go
+++ b/pkg/bindings/pods/pods.go
@@ -7,7 +7,6 @@ import (
"strconv"
"strings"
- "github.com/containers/libpod/libpod"
"github.com/containers/libpod/pkg/api/handlers"
"github.com/containers/libpod/pkg/bindings"
"github.com/containers/libpod/pkg/domain/entities"
@@ -49,17 +48,19 @@ func Exists(ctx context.Context, nameOrID string) (bool, error) {
}
// Inspect returns low-level information about the given pod.
-func Inspect(ctx context.Context, nameOrID string) (*libpod.PodInspect, error) {
+func Inspect(ctx context.Context, nameOrID string) (*entities.PodInspectReport, error) {
+ var (
+ report entities.PodInspectReport
+ )
conn, err := bindings.GetClient(ctx)
if err != nil {
return nil, err
}
- inspect := libpod.PodInspect{}
response, err := conn.DoRequest(nil, http.MethodGet, "/pods/%s/json", nil, nameOrID)
if err != nil {
- return &inspect, err
+ return nil, err
}
- return &inspect, response.Process(&inspect)
+ return &report, response.Process(&report)
}
// Kill sends a SIGTERM to all the containers in a pod. The optional signal parameter