Only output node and profile list headers once
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
@@ -82,9 +82,9 @@ func NodeList(nodeGet *wwapiv1.GetNodeList) (nodeList wwapiv1.NodeList, err erro
|
||||
strings.Join(n.SystemOverlay, ",")+"/"+strings.Join(n.RuntimeOverlay, ",")))
|
||||
}
|
||||
} else if nodeGet.Type == wwapiv1.GetNodeList_All {
|
||||
nodeList.Output = append(nodeList.Output,
|
||||
fmt.Sprintf("%s:=:%s:=:%s:=:%s", "NODE", "FIELD", "PROFILE", "VALUE"))
|
||||
for _, n := range node.FilterNodeListByName(nodes, nodeGet.Nodes) {
|
||||
nodeList.Output = append(nodeList.Output,
|
||||
fmt.Sprintf("%s:=:%s:=:%s:=:%s", "NODE", "FIELD", "PROFILE", "VALUE"))
|
||||
fields := nodeDB.GetFields(n)
|
||||
for _, f := range fields {
|
||||
nodeList.Output = append(nodeList.Output,
|
||||
|
||||
Reference in New Issue
Block a user