Minor updates/fixes to NodeDB
This commit is contained in:
@@ -47,6 +47,7 @@ func (self *nodeYaml) FindAllNodes() ([]NodeInfo, error) {
|
||||
n.IpmiIpaddr.Set(node.IpmiIpaddr)
|
||||
|
||||
n.Profiles = node.Profiles
|
||||
n.GroupProfiles = group.Profiles
|
||||
|
||||
allProfiles = append(allProfiles, group.Profiles...)
|
||||
allProfiles = append(allProfiles, node.Profiles...)
|
||||
|
||||
@@ -85,6 +85,7 @@ type NodeInfo struct {
|
||||
RuntimeOverlay NodeInfoEntry
|
||||
SystemOverlay NodeInfoEntry
|
||||
Profiles []string
|
||||
GroupProfiles []string
|
||||
NetDevs map[string]*NetDevs
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package node
|
||||
|
||||
import "strings"
|
||||
|
||||
func (self *NodeInfoEntry) String() string {
|
||||
if self.value != "" {
|
||||
return "node=" + self.value
|
||||
@@ -64,6 +66,8 @@ func (self *NodeInfoEntry) SetProfile(value string) {
|
||||
func (self *NodeInfoEntry) Set(value string) {
|
||||
if value == "" {
|
||||
return
|
||||
} else if strings.ToUpper(value) == "UNDEF" {
|
||||
value = ""
|
||||
}
|
||||
self.value = value
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user