cloudapi: implement GCP target results and include UploadOptions

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>
This commit is contained in:
Tomas Hozza 2021-03-03 13:52:17 +01:00 committed by Tomas Hozza
parent 12880950e9
commit 319400c280
7 changed files with 161 additions and 60 deletions

View file

@ -47,6 +47,8 @@ func UnmarshalTargetResultOptions(trName string, rawOptions json.RawMessage) (Ta
switch trName {
case "org.osbuild.aws":
options = new(AWSTargetResultOptions)
case "org.osbuild.gcp":
options = new(GCPTargetResultOptions)
default:
return nil, fmt.Errorf("Unexpected target result name: %s", trName)
}