Updated go deps
This commit is contained in:
parent
7e50a36275
commit
008fabaa78
4 changed files with 50 additions and 84 deletions
|
|
@ -102,7 +102,7 @@ func NewParams() util.Params {
|
|||
// service SMD_JWKS_URL envirnoment variable is set.
|
||||
func (client *SmdClient) FetchEthernetInterfaces(opts ...util.Option) ([]EthernetInterface, error) {
|
||||
var (
|
||||
params = util.GetParams(opts...)
|
||||
params = util.ToDict(opts...)
|
||||
verbose = util.Get[bool](params, "verbose")
|
||||
eths = []EthernetInterface{}
|
||||
)
|
||||
|
|
@ -132,7 +132,7 @@ func (client *SmdClient) FetchEthernetInterfaces(opts ...util.Option) ([]Etherne
|
|||
// service SMD_JWKS_URL envirnoment variable is set.
|
||||
func (client *SmdClient) FetchComponents(opts ...util.Option) ([]Component, error) {
|
||||
var (
|
||||
params = util.GetParams(opts...)
|
||||
params = util.ToDict(opts...)
|
||||
verbose = util.Get[bool](params, "verbose")
|
||||
comps = []Component{}
|
||||
)
|
||||
|
|
@ -174,7 +174,7 @@ func (client *SmdClient) FetchComponents(opts ...util.Option) ([]Component, erro
|
|||
|
||||
func (client *SmdClient) FetchRedfishEndpoints(opts ...util.Option) ([]RedfishEndpoint, error) {
|
||||
var (
|
||||
params = util.GetParams(opts...)
|
||||
params = util.ToDict(opts...)
|
||||
verbose = util.Get[bool](params, "verbose")
|
||||
eps = []RedfishEndpoint{}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import (
|
|||
type Options struct{}
|
||||
|
||||
type Target struct {
|
||||
PluginPath string `yaml:"plugin,omitempty"`
|
||||
TemplatePaths []string `yaml:"templates,omitempty"`
|
||||
FilePaths []string `yaml:"files,omitempty"`
|
||||
RunTargets []string `yaml:"targets,omitempty"`
|
||||
|
|
@ -18,24 +19,24 @@ type Target struct {
|
|||
|
||||
type Jwks struct {
|
||||
Uri string `yaml:"uri"`
|
||||
Retries int `yaml:"retries"`
|
||||
Retries int `yaml:"retries,omitempty"`
|
||||
}
|
||||
|
||||
type Server struct {
|
||||
Host string `yaml:"host"`
|
||||
Port int `yaml:"port"`
|
||||
Jwks Jwks `yaml:"jwks"`
|
||||
Jwks Jwks `yaml:"jwks,omitempty"`
|
||||
}
|
||||
|
||||
type Config struct {
|
||||
Version string `yaml:"version"`
|
||||
Server Server `yaml:"server"`
|
||||
SmdClient SmdClient `yaml:"smd"`
|
||||
AccessToken string `yaml:"access-token"`
|
||||
Targets map[string]Target `yaml:"targets"`
|
||||
PluginDirs []string `yaml:"plugins"`
|
||||
CertPath string `yaml:"ca-cert"`
|
||||
Options Options `yaml:"options"`
|
||||
Version string `yaml:"version,omitempty"`
|
||||
Server Server `yaml:"server,omitempty"`
|
||||
SmdClient SmdClient `yaml:"smd,omitempty"`
|
||||
AccessToken string `yaml:"access-token,omitempty"`
|
||||
Targets map[string]Target `yaml:"targets,omitempty"`
|
||||
PluginDirs []string `yaml:"plugins,omitempty"`
|
||||
CertPath string `yaml:"cacert,omitempty"`
|
||||
Options Options `yaml:"options,omitempty"`
|
||||
}
|
||||
|
||||
// Creates a new config with default parameters.
|
||||
|
|
@ -48,12 +49,15 @@ func NewConfig() Config {
|
|||
},
|
||||
Targets: map[string]Target{
|
||||
"dnsmasq": Target{
|
||||
PluginPath: "",
|
||||
TemplatePaths: []string{},
|
||||
},
|
||||
"conman": Target{
|
||||
PluginPath: "",
|
||||
TemplatePaths: []string{},
|
||||
},
|
||||
"warewulf": Target{
|
||||
PluginPath: "",
|
||||
TemplatePaths: []string{
|
||||
"templates/warewulf/defaults/node.jinja",
|
||||
"templates/warewulf/defaults/provision.jinja",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue