diff --git a/examples/plugin/test.go b/examples/plugin/test.go new file mode 100644 index 0000000..f1b4e9b --- /dev/null +++ b/examples/plugin/test.go @@ -0,0 +1,19 @@ +package main + +import ( + "github.com/OpenCHAMI/configurator/pkg/config" + "github.com/OpenCHAMI/configurator/pkg/generator" +) + +type TestGenerator struct{} + +func (g *TestGenerator) GetName() string { return "test" } +func (g *TestGenerator) GetVersion() string { return "v1.0.0" } +func (g *TestGenerator) GetDescription() string { + return "This is a plugin creating for running tests." +} +func (g *TestGenerator) Generate(config *config.Config, params generator.Params) (generator.FileMap, error) { + return generator.FileMap{"test": []byte("test")}, nil +} + +var Generator TestGenerator diff --git a/examples/templates/dnsmasq.jinja b/examples/templates/dnsmasq.jinja index c522039..d187a9a 100644 --- a/examples/templates/dnsmasq.jinja +++ b/examples/templates/dnsmasq.jinja @@ -7,4 +7,4 @@ # Source code: https://github.com/OpenCHAMI/configurator # Creating plugins: https://github.com/OpenCHAMI/configurator/blob/main/README.md#creating-generator-plugins # -{{ dhcp-hosts }} +{{ dhcp_hosts }}