diff --git a/internal/weldr/api.go b/internal/weldr/api.go index 2afca315a..70fadc53e 100644 --- a/internal/weldr/api.go +++ b/internal/weldr/api.go @@ -2485,9 +2485,21 @@ func (api *API) composeHandler(writer http.ResponseWriter, request *http.Request } seed := bigSeed.Int64() + // Get the partitioning mode + pm, err := bp.Customizations.GetPartitioningMode() + if err != nil { + errors := responseError{ + ID: "BlueprintsError", + Msg: err.Error(), + } + statusResponseError(writer, http.StatusBadRequest, errors) + return + } + options := distro.ImageOptions{ - Size: size, - OSTree: &cr.OSTree, + Size: size, + OSTree: &cr.OSTree, + PartitioningMode: pm, } options.Facts = &facts.ImageOptions{ APIType: facts.WELDR_APITYPE, diff --git a/internal/weldr/api_test.go b/internal/weldr/api_test.go index d489bebdb..9b83eb6ae 100644 --- a/internal/weldr/api_test.go +++ b/internal/weldr/api_test.go @@ -550,7 +550,8 @@ func TestBlueprintsCustomizationInfoToml(t *testing.T) { "openscap": { "datastream": "/usr/share/xml/scap/ssg/content/ssg-rhel8-ds.xml", "profile_id": "xccdf_org.ssgproject.content_profile_cis" - } + }, + "partitioning_mode": "raw" } }` resp := test.SendHTTP(api, true, "POST", "/api/v0/blueprints/new", testBlueprint) @@ -644,6 +645,7 @@ func TestBlueprintsCustomizationInfoToml(t *testing.T) { DataStream: "/usr/share/xml/scap/ssg/content/ssg-rhel8-ds.xml", ProfileID: "xccdf_org.ssgproject.content_profile_cis", }, + PartitioningMode: "raw", }, }