default profile needs to have a container

Signed-off-by: Christian Goll <cgoll@suse.com>
This commit is contained in:
Christian Goll
2023-07-19 11:28:49 +02:00
committed by Jonathon Anderson
parent a36cb23319
commit 2fe98e5f55
9 changed files with 125 additions and 7 deletions

View File

@@ -307,6 +307,36 @@ func (config *NodeYaml) ListAllProfiles() []string {
return ret
}
/*
return a map where the key is the profile id
*/
func (config *NodeYaml) MapAllProfiles() (retMap map[string]*NodeInfo, err error) {
retMap = make(map[string]*NodeInfo)
profileList, err := config.FindAllProfiles()
if err != nil {
return
}
for _, pr := range profileList {
retMap[pr.Id.Get()] = &pr
}
return
}
/*
return a map where the key is the node id
*/
func (config *NodeYaml) MapAllNodes() (retMap map[string]*NodeInfo, err error) {
retMap = make(map[string]*NodeInfo)
nodeList, err := config.FindAllNodes()
if err != nil {
return
}
for _, nd := range nodeList {
retMap[nd.Id.Get()] = &nd
}
return
}
/*
FindDiscoverableNode returns the first discoverable node and an
interface to associate with the discovered interface. If the node has