Changing node.conf structure and moved controllers out of this config

This commit is contained in:
Gregory Kurtzer
2020-12-03 17:26:51 -08:00
parent 84bf9fbb43
commit ec037228cc
4 changed files with 13 additions and 169 deletions

View File

@@ -11,15 +11,13 @@ import (
******/
type nodeYaml struct {
Controllers map[string]*ControllerConf `yaml:"controlers"`
NodeProfiles map[string]*NodeConf
Nodes map[string]*NodeConf
}
type NodeConf struct {
Comment string `yaml:"comment,omitempty"`
Disabled bool `yaml:"disabled,omitempty"`
// Hostname string `yaml:"hostname,omitempty"`
Comment string `yaml:"comment,omitempty"`
Disabled bool `yaml:"disabled,omitempty"`
DomainName string `yaml:"domain name,omitempty"`
Vnfs string `yaml:"vnfs,omitempty"`
Ipxe string `yaml:"ipxe template,omitempty"`
@@ -35,45 +33,6 @@ type NodeConf struct {
NetDevs map[string]*NetDevs `yaml:"network devices,omitempty"`
}
type ControllerConf struct {
Comment string `yaml:"comment"`
Ipaddr string `yaml:"ipaddr"`
Fqdn string `yaml:"fqdn"`
Services struct {
Warewulfd struct {
Port string `yaml:"port"`
Secure bool `yaml:"secure,omitempty"`
StartCmd string `yaml:"start command,omitempty"`
RestartCmd string `yaml:"restart command,omitempty"`
EnableCmd string `yaml:"enable command,omitempty"`
} `yaml:"warewulf"`
Dhcp struct {
Enabled bool `yaml:"enabled,omitempty"`
Template string `yaml:"template,omitempty"`
RangeStart string `yaml:"range start,omitempty"`
RangeEnd string `yaml:"range end,omitempty"`
ConfigFile string `yaml:"config file,omitempty"`
StartCmd string `yaml:"start command,omitempty"`
RestartCmd string `yaml:"restart command,omitempty"`
EnableCmd string `yaml:"enable command,omitempty"`
} `yaml:"dhcp,omitempty"`
Tftp struct {
Enabled bool `yaml:"enabled,omitempty"`
TftpRoot string `yaml:"tftp root,omitempty"`
StartCmd string `yaml:"start command,omitempty"`
RestartCmd string `yaml:"restart command,omitempty"`
EnableCmd string `yaml:"enable command,omitempty"`
} `yaml:"tftp,omitempty"`
Nfs struct {
Enabled bool `yaml:"enabled,omitempty"`
Exports []string `yaml:"exports,omitempty"`
StartCmd string `yaml:"start command,omitempty"`
RestartCmd string `yaml:"restart command,omitempty"`
EnableCmd string `yaml:"enable command,omitempty"`
} `yaml:"nfs,omitempty"`
} `yaml:"services"`
}
type NetDevs struct {
Type string `yaml:"type,omitempty"`
Default bool `yaml:"default"`
@@ -97,11 +56,9 @@ type Entry struct {
}
type NodeInfo struct {
Id Entry
Cid Entry
Comment Entry
// HostName Entry
// Fqdn Entry
Id Entry
Cid Entry
Comment Entry
DomainName Entry
Vnfs Entry
Ipxe Entry