From 1aecff1244c94db88640c80e5c32cd58c873d5a3 Mon Sep 17 00:00:00 2001 From: Danielle Lancashire Date: Fri, 31 Jan 2020 12:11:17 +0100 Subject: [PATCH] csi: Expose gRPC Options on NodeUnstageVolume --- plugins/csi/client.go | 4 ++-- plugins/csi/fake/client.go | 2 +- plugins/csi/plugin.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/csi/client.go b/plugins/csi/client.go index 30d17ee8d..9ac4013b5 100644 --- a/plugins/csi/client.go +++ b/plugins/csi/client.go @@ -329,7 +329,7 @@ func (c *client) NodeStageVolume(ctx context.Context, volumeID string, publishCo return err } -func (c *client) NodeUnstageVolume(ctx context.Context, volumeID string, stagingTargetPath string) error { +func (c *client) NodeUnstageVolume(ctx context.Context, volumeID string, stagingTargetPath string, opts ...grpc.CallOption) error { if c == nil { return fmt.Errorf("Client not initialized") } @@ -352,7 +352,7 @@ func (c *client) NodeUnstageVolume(ctx context.Context, volumeID string, staging // NodeUnstageVolume's response contains no extra data. If err == nil, we were // successful. - _, err := c.nodeClient.NodeUnstageVolume(ctx, req) + _, err := c.nodeClient.NodeUnstageVolume(ctx, req, opts...) return err } diff --git a/plugins/csi/fake/client.go b/plugins/csi/fake/client.go index 06c4c6f08..58fff1f6e 100644 --- a/plugins/csi/fake/client.go +++ b/plugins/csi/fake/client.go @@ -176,7 +176,7 @@ func (c *Client) NodeStageVolume(ctx context.Context, volumeID string, publishCo // this RPC must be called before freeing the volume. // // If err == nil, the response should be assumed to be successful. -func (c *Client) NodeUnstageVolume(ctx context.Context, volumeID string, stagingTargetPath string) error { +func (c *Client) NodeUnstageVolume(ctx context.Context, volumeID string, stagingTargetPath string, opts ...grpc.CallOption) error { c.Mu.Lock() defer c.Mu.Unlock() diff --git a/plugins/csi/plugin.go b/plugins/csi/plugin.go index d41a71b3c..8312c89ea 100644 --- a/plugins/csi/plugin.go +++ b/plugins/csi/plugin.go @@ -54,7 +54,7 @@ type CSIPlugin interface { // this RPC must be called before freeing the volume. // // If err == nil, the response should be assumed to be successful. - NodeUnstageVolume(ctx context.Context, volumeID string, stagingTargetPath string) error + NodeUnstageVolume(ctx context.Context, volumeID string, stagingTargetPath string, opts ...grpc.CallOption) error // NodePublishVolume is used to prepare a volume for use by an allocation. // if err == nil the response should be assumed to be successful.