osbuild2/copy: ctor helper with only inputs

Add a simple constructor helper function that does not have mounts
and devices but only inputs.
This commit is contained in:
Christian Kellner 2021-08-20 14:01:07 +02:00 committed by Tom Gundersen
parent 8970cdfd83
commit 6e70506903

View file

@ -46,3 +46,15 @@ func NewCopyStage(options *CopyStageOptions, inputs CopyStageInputsNew, devices
Mounts: *mounts,
}
}
func NewCopyStageSimple(options *CopyStageOptions, inputs CopyStageInputsNew) *Stage {
var stageInputs Inputs
if inputs != nil {
stageInputs = inputs.(Inputs)
}
return &Stage{
Type: "org.osbuild.copy",
Options: options,
Inputs: stageInputs,
}
}