def create_volume_from_snapshot(self, snapshot_id, cinder, prefix='Promoted volume'):
        snapshot = cinder.volume_snapshots.get(snapshot_id)
        volume_size = snapshot.size
        volume_name = prefix + (' %s' % snapshot.volume_id)

        logger.debug('About to create temporary volume from snapshot %s', snapshot_id)
        created_volume = cinder.volumes.create(volume_size, snapshot_id=snapshot_id,
                                               display_name=volume_name)
        volume_id = created_volume.id

        if not self._wait_for_volume_status(volume_id, cinder, 'available', 'error'):
            logger.error('Timed out creating temporary volume from snapshot %s', snapshot_id)
            raise CloudBackendInternalError()

        logger.info('Successfully created temporary volume %s from snapshot %s',
                    volume_id, snapshot_id)

        return volume_id
Create a volume from snapshot
dataset/ETHPy150Open opennode/nodeconductor/nodeconductor/iaas/backend.py/OpenStackBackend.create_volume_from_snapshot