csi: Expose gRPC Options on NodeUnstageVolume

This commit is contained in:
Danielle Lancashire
2020-01-31 12:11:17 +01:00
committed by Tim Gross
parent 72b69f08f5
commit 1aecff1244
3 changed files with 4 additions and 4 deletions

View File

@@ -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
}

View File

@@ -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()

View File

@@ -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.