diff --git a/internal/pkg/api/node/list.go b/internal/pkg/api/node/list.go index 6e4a5c2e..fc543f7f 100644 --- a/internal/pkg/api/node/list.go +++ b/internal/pkg/api/node/list.go @@ -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, diff --git a/internal/pkg/api/profile/list.go b/internal/pkg/api/profile/list.go index b6afdbdc..5d027943 100644 --- a/internal/pkg/api/profile/list.go +++ b/internal/pkg/api/profile/list.go @@ -28,9 +28,9 @@ func ProfileList(ShowOpt *wwapiv1.GetProfileList) (profileList wwapiv1.ProfileLi return profiles[i].Id() < profiles[j].Id() }) if ShowOpt.ShowAll { + profileList.Output = append(profileList.Output, + fmt.Sprintf("%s:=:%s:=:%s", "PROFILE", "FIELD", "VALUE")) for _, p := range profiles { - profileList.Output = append(profileList.Output, - fmt.Sprintf("%s:=:%s:=:%s", "PROFILE", "FIELD", "VALUE")) fields := nodeDB.GetFieldsProfile(p) for _, f := range fields { profileList.Output = append(profileList.Output,