mirror of
https://github.com/davidallendj/configurator.git
synced 2025-12-20 11:37:00 -07:00
Updated generator plugins to reflect generator changes
This commit is contained in:
parent
56be39ff99
commit
f443558b50
6 changed files with 68 additions and 65 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue