cloudapi: support container embedding
Add support for embedding container images via the cloud API. For this the container resolve job was plumbed into the cloud api's handler and the API specification updated with a new `containers` section that mimics the blueprint section with the same name.
This commit is contained in:
parent
45850639a0
commit
388154d7f6
7 changed files with 341 additions and 119 deletions
|
|
@ -173,6 +173,19 @@ func (h *apiHandlers) PostCompose(ctx echo.Context) error {
|
|||
}
|
||||
}
|
||||
|
||||
if request.Customizations != nil && request.Customizations.Containers != nil {
|
||||
for _, c := range *request.Customizations.Containers {
|
||||
bc := blueprint.Container{
|
||||
Source: c.Source,
|
||||
TLSVerify: c.TlsVerify,
|
||||
}
|
||||
if c.Name != nil {
|
||||
bc.Name = *c.Name
|
||||
}
|
||||
bp.Containers = append(bp.Containers, bc)
|
||||
}
|
||||
}
|
||||
|
||||
if request.Customizations != nil && request.Customizations.Filesystem != nil {
|
||||
var fsCustomizations []blueprint.FilesystemCustomization
|
||||
for _, f := range *request.Customizations.Filesystem {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue