From 0a8638698d83fb0049e85311d96309fc22b39791 Mon Sep 17 00:00:00 2001 From: Christian Goll Date: Wed, 1 Feb 2023 11:10:51 +0100 Subject: [PATCH] sort netnames for node list --- internal/pkg/api/node/list.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/pkg/api/node/list.go b/internal/pkg/api/node/list.go index f98293c8..330aa7b9 100644 --- a/internal/pkg/api/node/list.go +++ b/internal/pkg/api/node/list.go @@ -36,6 +36,7 @@ func NodeList(nodeGet *wwapiv1.GetNodeList) (nodeList wwapiv1.NodeList, err erro for k := range n.NetDevs { netNames = append(netNames, k) } + sort.Strings(netNames) nodeList.Output = append(nodeList.Output, fmt.Sprintf("%-22s %-26s %s", n.Id.Print(), n.Profiles.Print(), strings.Join(netNames, ", "))) }