def push(self, volume, destination):
        if volume.node_id != self.node_id:
            raise ValueError()
        fs = volume.get_filesystem()
        getting_snapshots = destination.snapshots(volume)

        def got_snapshots(snapshots):
            with destination.receive(volume) as receiver:
                with fs.reader(snapshots) as contents:
                    for chunk in iter(lambda: contents.read(1024 * 1024), b""):
                        receiver.write(chunk)

        pushing = getting_snapshots.addCallback(got_snapshots)
        return pushing
Push the latest data in the volume to a remote destination.
dataset/ETHPy150Open ClusterHQ/flocker/flocker/volume/service.py/VolumeService.push