public override async Task <NodeUnpublishVolumeResponse> NodeUnpublishVolume(NodeUnpublishVolumeRequest request, ServerCallContext context) { await _service.UnpublishDeviceAsync(new HypervNodeUnpublishRequest { Name = request.VolumeId, TargetPath = request.TargetPath }, context.CancellationToken); var rsp = new NodeUnpublishVolumeResponse { }; return(rsp); }
public override async Task <NodeUnpublishVolumeResponse> NodeUnpublishVolume( NodeUnpublishVolumeRequest request, ServerCallContext context) { var id = request.VolumeId; var targetPath = request.TargetPath; using (var _s = logger.StepInformation("{0}, id: {1}, targetPath: {2}", nameof(NodeUnpublishVolume), id, targetPath)) { await smbShareAttacher.DetachAsync(targetPath); _s.Commit(); } await Task.CompletedTask; return(new NodeUnpublishVolumeResponse()); }