distro/Manifest: generalize the size argument
When generating an osbuild manifest for an image type, we take a customizations struct, which specifies the image-type-independent customizations to apply. We also take the size argument, which is specific to the image build and not part of the blueprint. Introduce a new argument ImageOptions, which for now just wraps the size argument. These options are specific to the image build/type, and therefore does not belong with the other customizations. For now this is a non-functional change, but follow-up commits will introduce more types of image options. Signed-off-by: Tom Gundersen <teg@jklm.no>
This commit is contained in:
parent
a544fa7eb6
commit
0b3702cb19
12 changed files with 61 additions and 36 deletions
|
|
@ -1603,7 +1603,13 @@ func (api *API) composeHandler(writer http.ResponseWriter, request *http.Request
|
|||
}
|
||||
|
||||
size := imageType.Size(cr.Size)
|
||||
manifest, err := imageType.Manifest(bp.Customizations, api.allRepositories(), packages, buildPackages, size)
|
||||
manifest, err := imageType.Manifest(bp.Customizations,
|
||||
distro.ImageOptions{
|
||||
Size: size,
|
||||
},
|
||||
api.allRepositories(),
|
||||
packages,
|
||||
buildPackages)
|
||||
if err != nil {
|
||||
errors := responseError{
|
||||
ID: "ManifestCreationFailed",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue