'Create new volume from existing snapshot.
:param volume: reference of volume to be created
:param snapshot: reference of source snapshot'

def create_volume_from_snapshot(self, volume, snapshot):

    create_params = {'name': self._get_dbref_name(volume), 'capacity': int((volume['size'] * units.Gi)), 'src': {'volume_id': snapshot['volume_id'], 'snapshot_id': snapshot['id']}}
    LOG.debug('Creating    volume    from    snapshot    %(id)s', snapshot, resource=volume)
    return self._create_volume(volume['id'], create_params, user_id=volume['user_id'], project_id=volume['project_id'])
