From d2d12b201c6f750332c2c70304a4a5d7e4dc2b89 Mon Sep 17 00:00:00 2001 From: Tim Gross Date: Wed, 7 Apr 2021 09:28:08 -0400 Subject: [PATCH] CSI: fix URL for volume snapshot list --- api/csi.go | 2 +- command/volume_snapshot_list.go | 2 +- vendor/github.com/hashicorp/nomad/api/csi.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/csi.go b/api/csi.go index befadd797..836d37d04 100644 --- a/api/csi.go +++ b/api/csi.go @@ -151,7 +151,7 @@ func (v *CSIVolumes) ListSnapshots(pluginID string, q *QueryOptions) (*CSISnapsh qp.Set("per_page", fmt.Sprint(q.PerPage)) } - qm, err := v.client.query("/v1/volumes/snapshots?"+qp.Encode(), &resp, q) + qm, err := v.client.query("/v1/volumes/snapshot?"+qp.Encode(), &resp, q) if err != nil { return nil, nil, err } diff --git a/command/volume_snapshot_list.go b/command/volume_snapshot_list.go index cc2b8d68d..c98c88a4f 100644 --- a/command/volume_snapshot_list.go +++ b/command/volume_snapshot_list.go @@ -122,7 +122,7 @@ func (c *VolumeSnapshotListCommand) Run(args []string) int { resp, _, err := client.CSIVolumes().ListSnapshots(pluginID, q) if err != nil { c.Ui.Error(fmt.Sprintf( - "Error querying CSI external volumes for plugin %q: %s", pluginID, err)) + "Error querying CSI external snapshots for plugin %q: %s", pluginID, err)) return 1 } if len(resp.Snapshots) > 0 { diff --git a/vendor/github.com/hashicorp/nomad/api/csi.go b/vendor/github.com/hashicorp/nomad/api/csi.go index befadd797..836d37d04 100644 --- a/vendor/github.com/hashicorp/nomad/api/csi.go +++ b/vendor/github.com/hashicorp/nomad/api/csi.go @@ -151,7 +151,7 @@ func (v *CSIVolumes) ListSnapshots(pluginID string, q *QueryOptions) (*CSISnapsh qp.Set("per_page", fmt.Sprint(q.PerPage)) } - qm, err := v.client.query("/v1/volumes/snapshots?"+qp.Encode(), &resp, q) + qm, err := v.client.query("/v1/volumes/snapshot?"+qp.Encode(), &resp, q) if err != nil { return nil, nil, err }