mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 10:25:42 +03:00
CSI: remove prefix matching from CSIVolumeByID and fix CLI prefix matching (#10158)
Callers of `CSIVolumeByID` are generally assuming they should receive a single volume. This potentially results in feasibility checking being performed against the wrong volume if a volume's ID is a prefix substring of other volume (for example: "test" and "testing"). Removing the incorrect prefix matching from `CSIVolumeByID` breaks prefix matching in the command line client. Add the required elements for prefix matching to the commands and API.
This commit is contained in:
5
vendor/github.com/hashicorp/nomad/api/csi.go
generated
vendored
5
vendor/github.com/hashicorp/nomad/api/csi.go
generated
vendored
@@ -28,11 +28,6 @@ func (v *CSIVolumes) List(q *QueryOptions) ([]*CSIVolumeListStub, *QueryMeta, er
|
||||
return resp, qm, nil
|
||||
}
|
||||
|
||||
// PluginList returns all CSI volumes for the specified plugin id
|
||||
func (v *CSIVolumes) PluginList(pluginID string) ([]*CSIVolumeListStub, *QueryMeta, error) {
|
||||
return v.List(&QueryOptions{Prefix: pluginID})
|
||||
}
|
||||
|
||||
// Info is used to retrieve a single CSIVolume
|
||||
func (v *CSIVolumes) Info(id string, q *QueryOptions) (*CSIVolume, *QueryMeta, error) {
|
||||
var resp CSIVolume
|
||||
|
||||
Reference in New Issue
Block a user