mirror of
https://github.com/kemko/nomad.git
synced 2026-01-05 18:05:42 +03:00
csi: Add csi.NodeStageVolume to the NodeClient
Implements a fake version of NodeStageVolume as a dependency of implementing the client.NodeStageVolume request
This commit is contained in:
committed by
Tim Gross
parent
ba1c77a998
commit
3086c72650
@@ -67,6 +67,8 @@ type CSIControllerClient interface {
|
||||
type CSINodeClient interface {
|
||||
NodeGetCapabilities(ctx context.Context, in *csipbv1.NodeGetCapabilitiesRequest, opts ...grpc.CallOption) (*csipbv1.NodeGetCapabilitiesResponse, error)
|
||||
NodeGetInfo(ctx context.Context, in *csipbv1.NodeGetInfoRequest, opts ...grpc.CallOption) (*csipbv1.NodeGetInfoResponse, error)
|
||||
NodeStageVolume(ctx context.Context, in *csipbv1.NodeStageVolumeRequest, opts ...grpc.CallOption) (*csipbv1.NodeStageVolumeResponse, error)
|
||||
// NodeUnstageVolume(ctx context.Context, in *NodeUnstageVolumeRequest, opts ...grpc.CallOption) (*NodeUnstageVolumeResponse, error)
|
||||
}
|
||||
|
||||
type client struct {
|
||||
|
||||
@@ -83,6 +83,7 @@ type NodeClient struct {
|
||||
NextErr error
|
||||
NextCapabilitiesResponse *csipbv1.NodeGetCapabilitiesResponse
|
||||
NextGetInfoResponse *csipbv1.NodeGetInfoResponse
|
||||
NextStageVolumeResponse *csipbv1.NodeStageVolumeResponse
|
||||
}
|
||||
|
||||
// NewNodeClient returns a new ControllerClient
|
||||
@@ -103,3 +104,7 @@ func (c *NodeClient) NodeGetCapabilities(ctx context.Context, in *csipbv1.NodeGe
|
||||
func (c *NodeClient) NodeGetInfo(ctx context.Context, in *csipbv1.NodeGetInfoRequest, opts ...grpc.CallOption) (*csipbv1.NodeGetInfoResponse, error) {
|
||||
return c.NextGetInfoResponse, c.NextErr
|
||||
}
|
||||
|
||||
func (c *NodeClient) NodeStageVolume(ctx context.Context, in *csipbv1.NodeStageVolumeRequest, opts ...grpc.CallOption) (*csipbv1.NodeStageVolumeResponse, error) {
|
||||
return c.NextStageVolumeResponse, c.NextErr
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user