diff --git a/config/fcos/v1_5_exp/schema.go b/config/fcos/v1_5_exp/schema.go index 5d0847fe..cfaefc6e 100644 --- a/config/fcos/v1_5_exp/schema.go +++ b/config/fcos/v1_5_exp/schema.go @@ -40,4 +40,8 @@ type BootDeviceMirror struct { Devices []string `yaml:"devices"` } -type Extensions []string +type Extensions []Extension + +type Extension struct { + Name string `yaml:"name"` +} diff --git a/config/fcos/v1_5_exp/translate.go b/config/fcos/v1_5_exp/translate.go index c2c19f86..c941af28 100644 --- a/config/fcos/v1_5_exp/translate.go +++ b/config/fcos/v1_5_exp/translate.go @@ -309,11 +309,14 @@ func (c Config) processPackages(options common.TranslateOptions) (types.Config, if len(c.Extensions) == 0 { return ret, ts, r } - + var extensions []string + for _, ex := range c.Extensions { + extensions = append(extensions, ex.Name) + } treeFileContents, err := yaml.Marshal(&struct { Packages []string `yaml:"packages"` }{ - Packages: c.Extensions, + Packages: extensions, }) if err != nil { r.AddOnError(yamlPath, err) diff --git a/config/fcos/v1_5_exp/translate_test.go b/config/fcos/v1_5_exp/translate_test.go index 53e5b5ed..9e910059 100644 --- a/config/fcos/v1_5_exp/translate_test.go +++ b/config/fcos/v1_5_exp/translate_test.go @@ -1432,7 +1432,14 @@ func TestTranslateExtensions(t *testing.T) { // config with two extensions/packages { Config{ - Extensions: []string{"strace", "zsh"}, + Extensions: []Extension{ + { + Name: "strace", + }, + { + Name: "zsh", + }, + }, }, types.Config{ Ignition: types.Ignition{