diff options
Diffstat (limited to 'pkg/domain/infra/tunnel/manifest.go')
-rw-r--r-- | pkg/domain/infra/tunnel/manifest.go | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/pkg/domain/infra/tunnel/manifest.go b/pkg/domain/infra/tunnel/manifest.go index 696d0a963..2fe43aad0 100644 --- a/pkg/domain/infra/tunnel/manifest.go +++ b/pkg/domain/infra/tunnel/manifest.go @@ -5,7 +5,6 @@ import ( "encoding/json" "errors" "fmt" - "strings" "github.com/containers/image/v5/types" "github.com/containers/podman/v4/pkg/bindings/images" @@ -48,20 +47,9 @@ func (ir *ImageEngine) ManifestInspect(_ context.Context, name string) ([]byte, // ManifestAdd adds images to the manifest list func (ir *ImageEngine) ManifestAdd(_ context.Context, name string, imageNames []string, opts entities.ManifestAddOptions) (string, error) { - options := new(manifests.AddOptions).WithAll(opts.All).WithArch(opts.Arch).WithVariant(opts.Variant) - options.WithFeatures(opts.Features).WithImages(imageNames).WithOS(opts.OS).WithOSVersion(opts.OSVersion) - options.WithUsername(opts.Username).WithPassword(opts.Password).WithAuthfile(opts.Authfile) - if len(opts.Annotation) != 0 { - annotations := make(map[string]string) - for _, annotationSpec := range opts.Annotation { - spec := strings.SplitN(annotationSpec, "=", 2) - if len(spec) != 2 { - return "", fmt.Errorf("no value given for annotation %q", spec[0]) - } - annotations[spec[0]] = spec[1] - } - options.WithAnnotation(annotations) - } + options := new(manifests.AddOptions).WithAll(opts.All).WithAnnotation(opts.Annotation).WithArch(opts.Arch) + options.WithVariant(opts.Variant).WithFeatures(opts.Features).WithImages(imageNames).WithOS(opts.OS) + options.WithOSVersion(opts.OSVersion).WithUsername(opts.Username).WithPassword(opts.Password).WithAuthfile(opts.Authfile) if s := opts.SkipTLSVerify; s != types.OptionalBoolUndefined { if s == types.OptionalBoolTrue { options.WithSkipTLSVerify(true) |