diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-04-01 22:54:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-01 22:54:22 +0200 |
commit | 0f357be5aeaa5dc651659cf0945a58780641e77d (patch) | |
tree | 77c502c42324db5aa5635b65f615c6a3c4e96fde /pkg/bindings/images/images.go | |
parent | 0a163720351710be314c729086e8d288680ff0a8 (diff) | |
parent | 8500ce6b9ab0050b925ec3b899495cb2cc8d367f (diff) | |
download | podman-0f357be5aeaa5dc651659cf0945a58780641e77d.tar.gz podman-0f357be5aeaa5dc651659cf0945a58780641e77d.tar.bz2 podman-0f357be5aeaa5dc651659cf0945a58780641e77d.zip |
Merge pull request #5686 from baude/v2load
podmanv2 load
Diffstat (limited to 'pkg/bindings/images/images.go')
-rw-r--r-- | pkg/bindings/images/images.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/bindings/images/images.go b/pkg/bindings/images/images.go index ddc67bebc..6c739494b 100644 --- a/pkg/bindings/images/images.go +++ b/pkg/bindings/images/images.go @@ -91,11 +91,11 @@ func History(ctx context.Context, nameOrID string) ([]*handlers.HistoryResponse, return history, response.Process(&history) } -func Load(ctx context.Context, r io.Reader, name *string) (string, error) { - var id handlers.IDResponse +func Load(ctx context.Context, r io.Reader, name *string) (*entities.ImageLoadReport, error) { + var report entities.ImageLoadReport conn, err := bindings.GetClient(ctx) if err != nil { - return "", err + return nil, err } params := url.Values{} if name != nil { @@ -103,9 +103,9 @@ func Load(ctx context.Context, r io.Reader, name *string) (string, error) { } response, err := conn.DoRequest(r, http.MethodPost, "/images/load", params) if err != nil { - return "", err + return nil, err } - return id.ID, response.Process(&id) + return &report, response.Process(&report) } // Remove deletes an image from local storage. The optional force parameter will forcibly remove |