summaryrefslogtreecommitdiff
path: root/pkg/api/handlers
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/api/handlers')
-rw-r--r--pkg/api/handlers/libpod/images.go22
1 files changed, 14 insertions, 8 deletions
diff --git a/pkg/api/handlers/libpod/images.go b/pkg/api/handlers/libpod/images.go
index d59a83342..cddf4c205 100644
--- a/pkg/api/handlers/libpod/images.go
+++ b/pkg/api/handlers/libpod/images.go
@@ -367,10 +367,13 @@ func ImagesImport(w http.ResponseWriter, r *http.Request) {
runtime := r.Context().Value(api.RuntimeKey).(*libpod.Runtime)
decoder := r.Context().Value(api.DecoderKey).(*schema.Decoder)
query := struct {
- Changes []string `schema:"changes"`
- Message string `schema:"message"`
- Reference string `schema:"reference"`
- URL string `schema:"URL"`
+ Changes []string `schema:"changes"`
+ Message string `schema:"message"`
+ Reference string `schema:"reference"`
+ URL string `schema:"URL"`
+ OS string `schema:"OS"`
+ Architecture string `schema:"Architecture"`
+ Variant string `schema:"Variant"`
}{
// Add defaults here once needed.
}
@@ -402,10 +405,13 @@ func ImagesImport(w http.ResponseWriter, r *http.Request) {
imageEngine := abi.ImageEngine{Libpod: runtime}
importOptions := entities.ImageImportOptions{
- Changes: query.Changes,
- Message: query.Message,
- Reference: query.Reference,
- Source: source,
+ Changes: query.Changes,
+ Message: query.Message,
+ Reference: query.Reference,
+ OS: query.OS,
+ Architecture: query.Architecture,
+ Variant: query.Variant,
+ Source: source,
}
report, err := imageEngine.Import(r.Context(), importOptions)
if err != nil {