cloudapi: Create a compose using the blueprint data
If the request includes a blueprint (and not customizations) it uses that blueprint for the compose.
This commit is contained in:
parent
5b87877109
commit
7438e29375
4 changed files with 504 additions and 13 deletions
|
|
@ -160,8 +160,14 @@ func (h *apiHandlers) PostCompose(ctx echo.Context) error {
|
|||
return HTTPError(ErrorUnsupportedDistribution)
|
||||
}
|
||||
|
||||
// Create a blueprint from the customizations included in the request
|
||||
bp, err := request.GetBlueprintWithCustomizations()
|
||||
// OpenAPI enforces blueprint or customization, not both
|
||||
// but check anyway
|
||||
if request.Customizations != nil && request.Blueprint != nil {
|
||||
return HTTPError(ErrorBlueprintOrCustomNotBoth)
|
||||
}
|
||||
|
||||
// Create a blueprint from the request
|
||||
bp, err := request.GetBlueprint()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue