weldr: Add support for PartitioningMode
This commit is contained in:
parent
2729f6ac54
commit
81240f58ba
2 changed files with 17 additions and 3 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue