aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/api/handlers/libpod/images_pull.go18
-rw-r--r--pkg/api/handlers/swagger/swagger.go3
-rw-r--r--pkg/api/server/register_images.go6
-rw-r--r--pkg/api/server/server.go8
-rw-r--r--pkg/bindings/images/types.go12
-rw-r--r--pkg/bindings/images/types_pull_options.go54
-rw-r--r--pkg/domain/entities/images.go12
-rw-r--r--pkg/domain/infra/abi/images.go6
-rw-r--r--pkg/domain/infra/tunnel/images.go4
9 files changed, 61 insertions, 62 deletions
diff --git a/pkg/api/handlers/libpod/images_pull.go b/pkg/api/handlers/libpod/images_pull.go
index bacba006d..efb15b14d 100644
--- a/pkg/api/handlers/libpod/images_pull.go
+++ b/pkg/api/handlers/libpod/images_pull.go
@@ -30,12 +30,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"`
- OverrideVariant string `schema:"overrideVariant"`
- TLSVerify bool `schema:"tlsVerify"`
- AllTags bool `schema:"allTags"`
+ Reference string `schema:"reference"`
+ OS string `schema:"OS"`
+ Arch string `schema:"Arch"`
+ Variant string `schema:"Variant"`
+ TLSVerify bool `schema:"tlsVerify"`
+ AllTags bool `schema:"allTags"`
}{
TLSVerify: true,
}
@@ -83,9 +83,9 @@ func ImagesPull(w http.ResponseWriter, r *http.Request) {
// Setup the registry options
dockerRegistryOptions := image.DockerRegistryOptions{
DockerRegistryCreds: authConf,
- OSChoice: query.OverrideOS,
- ArchitectureChoice: query.OverrideArch,
- VariantChoice: query.OverrideVariant,
+ OSChoice: query.OS,
+ ArchitectureChoice: query.Arch,
+ VariantChoice: query.Variant,
}
if _, found := r.URL.Query()["tlsVerify"]; found {
dockerRegistryOptions.DockerInsecureSkipTLSVerify = types.NewOptionalBool(!query.TLSVerify)
diff --git a/pkg/api/handlers/swagger/swagger.go b/pkg/api/handlers/swagger/swagger.go
index 22670d795..32f041dd3 100644
--- a/pkg/api/handlers/swagger/swagger.go
+++ b/pkg/api/handlers/swagger/swagger.go
@@ -1,7 +1,6 @@
package swagger
import (
- "github.com/containers/podman/v2/libpod"
"github.com/containers/podman/v2/libpod/define"
"github.com/containers/podman/v2/libpod/image"
"github.com/containers/podman/v2/pkg/api/handlers"
@@ -166,7 +165,7 @@ type swagInspectPodResponse struct {
type swagInspectVolumeResponse struct {
// in:body
Body struct {
- libpod.InspectVolumeData
+ define.InspectVolumeData
}
}
diff --git a/pkg/api/server/register_images.go b/pkg/api/server/register_images.go
index 974dd287b..a7d350d50 100644
--- a/pkg/api/server/register_images.go
+++ b/pkg/api/server/register_images.go
@@ -930,15 +930,15 @@ func (s *APIServer) registerImagesHandlers(r *mux.Router) error {
// description: "username:password for the registry"
// type: string
// - in: query
- // name: overrideArch
+ // name: Arch
// description: Pull image for the specified architecture.
// type: string
// - in: query
- // name: overrideOS
+ // name: OS
// description: Pull image for the specified operating system.
// type: string
// - in: query
- // name: overrideVariant
+ // name: Variant
// description: Pull image for the specified variant.
// type: string
// - in: query
diff --git a/pkg/api/server/server.go b/pkg/api/server/server.go
index 046f6561c..d612041f6 100644
--- a/pkg/api/server/server.go
+++ b/pkg/api/server/server.go
@@ -179,15 +179,15 @@ func setupSystemd() {
func (s *APIServer) Serve() error {
setupSystemd()
- // Start the shutdown signal handler.
- if err := shutdown.Start(); err != nil {
- return err
- }
if err := shutdown.Register("server", func(sig os.Signal) error {
return s.Shutdown()
}); err != nil {
return err
}
+ // Start the shutdown signal handler.
+ if err := shutdown.Start(); err != nil {
+ return err
+ }
errChan := make(chan error, 1)
diff --git a/pkg/bindings/images/types.go b/pkg/bindings/images/types.go
index f216dd073..0248f2fa6 100644
--- a/pkg/bindings/images/types.go
+++ b/pkg/bindings/images/types.go
@@ -171,13 +171,13 @@ type PullOptions struct {
Username *string
// Password for authenticating against the registry.
Password *string
- // OverrideArch will overwrite the local architecture for image pulls.
- OverrideArch *string
- // OverrideOS will overwrite the local operating system (OS) for image
+ // Arch will overwrite the local architecture for image pulls.
+ Arch *string
+ // OS will overwrite the local operating system (OS) for image
// pulls.
- OverrideOS *string
- // OverrideVariant will overwrite the local variant for image pulls.
- OverrideVariant *string
+ OS *string
+ // Variant will overwrite the local variant for image pulls.
+ Variant *string
// Quiet can be specified to suppress pull progress when pulling. Ignored
// for remote calls.
Quiet *bool
diff --git a/pkg/bindings/images/types_pull_options.go b/pkg/bindings/images/types_pull_options.go
index 5163a6341..2bdf2b66e 100644
--- a/pkg/bindings/images/types_pull_options.go
+++ b/pkg/bindings/images/types_pull_options.go
@@ -168,52 +168,52 @@ func (o *PullOptions) GetPassword() string {
return *o.Password
}
-// WithOverrideArch
-func (o *PullOptions) WithOverrideArch(value string) *PullOptions {
+// WithArch
+func (o *PullOptions) WithArch(value string) *PullOptions {
v := &value
- o.OverrideArch = v
+ o.Arch = v
return o
}
-// GetOverrideArch
-func (o *PullOptions) GetOverrideArch() string {
- var overrideArch string
- if o.OverrideArch == nil {
- return overrideArch
+// GetArch
+func (o *PullOptions) GetArch() string {
+ var arch string
+ if o.Arch == nil {
+ return arch
}
- return *o.OverrideArch
+ return *o.Arch
}
-// WithOverrideOS
-func (o *PullOptions) WithOverrideOS(value string) *PullOptions {
+// WithOS
+func (o *PullOptions) WithOS(value string) *PullOptions {
v := &value
- o.OverrideOS = v
+ o.OS = v
return o
}
-// GetOverrideOS
-func (o *PullOptions) GetOverrideOS() string {
- var overrideOS string
- if o.OverrideOS == nil {
- return overrideOS
+// GetOS
+func (o *PullOptions) GetOS() string {
+ var oS string
+ if o.OS == nil {
+ return oS
}
- return *o.OverrideOS
+ return *o.OS
}
-// WithOverrideVariant
-func (o *PullOptions) WithOverrideVariant(value string) *PullOptions {
+// WithVariant
+func (o *PullOptions) WithVariant(value string) *PullOptions {
v := &value
- o.OverrideVariant = v
+ o.Variant = v
return o
}
-// GetOverrideVariant
-func (o *PullOptions) GetOverrideVariant() string {
- var overrideVariant string
- if o.OverrideVariant == nil {
- return overrideVariant
+// GetVariant
+func (o *PullOptions) GetVariant() string {
+ var variant string
+ if o.Variant == nil {
+ return variant
}
- return *o.OverrideVariant
+ return *o.Variant
}
// WithQuiet
diff --git a/pkg/domain/entities/images.go b/pkg/domain/entities/images.go
index 78a7d8aa7..ef40d5490 100644
--- a/pkg/domain/entities/images.go
+++ b/pkg/domain/entities/images.go
@@ -133,13 +133,13 @@ type ImagePullOptions struct {
Username string
// Password for authenticating against the registry.
Password string
- // OverrideArch will overwrite the local architecture for image pulls.
- OverrideArch string
- // OverrideOS will overwrite the local operating system (OS) for image
+ // Arch will overwrite the local architecture for image pulls.
+ Arch string
+ // OS will overwrite the local operating system (OS) for image
// pulls.
- OverrideOS string
- // OverrideVariant will overwrite the local variant for image pulls.
- OverrideVariant string
+ OS string
+ // Variant will overwrite the local variant for image pulls.
+ Variant string
// Quiet can be specified to suppress pull progress when pulling. Ignored
// for remote calls.
Quiet bool
diff --git a/pkg/domain/infra/abi/images.go b/pkg/domain/infra/abi/images.go
index 1288ab09b..8ca93e770 100644
--- a/pkg/domain/infra/abi/images.go
+++ b/pkg/domain/infra/abi/images.go
@@ -241,9 +241,9 @@ func pull(ctx context.Context, runtime *image.Runtime, rawImage string, options
dockerRegistryOptions := image.DockerRegistryOptions{
DockerRegistryCreds: registryCreds,
DockerCertPath: options.CertDir,
- OSChoice: options.OverrideOS,
- ArchitectureChoice: options.OverrideArch,
- VariantChoice: options.OverrideVariant,
+ OSChoice: options.OS,
+ ArchitectureChoice: options.Arch,
+ VariantChoice: options.Variant,
DockerInsecureSkipTLSVerify: options.SkipTLSVerify,
}
diff --git a/pkg/domain/infra/tunnel/images.go b/pkg/domain/infra/tunnel/images.go
index 2d686b2aa..0de756756 100644
--- a/pkg/domain/infra/tunnel/images.go
+++ b/pkg/domain/infra/tunnel/images.go
@@ -106,8 +106,8 @@ func (ir *ImageEngine) Prune(ctx context.Context, opts entities.ImagePruneOption
func (ir *ImageEngine) Pull(ctx context.Context, rawImage string, opts entities.ImagePullOptions) (*entities.ImagePullReport, error) {
options := new(images.PullOptions)
- options.WithAllTags(opts.AllTags).WithAuthfile(opts.Authfile).WithCertDir(opts.CertDir).WithOverrideArch(opts.OverrideArch).WithOverrideOS(opts.OverrideOS)
- options.WithOverrideVariant(opts.OverrideVariant).WithPassword(opts.Password).WithPullPolicy(opts.PullPolicy)
+ options.WithAllTags(opts.AllTags).WithAuthfile(opts.Authfile).WithCertDir(opts.CertDir).WithArch(opts.Arch).WithOS(opts.OS)
+ options.WithVariant(opts.Variant).WithPassword(opts.Password).WithPullPolicy(opts.PullPolicy)
if s := opts.SkipTLSVerify; s != types.OptionalBoolUndefined {
if s == types.OptionalBoolTrue {
options.WithSkipTLSVerify(true)