osbuild2: lvm2 create stage constructor takes device map

This is needed so we can have LVM be contained inside a LUKS
container, which is inside a partition; i.e. multiple devices
are needed to get to the target device.

Co-Authored-By: Achilleas Koutsou <achilleas@koutsou.net>
This commit is contained in:
Christian Kellner 2022-02-09 11:38:49 +00:00 committed by Tom Gundersen
parent 602111dedd
commit 44b5142234

View file

@ -35,7 +35,7 @@ type LogicalVolume struct {
Size string `json:"size"`
}
func NewLVM2CreateStage(options *LVM2CreateStageOptions, device *Device) *Stage {
func NewLVM2CreateStage(options *LVM2CreateStageOptions, devices Devices) *Stage {
if err := options.validate(); err != nil {
panic(err)
}
@ -43,6 +43,6 @@ func NewLVM2CreateStage(options *LVM2CreateStageOptions, device *Device) *Stage
return &Stage{
Type: "org.osbuild.lvm2.create",
Options: options,
Devices: Devices{"device": *device},
Devices: devices,
}
}