Return GCP-specific target results form the worker, similar as it is done for AWS. Extend Cloud API to allow GCP-specific upload Options. Modify Cloud API to return UploadOptions as part of the UploadStatus. Modify Cloud API integration test to check returned upload Options and upload Type. Signed-off-by: Tomas Hozza <thozza@redhat.com>
27 lines
809 B
Go
27 lines
809 B
Go
package target
|
|
|
|
type GCPTargetOptions struct {
|
|
Filename string `json:"filename"`
|
|
Region string `json:"region"`
|
|
Os string `json:"os"` // not exposed in cloudapi for now
|
|
Bucket string `json:"bucket"`
|
|
Object string `json:"object"`
|
|
ShareWithAccounts []string `json:"shareWithAccounts"`
|
|
}
|
|
|
|
func (GCPTargetOptions) isTargetOptions() {}
|
|
|
|
func NewGCPTarget(options *GCPTargetOptions) *Target {
|
|
return newTarget("org.osbuild.gcp", options)
|
|
}
|
|
|
|
type GCPTargetResultOptions struct {
|
|
ImageName string `json:"image_name"`
|
|
ProjectID string `json:"project_id"`
|
|
}
|
|
|
|
func (GCPTargetResultOptions) isTargetResultOptions() {}
|
|
|
|
func NewGCPTargetResult(options *GCPTargetResultOptions) *TargetResult {
|
|
return newTargetResult("org.osbuild.gcp", options)
|
|
}
|