cloudapi: Add optional image size support

This adds a 'size' parameter to the image_request object. It can be used
to specify the minimum image size in bytes

This behaves in the same way as the size parameter of the weldr API

For raw images the root partition is grown to fill the available space.
For LVM images the PV uses the available space, but the LV does not,
leaving space available for other LVs to be created after boot.

See COMPOSER-1883
This commit is contained in:
Brian C. Lane 2023-08-03 14:50:49 -07:00 committed by Ondřej Budai
parent 8e29448044
commit 818d434303
3 changed files with 156 additions and 129 deletions

View file

@ -760,6 +760,13 @@ components:
$ref: '#/components/schemas/OSTree'
upload_options:
$ref: '#/components/schemas/UploadOptions'
size:
x-go-type: uint64
default: 0
example: 4294967296
description: |
Size of image, in bytes. When set to 0 the image size is a minimum
defined by the image type.
ImageTypes:
type: string
enum:
@ -1200,7 +1207,8 @@ components:
example: '/var'
min_size:
x-go-type: uint64
example: 1024
example: 2147483648
description: 'size of the filesystem in bytes'
OSTree:
type: object
properties: