mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-08-05 00:15:44 +00:00
swagger: rename artifact annotation field"
Signed-off-by: Rajkaran Yadav <yadavrajkaran854@gmail.com>
This commit is contained in:
parent
e31bb4d170
commit
7018130ef8
4 changed files with 18 additions and 18 deletions
|
|
@ -680,14 +680,14 @@ func ManifestModify(w http.ResponseWriter, r *http.Request) {
|
||||||
// We waited until after the extraction goroutine finished to ensure
|
// We waited until after the extraction goroutine finished to ensure
|
||||||
// that we'd pick up its changes to the ArtifactFiles list.
|
// that we'd pick up its changes to the ArtifactFiles list.
|
||||||
manifestAddArtifactOptions := entities.ManifestAddArtifactOptions{
|
manifestAddArtifactOptions := entities.ManifestAddArtifactOptions{
|
||||||
Type: body.ArtifactType,
|
Type: body.ArtifactType,
|
||||||
LayerType: body.ArtifactLayerType,
|
LayerType: body.ArtifactLayerType,
|
||||||
ConfigType: body.ArtifactConfigType,
|
ConfigType: body.ArtifactConfigType,
|
||||||
Config: body.ArtifactConfig,
|
Config: body.ArtifactConfig,
|
||||||
ExcludeTitles: body.ArtifactExcludeTitles,
|
ExcludeTitles: body.ArtifactExcludeTitles,
|
||||||
Annotations: body.ArtifactAnnotations,
|
ArtifactAnnotations: body.ArtifactAnnotations,
|
||||||
Subject: body.ArtifactSubject,
|
Subject: body.ArtifactSubject,
|
||||||
Files: body.ArtifactFiles,
|
Files: body.ArtifactFiles,
|
||||||
}
|
}
|
||||||
id, err := imageEngine.ManifestAddArtifact(r.Context(), name, body.ArtifactFiles, manifestAddArtifactOptions)
|
id, err := imageEngine.ManifestAddArtifact(r.Context(), name, body.ArtifactFiles, manifestAddArtifactOptions)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
|
|
@ -53,14 +53,14 @@ type ManifestAddOptions struct {
|
||||||
type ManifestAddArtifactOptions struct {
|
type ManifestAddArtifactOptions struct {
|
||||||
ManifestAnnotateOptions
|
ManifestAnnotateOptions
|
||||||
// Note to future maintainers: keep these fields synchronized with ManifestModifyOptions!
|
// Note to future maintainers: keep these fields synchronized with ManifestModifyOptions!
|
||||||
Type *string `json:"artifact_type" schema:"artifact_type"`
|
Type *string `json:"artifact_type" schema:"artifact_type"`
|
||||||
LayerType string `json:"artifact_layer_type" schema:"artifact_layer_type"`
|
LayerType string `json:"artifact_layer_type" schema:"artifact_layer_type"`
|
||||||
ConfigType string `json:"artifact_config_type" schema:"artifact_config_type"`
|
ConfigType string `json:"artifact_config_type" schema:"artifact_config_type"`
|
||||||
Config string `json:"artifact_config" schema:"artifact_config"`
|
Config string `json:"artifact_config" schema:"artifact_config"`
|
||||||
ExcludeTitles bool `json:"artifact_exclude_titles" schema:"artifact_exclude_titles"`
|
ExcludeTitles bool `json:"artifact_exclude_titles" schema:"artifact_exclude_titles"`
|
||||||
Annotations map[string]string `json:"artifact_annotations" schema:"artifact_annotations"`
|
ArtifactAnnotations map[string]string `json:"artifact_annotations" schema:"artifact_annotations"`
|
||||||
Subject string `json:"artifact_subject" schema:"artifact_subject"`
|
Subject string `json:"artifact_subject" schema:"artifact_subject"`
|
||||||
Files []string `json:"artifact_files" schema:"-"`
|
Files []string `json:"artifact_files" schema:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ManifestAnnotateOptions provides model for annotating manifest list
|
// ManifestAnnotateOptions provides model for annotating manifest list
|
||||||
|
|
|
||||||
|
|
@ -362,7 +362,7 @@ func (ir *ImageEngine) ManifestAddArtifact(ctx context.Context, name string, fil
|
||||||
Config: opts.Config,
|
Config: opts.Config,
|
||||||
LayerType: opts.LayerType,
|
LayerType: opts.LayerType,
|
||||||
ExcludeTitles: opts.ExcludeTitles,
|
ExcludeTitles: opts.ExcludeTitles,
|
||||||
Annotations: opts.Annotations,
|
Annotations: opts.ArtifactAnnotations,
|
||||||
Subject: opts.Subject,
|
Subject: opts.Subject,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -117,7 +117,7 @@ func (ir *ImageEngine) ManifestAddArtifact(_ context.Context, name string, files
|
||||||
options.WithType(opts.Type).WithConfigType(opts.ConfigType).WithLayerType(opts.LayerType)
|
options.WithType(opts.Type).WithConfigType(opts.ConfigType).WithLayerType(opts.LayerType)
|
||||||
options.WithConfig(opts.Config)
|
options.WithConfig(opts.Config)
|
||||||
options.WithExcludeTitles(opts.ExcludeTitles).WithSubject(opts.Subject)
|
options.WithExcludeTitles(opts.ExcludeTitles).WithSubject(opts.Subject)
|
||||||
options.WithAnnotations(opts.Annotations)
|
options.WithAnnotations(opts.ArtifactAnnotations)
|
||||||
options.WithFiles(files)
|
options.WithFiles(files)
|
||||||
id, err := manifests.AddArtifact(ir.ClientCtx, name, options)
|
id, err := manifests.AddArtifact(ir.ClientCtx, name, options)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue