def NodeUnstageVolume(self, request, context): img_file = rawfile_util.img_file(request.volume_id) staging_path = request.staging_target_path mount_path = Path(f"{staging_path}/mount") be_unmounted(mount_path) be_absent(mount_path) device_path = Path(f"{staging_path}/device") be_absent(device_path) detach_loops(img_file) return csi_pb2.NodeUnstageVolumeResponse()
def NodeUnstageVolume(self, request, context): mount_path = f"{request.staging_target_path}/mount" be_unmounted(mount_path) be_absent(mount_path) bd_unpublish_request = NodeUnpublishVolumeRequest() bd_unpublish_request.volume_id = request.volume_id bd_unpublish_request.target_path = f"{request.staging_target_path}/device" self.bds.NodeUnpublishVolume(bd_unpublish_request, context) bd_unstage_request = NodeUnstageVolumeRequest() bd_unstage_request.CopyFrom(request) bd_unstage_request.staging_target_path = f"{request.staging_target_path}/block" self.bds.NodeUnstageVolume(bd_unstage_request, context) be_absent(bd_unstage_request.staging_target_path) return csi_pb2.NodeUnstageVolumeResponse()
def NodeUnpublishVolume(self, request, context): mount_path = request.target_path be_unmounted(mount_path) return csi_pb2.NodeUnpublishVolumeResponse()
def NodeUnpublishVolume(self, request, context): be_unmounted(request.target_path) be_absent(request.target_path) return csi_pb2.NodeUnpublishVolumeResponse()