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
353151c0
Unverified
Commit
353151c0
authored
5 years ago
by
Danielle Lancashire
Browse files
Options
Download
Email Patches
Plain Diff
csiclient: Add grpc.CallOption support to NodeUnpublishVolume
parent
35973c63
Branches unavailable
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 @
353151c0
...
...
@@ -394,7 +394,7 @@ func (c *client) NodePublishVolume(ctx context.Context, req *NodePublishVolumeRe
return
err
}
func
(
c
*
client
)
NodeUnpublishVolume
(
ctx
context
.
Context
,
volumeID
,
targetPath
string
)
error
{
func
(
c
*
client
)
NodeUnpublishVolume
(
ctx
context
.
Context
,
volumeID
,
targetPath
string
,
opts
...
grpc
.
CallOption
)
error
{
if
c
==
nil
{
return
fmt
.
Errorf
(
"Client not initialized"
)
}
...
...
@@ -417,6 +417,6 @@ func (c *client) NodeUnpublishVolume(ctx context.Context, volumeID, targetPath s
// NodeUnpublishVolume's response contains no extra data. If err == nil, we were
// successful.
_
,
err
:=
c
.
nodeClient
.
NodeUnpublishVolume
(
ctx
,
req
)
_
,
err
:=
c
.
nodeClient
.
NodeUnpublishVolume
(
ctx
,
req
,
opts
...
)
return
err
}
This diff is collapsed.
Click to expand it.
plugins/csi/fake/client.go
+
1
-
1
View file @
353151c0
...
...
@@ -208,7 +208,7 @@ func (c *Client) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolu
return
c
.
NextNodePublishVolumeErr
}
func
(
c
*
Client
)
NodeUnpublishVolume
(
ctx
context
.
Context
,
volumeID
,
targetPath
string
)
error
{
func
(
c
*
Client
)
NodeUnpublishVolume
(
ctx
context
.
Context
,
volumeID
,
targetPath
string
,
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 @
353151c0
...
...
@@ -66,7 +66,7 @@ type CSIPlugin interface {
// NodeUnpublishVolume is used to cleanup usage of a volume for an alloc. This
// MUST be called before calling NodeUnstageVolume or ControllerUnpublishVolume
// for the given volume.
NodeUnpublishVolume
(
ctx
context
.
Context
,
volumeID
,
targetPath
string
)
error
NodeUnpublishVolume
(
ctx
context
.
Context
,
volumeID
,
targetPath
string
,
opts
...
grpc
.
CallOption
)
error
// Shutdown the client and ensure any connections are cleaned up.
Close
()
error
...
...
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