debian-forge-composer/internal/osbuild2/lvm2_lv_device.go
Christian Kellner 8a73ab5980 osbuild2: fix LVM device constructor arguments
NewLVM2LVDevice should take `LVM2LVDeviceOptions`. Also add a parent
argument to be able to specify the parent device for the LVM2 device.

Co-Authored-By: Christian Kellner <christian@kellner.me>
2022-02-22 19:23:41 +00:00

18 lines
384 B
Go

package osbuild2
// Provide access to LVM2 Logical Volume (LV)
type LVM2LVDeviceOptions struct {
// Logical volume to activate
Volume string `json:"volume"`
}
func (LVM2LVDeviceOptions) isDeviceOptions() {}
func NewLVM2LVDevice(parent string, options *LVM2LVDeviceOptions) *Device {
return &Device{
Type: "org.osbuild.lvm2.lv",
Parent: parent,
Options: options,
}
}