Skip to content

Commit

Permalink
csi: sort allocations in plugin status
Browse files Browse the repository at this point in the history
  • Loading branch information
tgross committed Feb 28, 2022
1 parent 636345a commit 242e591
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .changelog/12154.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
csi: Sort allocations in `plugin status` output
```
4 changes: 2 additions & 2 deletions command/plugin_status_csi.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ func (c *PluginStatusCommand) formatControllerCaps(controllers map[string]*api.C
return ""
}

return strings.Join(caps, "\n\t")
return " " + strings.Join(sort.StringSlice(caps), "\n ")
}

func (c *PluginStatusCommand) formatNodeCaps(nodes map[string]*api.CSIInfo) string {
Expand Down Expand Up @@ -205,5 +205,5 @@ func (c *PluginStatusCommand) formatNodeCaps(nodes map[string]*api.CSIInfo) stri
return ""
}

return " " + strings.Join(caps, "\n ")
return " " + strings.Join(sort.StringSlice(caps), "\n ")
}

0 comments on commit 242e591

Please sign in to comment.