mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
CSI: sort capabilities in plugin status (#12154)
Also fix `LIST_SNAPSHOTS` capability name
This commit is contained in:
3
.changelog/12154.txt
Normal file
3
.changelog/12154.txt
Normal file
@@ -0,0 +1,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 ")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user