Updated generator plugins to reflect generator changes

This commit is contained in:
David Allen 2024-06-26 10:17:59 -06:00
parent 56be39ff99
commit f443558b50
No known key found for this signature in database
GPG key ID: 717C593FF60A2ACC
6 changed files with 68 additions and 65 deletions

View file

@ -15,17 +15,17 @@ func (g *Conman) GetName() string {
}
func (g *Conman) GetGroups() []string {
return []string{"conman"}
return []string{""}
}
func (g *Conman) Generate(config *configurator.Config, opts ...util.Option) ([]byte, error) {
func (g *Conman) Generate(config *configurator.Config, opts ...util.Option) (map[string][]byte, error) {
var (
params = generator.GetParams(opts...)
client = generator.GetClient(params)
template = params["template"].(string) // required param
path = config.TemplatePaths[template]
eps []configurator.RedfishEndpoint = nil
err error = nil
params = generator.GetParams(opts...)
client = generator.GetClient(params)
targetKey = params["targets"].(string) // required param
target = config.Targets[targetKey]
eps []configurator.RedfishEndpoint = nil
err error = nil
// serverOpts = ""
// globalOpts = ""
consoles = ""
@ -52,10 +52,10 @@ func (g *Conman) Generate(config *configurator.Config, opts ...util.Option) ([]b
consoles += "# ====================================================================="
// apply template substitutions and return output as byte array
return generator.ApplyTemplate(path, generator.Mappings{
return generator.ApplyTemplates(generator.Mappings{
"server_opts": "",
"global_opts": "",
})
}, target.Templates...)
}
var Generator Conman