cloudapi/v2: add support for aws-*-rhui image types
For the brew use-case, we also need to build AWS images containing RHUI. This commit is thus adding them. Signed-off-by: Ondřej Budai <ondrej@budai.cz>
This commit is contained in:
parent
439699fcec
commit
631bd21ffe
3 changed files with 89 additions and 68 deletions
|
|
@ -323,6 +323,12 @@ func (h *apiHandlers) PostCompose(ctx echo.Context) error {
|
|||
/* oneOf is not supported by the openapi generator so marshal and unmarshal the uploadrequest based on the type */
|
||||
switch ir.ImageType {
|
||||
case ImageTypesAws:
|
||||
fallthrough
|
||||
case ImageTypesAwsRhui:
|
||||
fallthrough
|
||||
case ImageTypesAwsHaRhui:
|
||||
fallthrough
|
||||
case ImageTypesAwsSapRhui:
|
||||
var awsUploadOptions AWSEC2UploadOptions
|
||||
jsonUploadOptions, err := json.Marshal(*ir.UploadOptions)
|
||||
if err != nil {
|
||||
|
|
@ -693,6 +699,12 @@ func imageTypeFromApiImageType(it ImageTypes) string {
|
|||
switch it {
|
||||
case ImageTypesAws:
|
||||
return "ami"
|
||||
case ImageTypesAwsRhui:
|
||||
return "ec2"
|
||||
case ImageTypesAwsHaRhui:
|
||||
return "ec2-ha"
|
||||
case ImageTypesAwsSapRhui:
|
||||
return "ec2-sap"
|
||||
case ImageTypesGcp:
|
||||
return "vhd"
|
||||
case ImageTypesAzure:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue