'Create a new cinder volume from a given snapshot of a lun
This maps onto a Concerto \'copy  snapshot to lun\'. Concerto
creates the lun and then copies the snapshot into it.
:param snapshot:  cinder snapshot object provided by the Manager
:param volume:  cinder volume to be created'

def _create_volume_from_snapshot(self, snapshot, volume):

    cinder_volume_id = volume['id']
    cinder_snapshot_id = snapshot['id']
    size_mb = (volume['size'] * units.Ki)
    result = None
    spec_dict = {}
    LOG.debug('Copying    snapshot    %(snap_id)s    onto    volume    %(vol_id)s    %(dpy_name)s', {'snap_id': cinder_snapshot_id, 'vol_id': cinder_volume_id, 'dpy_name': snapshot['display_name']})
    source_lun_info = self.vmem_mg.lun.get_lun_info(snapshot['volume_id'])
    self._validate_lun_type_for_copy(source_lun_info['subType'])
    spec_dict = self._process_extra_specs(volume)
    try:
        selected_pool = self._get_storage_pool(volume, size_mb, spec_dict['pool_type'], 'create_lun')
    except exception.ViolinResourceNotFound:
        raise
    except Exception:
        msg = _('No    suitable    storage    pool    found')
        LOG.exception(msg)
        raise exception.ViolinBackendErr(message=msg)
    try:
        result = self.vmem_mg.lun.copy_snapshot_to_new_lun(source_lun=snapshot['volume_id'], source_snapshot_comment=self._compress_snapshot_id(cinder_snapshot_id), destination=cinder_volume_id, storage_pool_id=selected_pool['storage_pool_id'])
        if (not result['success']):
            self._check_error_code(result)
    except Exception:
        LOG.exception('Copy    snapshot    to    volume    for    snapshot    %(snap)s    volume    %(vol)s    failed!', {'snap': cinder_snapshot_id, 'vol': cinder_volume_id})
        raise
    info = self.vmem_mg.lun.get_lun_info(object_id=result['object_id'])
    self._wait_for_lun_or_snap_copy(snapshot['volume_id'], dest_vdev_id=info['virtualDeviceID'])
