summaryrefslogtreecommitdiff
path: root/pkg/bindings
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-09-29 13:22:22 +0200
committerGitHub <noreply@github.com>2022-09-29 13:22:22 +0200
commitf52feded3ce6c1ad2af046ab774fbc2b9c832487 (patch)
tree227b374d8677368691ac48bab7603771ffecc540 /pkg/bindings
parent3269ee9fea1bab7735a3668db9e6631b4fa933b9 (diff)
parent32f54a81ed797597827123b671b6e73194354327 (diff)
downloadpodman-f52feded3ce6c1ad2af046ab774fbc2b9c832487.tar.gz
podman-f52feded3ce6c1ad2af046ab774fbc2b9c832487.tar.bz2
podman-f52feded3ce6c1ad2af046ab774fbc2b9c832487.zip
Merge pull request #15988 from sstosh/manifest-annotate-remote
remote: fix manifest add --annotation
Diffstat (limited to 'pkg/bindings')
-rw-r--r--pkg/bindings/manifests/manifests.go6
-rw-r--r--pkg/bindings/manifests/types.go14
-rw-r--r--pkg/bindings/manifests/types_add_options.go6
-rw-r--r--pkg/bindings/manifests/types_modify_options.go6
4 files changed, 16 insertions, 16 deletions
diff --git a/pkg/bindings/manifests/manifests.go b/pkg/bindings/manifests/manifests.go
index d987e51d8..0da8df709 100644
--- a/pkg/bindings/manifests/manifests.go
+++ b/pkg/bindings/manifests/manifests.go
@@ -11,7 +11,7 @@ import (
"strconv"
"strings"
- "github.com/containers/image/v5/manifest"
+ "github.com/containers/common/libimage"
imageTypes "github.com/containers/image/v5/types"
"github.com/containers/podman/v4/pkg/auth"
"github.com/containers/podman/v4/pkg/bindings"
@@ -71,7 +71,7 @@ func Exists(ctx context.Context, name string, options *ExistsOptions) (bool, err
}
// Inspect returns a manifest list for a given name.
-func Inspect(ctx context.Context, name string, _ *InspectOptions) (*manifest.Schema2List, error) {
+func Inspect(ctx context.Context, name string, _ *InspectOptions) (*libimage.ManifestListData, error) {
conn, err := bindings.GetClient(ctx)
if err != nil {
return nil, err
@@ -83,7 +83,7 @@ func Inspect(ctx context.Context, name string, _ *InspectOptions) (*manifest.Sch
}
defer response.Body.Close()
- var list manifest.Schema2List
+ var list libimage.ManifestListData
return &list, response.Process(&list)
}
diff --git a/pkg/bindings/manifests/types.go b/pkg/bindings/manifests/types.go
index fec3f9d13..501feb5a1 100644
--- a/pkg/bindings/manifests/types.go
+++ b/pkg/bindings/manifests/types.go
@@ -22,7 +22,7 @@ type ExistsOptions struct {
// AddOptions are optional options for adding manifest lists
type AddOptions struct {
All *bool
- Annotation map[string]string
+ Annotation []string
Arch *string
Features []string
Images []string
@@ -46,12 +46,12 @@ type ModifyOptions struct {
// Operation values are "update", "remove" and "annotate". This allows the service to
// efficiently perform each update on a manifest list.
Operation *string
- All *bool // All when true, operate on all images in a manifest list that may be included in Images
- Annotations map[string]string // Annotations to add to manifest list
- Arch *string // Arch overrides the architecture for the image
- Features []string // Feature list for the image
- Images []string // Images is an optional list of images to add/remove to/from manifest list depending on operation
- OS *string // OS overrides the operating system for the image
+ All *bool // All when true, operate on all images in a manifest list that may be included in Images
+ Annotations []string // Annotations to add to manifest list
+ Arch *string // Arch overrides the architecture for the image
+ Features []string // Feature list for the image
+ Images []string // Images is an optional list of images to add/remove to/from manifest list depending on operation
+ OS *string // OS overrides the operating system for the image
// OS features for the image
OSFeatures []string `json:"os_features" schema:"os_features"`
// OSVersion overrides the operating system for the image
diff --git a/pkg/bindings/manifests/types_add_options.go b/pkg/bindings/manifests/types_add_options.go
index 5ba1cc5fa..b3e8b8134 100644
--- a/pkg/bindings/manifests/types_add_options.go
+++ b/pkg/bindings/manifests/types_add_options.go
@@ -33,15 +33,15 @@ func (o *AddOptions) GetAll() bool {
}
// WithAnnotation set field Annotation to given value
-func (o *AddOptions) WithAnnotation(value map[string]string) *AddOptions {
+func (o *AddOptions) WithAnnotation(value []string) *AddOptions {
o.Annotation = value
return o
}
// GetAnnotation returns value of field Annotation
-func (o *AddOptions) GetAnnotation() map[string]string {
+func (o *AddOptions) GetAnnotation() []string {
if o.Annotation == nil {
- var z map[string]string
+ var z []string
return z
}
return o.Annotation
diff --git a/pkg/bindings/manifests/types_modify_options.go b/pkg/bindings/manifests/types_modify_options.go
index ab00cb2c5..12f549577 100644
--- a/pkg/bindings/manifests/types_modify_options.go
+++ b/pkg/bindings/manifests/types_modify_options.go
@@ -48,15 +48,15 @@ func (o *ModifyOptions) GetAll() bool {
}
// WithAnnotations set annotations to add to manifest list
-func (o *ModifyOptions) WithAnnotations(value map[string]string) *ModifyOptions {
+func (o *ModifyOptions) WithAnnotations(value []string) *ModifyOptions {
o.Annotations = value
return o
}
// GetAnnotations returns value of annotations to add to manifest list
-func (o *ModifyOptions) GetAnnotations() map[string]string {
+func (o *ModifyOptions) GetAnnotations() []string {
if o.Annotations == nil {
- var z map[string]string
+ var z []string
return z
}
return o.Annotations