Skip to content

Commit

Permalink
Detach from using the user facing configs.
Browse files Browse the repository at this point in the history
  • Loading branch information
gmileka committed Oct 18, 2024
1 parent 3135149 commit 4e5f03d
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions toolkit/tools/pkg/imagecustomizerlib/savedconfigs.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"os"
"path/filepath"

"github.com/microsoft/azurelinux/toolkit/tools/imagecustomizerapi"
"github.com/microsoft/azurelinux/toolkit/tools/internal/file"
)

Expand All @@ -26,8 +25,22 @@ import (
// and we need to remember to add the ISO specific arguments from the previous
// runs. SavedConfigs is the place where we can store such arguments so we can
// re-apply them.

type IsoSavedConfigs struct {
KernelCommandLine imagecustomizerapi.KernelCommandLine `yaml:"kernelCommandLine"`
}

func (i *IsoSavedConfigs) IsValid() error {
err := i.KernelCommandLine.IsValid()
if err != nil {
return fmt.Errorf("invalid kernelCommandLine: %w", err)
}

return nil
}

type SavedConfigs struct {
Iso imagecustomizerapi.Iso `yaml:"iso"`
Iso IsoSavedConfigs `yaml:"iso"`
}

func (c *SavedConfigs) IsValid() (err error) {
Expand Down

0 comments on commit 4e5f03d

Please sign in to comment.