blueprint: delete HasIgnition() function
Unify how are allowed options checked in distro implementation in relation to Ignition customization. Specifically, delete `HasIgnition()` function and replace its use by `GetIgnition()` call and checking if it is `nil`. This approach is consistent with how this is checked for other customizations. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
parent
317565f2c4
commit
0e4dabd265
2 changed files with 1 additions and 5 deletions
|
|
@ -407,7 +407,3 @@ func (c *Customizations) GetIgnition() *IgnitionCustomization {
|
|||
}
|
||||
return c.Ignition
|
||||
}
|
||||
|
||||
func (c *IgnitionCustomization) HasIgnition() bool {
|
||||
return c != nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -360,7 +360,7 @@ func (t *imageType) checkOptions(customizations *blueprint.Customizations, optio
|
|||
}
|
||||
|
||||
// ignition is optional, we might be using FDO
|
||||
if customizations.Ignition.HasIgnition() {
|
||||
if customizations.GetIgnition() != nil {
|
||||
if customizations.GetIgnition().Embedded != nil && customizations.GetIgnition().FirstBoot != nil {
|
||||
return fmt.Errorf("both ignition embedded and firstboot configurations found")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue