diff options
author | Sujil02 <sushah@redhat.com> | 2020-03-31 00:53:50 -0400 |
---|---|---|
committer | Sujil02 <sushah@redhat.com> | 2020-04-01 15:10:49 -0400 |
commit | 7cbc09971a4d7322a6b29d86ef1d1fcb71f68f04 (patch) | |
tree | b8d482db0ee3f9d119ef208bae7ed03332aa0455 /pkg/bindings/pods/pods.go | |
parent | 0a163720351710be314c729086e8d288680ff0a8 (diff) | |
download | podman-7cbc09971a4d7322a6b29d86ef1d1fcb71f68f04.tar.gz podman-7cbc09971a4d7322a6b29d86ef1d1fcb71f68f04.tar.bz2 podman-7cbc09971a4d7322a6b29d86ef1d1fcb71f68f04.zip |
podmanv2 pod inspect
Add the ability to inspect pod in podmanv2
Signed-off-by: Sujil02 <sushah@redhat.com>
Diffstat (limited to 'pkg/bindings/pods/pods.go')
-rw-r--r-- | pkg/bindings/pods/pods.go | 11 |
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 |