Unverified Commit c06f31ee authored by Tim Gross's avatar Tim Gross Committed by GitHub
Browse files

CSI: sort capabilities in `plugin status` (#12154)

Also fix `LIST_SNAPSHOTS` capability name
parent 05034a6c
Showing with 6 additions and 3 deletions
+6 -3
```release-note:improvement
csi: Sort allocations in `plugin status` output
```
......@@ -148,7 +148,7 @@ func (c *PluginStatusCommand) formatControllerCaps(controllers map[string]*api.C
caps = append(caps, "CREATE_DELETE_SNAPSHOT")
fallthrough
case info.SupportsListSnapshots:
caps = append(caps, "CREATE_LIST_SNAPSHOTS")
caps = append(caps, "LIST_SNAPSHOTS")
fallthrough
case info.SupportsClone:
caps = append(caps, "CLONE_VOLUME")
......@@ -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 {
......@@ -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 ")
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment