Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Nomad
Commits
2a6bfa5a
Commit
2a6bfa5a
authored
5 years ago
by
Danielle Lancashire
Committed by
Lang Martin
5 years ago
Browse files
Options
Download
Email Patches
Plain Diff
csi: Add grpc.CallOption support to NodePublishVolume
parent
2df39b16
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
plugins/csi/client.go
+2
-2
plugins/csi/client.go
plugins/csi/fake/client.go
+1
-1
plugins/csi/fake/client.go
plugins/csi/plugin.go
+1
-1
plugins/csi/plugin.go
with
4 additions
and
4 deletions
+4
-4
plugins/csi/client.go
+
2
-
2
View file @
2a6bfa5a
...
...
@@ -356,7 +356,7 @@ func (c *client) NodeUnstageVolume(ctx context.Context, volumeID string, staging
return
err
}
func
(
c
*
client
)
NodePublishVolume
(
ctx
context
.
Context
,
req
*
NodePublishVolumeRequest
)
error
{
func
(
c
*
client
)
NodePublishVolume
(
ctx
context
.
Context
,
req
*
NodePublishVolumeRequest
,
opts
...
grpc
.
CallOption
)
error
{
if
c
==
nil
{
return
fmt
.
Errorf
(
"Client not initialized"
)
}
...
...
@@ -370,7 +370,7 @@ func (c *client) NodePublishVolume(ctx context.Context, req *NodePublishVolumeRe
// NodePublishVolume's response contains no extra data. If err == nil, we were
// successful.
_
,
err
:=
c
.
nodeClient
.
NodePublishVolume
(
ctx
,
req
.
ToCSIRepresentation
())
_
,
err
:=
c
.
nodeClient
.
NodePublishVolume
(
ctx
,
req
.
ToCSIRepresentation
()
,
opts
...
)
return
err
}
...
...
This diff is collapsed.
Click to expand it.
plugins/csi/fake/client.go
+
1
-
1
View file @
2a6bfa5a
...
...
@@ -185,7 +185,7 @@ func (c *Client) NodeUnstageVolume(ctx context.Context, volumeID string, staging
return
c
.
NextNodeUnstageVolumeErr
}
func
(
c
*
Client
)
NodePublishVolume
(
ctx
context
.
Context
,
req
*
csi
.
NodePublishVolumeRequest
)
error
{
func
(
c
*
Client
)
NodePublishVolume
(
ctx
context
.
Context
,
req
*
csi
.
NodePublishVolumeRequest
,
opts
...
grpc
.
CallOption
)
error
{
c
.
Mu
.
Lock
()
defer
c
.
Mu
.
Unlock
()
...
...
This diff is collapsed.
Click to expand it.
plugins/csi/plugin.go
+
1
-
1
View file @
2a6bfa5a
...
...
@@ -58,7 +58,7 @@ type CSIPlugin interface {
// NodePublishVolume is used to prepare a volume for use by an allocation.
// if err == nil the response should be assumed to be successful.
NodePublishVolume
(
ctx
context
.
Context
,
req
*
NodePublishVolumeRequest
)
error
NodePublishVolume
(
ctx
context
.
Context
,
req
*
NodePublishVolumeRequest
,
opts
...
grpc
.
CallOption
)
error
// NodeUnpublishVolume is used to cleanup usage of a volume for an alloc. This
// MUST be called before calling NodeUnstageVolume or ControllerUnpublishVolume
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help