target: move Filename from target options to Target
The filename of the image as produced by osbuild for a given export is currently set in each target options type in the `Filename` struct member. However, the value is not really specific to any target type, but to the specific export used for the target. For this reason move the value form target type options to the `Target` struct inside a new struct `OsbuildArtifact` under the name`ExportFilename`. The backward compatibility with older implementations of the composer and workers is kept on the JSON (Un)mashaling level, where the JSON object is always a super-set of the old and new way of providing the export filename in the Target.
This commit is contained in:
parent
eda691971c
commit
6f464949f5
18 changed files with 567 additions and 129 deletions
|
|
@ -106,7 +106,6 @@ func main() {
|
|||
}
|
||||
awsTarget := target.NewAWSTarget(
|
||||
&target.AWSTargetOptions{
|
||||
Filename: "image.ami",
|
||||
Region: "far-away-1",
|
||||
AccessKeyID: "MyKey",
|
||||
SecretAccessKey: "MySecret",
|
||||
|
|
@ -117,6 +116,7 @@ func main() {
|
|||
awsTarget.Uuid = id1
|
||||
awsTarget.ImageName = "My Image"
|
||||
awsTarget.Created = time.Now()
|
||||
awsTarget.OsbuildArtifact.ExportFilename = "image.ami"
|
||||
|
||||
d := fedora.NewF35()
|
||||
a, err := d.GetArch(distro.X86_64ArchName)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue