Move bootISOMonoStageInputs() from distros to osbuild2

Move the `bootISOMonoStageInputs()` function duplicated in all
distro definitions to the `osbuild2` package as
`NewBootISOMonoStagePipelineTreeInputs()`.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
This commit is contained in:
Tomas Hozza 2022-02-16 12:19:52 +01:00 committed by Ondřej Budai
parent 069423ea67
commit d946199441
10 changed files with 15 additions and 55 deletions

View file

@ -87,3 +87,13 @@ func NewBootISOMonoStage(options *BootISOMonoStageOptions, inputs *BootISOMonoSt
Inputs: inputs,
}
}
func NewBootISOMonoStagePipelineTreeInputs(pipeline string) *BootISOMonoStageInputs {
rootfsInput := new(BootISOMonoStageInput)
rootfsInput.Type = "org.osbuild.tree"
rootfsInput.Origin = "org.osbuild.pipeline"
rootfsInput.References = BootISOMonoStageReferences{"name:" + pipeline}
return &BootISOMonoStageInputs{
RootFS: rootfsInput,
}
}