internal: mandate installation device for the simplified installer

Signed-off-by: Antonio Murdaca <runcom@linux.com>
This commit is contained in:
Antonio Murdaca 2021-09-08 17:17:10 +02:00 committed by Achilleas Koutsou
parent 26b96483a3
commit 5005ff6184
3 changed files with 7 additions and 2 deletions

View file

@ -461,6 +461,9 @@ func (t *imageType) checkOptions(customizations *blueprint.Customizations, optio
if err := customizations.CheckAllowed("InstallationDevice"); err != nil {
return fmt.Errorf("boot ISO image type %q contains unsupported blueprint customizations: %v", t.name, err)
}
if customizations.GetInstallationDevice() == "" {
return fmt.Errorf("boot ISO image type %q requires specifying an installation device to install to", t.name)
}
} else if customizations != nil {
return fmt.Errorf("boot ISO image type %q does not support blueprint customizations", t.name)
}