Changing node.conf structure and moved controllers out of this config
This commit is contained in:
@@ -131,71 +131,6 @@ func (self *nodeYaml) FindAllNodes() ([]NodeInfo, error) {
|
||||
return ret, nil
|
||||
}
|
||||
|
||||
/*
|
||||
func (self *nodeYaml) FindAllControllers() ([]ControllerConf, error) {
|
||||
var ret []ControllerConf
|
||||
|
||||
for controllername, controller := range self.Controllers {
|
||||
var c ControllerConf
|
||||
|
||||
c.Id = controllername
|
||||
c.Ipaddr = controller.Ipaddr
|
||||
c.Comment = controller.Comment
|
||||
c.Fqdn = controller.Fqdn
|
||||
|
||||
//TODO: Is there a better way to do this, cause EWWW!
|
||||
c.Services = struct {
|
||||
Warewulfd struct {
|
||||
Port string
|
||||
Secure bool
|
||||
StartCmd string
|
||||
RestartCmd string
|
||||
EnableCmd string
|
||||
}
|
||||
Dhcp struct {
|
||||
Enabled bool
|
||||
Template string
|
||||
RangeStart string
|
||||
RangeEnd string
|
||||
ConfigFile string
|
||||
StartCmd string
|
||||
RestartCmd string
|
||||
EnableCmd string
|
||||
}
|
||||
Tftp struct {
|
||||
Enabled bool
|
||||
TftpRoot string
|
||||
StartCmd string
|
||||
RestartCmd string
|
||||
EnableCmd string
|
||||
}
|
||||
Nfs struct {
|
||||
Enabled bool
|
||||
Exports []string
|
||||
StartCmd string
|
||||
RestartCmd string
|
||||
EnableCmd string
|
||||
}
|
||||
}(controller.Services)
|
||||
|
||||
// Validations //
|
||||
|
||||
if c.Ipaddr == "" {
|
||||
wwlog.Printf(wwlog.WARN, "Controller IP address is unset: %s\n", c.Id)
|
||||
}
|
||||
|
||||
if c.Services.Warewulfd.Port == "" {
|
||||
c.Services.Warewulfd.Port = "987"
|
||||
}
|
||||
|
||||
// TODO: Validate or die on all inputs
|
||||
|
||||
ret = append(ret, c)
|
||||
}
|
||||
return ret, nil
|
||||
}
|
||||
*/
|
||||
|
||||
func (self *nodeYaml) FindAllProfiles() ([]NodeInfo, error) {
|
||||
var ret []NodeInfo
|
||||
|
||||
|
||||
Reference in New Issue
Block a user