aboutsummaryrefslogtreecommitdiff
path: root/pkg/api
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-08-25 07:33:44 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2020-08-28 09:36:11 -0400
commit3c6603a2f88ab5ba38bf58334417aaa90c458c06 (patch)
treecc31266b9fadabd34b9bbe56ea5abc002f83fdee /pkg/api
parentf49b98c61019ac04dccd6b3d5bc0c6af7857b17e (diff)
downloadpodman-3c6603a2f88ab5ba38bf58334417aaa90c458c06.tar.gz
podman-3c6603a2f88ab5ba38bf58334417aaa90c458c06.tar.bz2
podman-3c6603a2f88ab5ba38bf58334417aaa90c458c06.zip
Add support for variant when pulling images
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'pkg/api')
-rw-r--r--pkg/api/handlers/libpod/images.go12
-rw-r--r--pkg/api/server/register_images.go8
2 files changed, 13 insertions, 7 deletions
diff --git a/pkg/api/handlers/libpod/images.go b/pkg/api/handlers/libpod/images.go
index 51013acf1..8d3fc4e00 100644
--- a/pkg/api/handlers/libpod/images.go
+++ b/pkg/api/handlers/libpod/images.go
@@ -338,11 +338,12 @@ func ImagesPull(w http.ResponseWriter, r *http.Request) {
runtime := r.Context().Value("runtime").(*libpod.Runtime)
decoder := r.Context().Value("decoder").(*schema.Decoder)
query := struct {
- Reference string `schema:"reference"`
- OverrideOS string `schema:"overrideOS"`
- OverrideArch string `schema:"overrideArch"`
- TLSVerify bool `schema:"tlsVerify"`
- AllTags bool `schema:"allTags"`
+ Reference string `schema:"reference"`
+ OverrideOS string `schema:"overrideOS"`
+ OverrideArch string `schema:"overrideArch"`
+ OverrideVariant string `schema:"overrideVariant"`
+ TLSVerify bool `schema:"tlsVerify"`
+ AllTags bool `schema:"allTags"`
}{
TLSVerify: true,
}
@@ -393,6 +394,7 @@ func ImagesPull(w http.ResponseWriter, r *http.Request) {
DockerRegistryCreds: authConf,
OSChoice: query.OverrideOS,
ArchitectureChoice: query.OverrideArch,
+ VariantChoice: query.OverrideVariant,
}
if _, found := r.URL.Query()["tlsVerify"]; found {
dockerRegistryOptions.DockerInsecureSkipTLSVerify = types.NewOptionalBool(!query.TLSVerify)
diff --git a/pkg/api/server/register_images.go b/pkg/api/server/register_images.go
index 748e3fb11..64258a073 100644
--- a/pkg/api/server/register_images.go
+++ b/pkg/api/server/register_images.go
@@ -905,12 +905,16 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// description: "username:password for the registry"
// type: string
// - in: query
+ // name: overrideArch
+ // description: Pull image for the specified architecture.
+ // type: string
+ // - in: query
// name: overrideOS
// description: Pull image for the specified operating system.
// type: string
// - in: query
- // name: overrideArch
- // description: Pull image for the specified architecture.
+ // name: overrideVariant
+ // description: Pull image for the specified variant.
// type: string
// - in: query
// name: tlsVerify