'Create a volume from a snapshot and return its properties.'

def create_volume_from_snapshot(self, volume, snapshot):

    ldev = utils.get_ldev(snapshot)
    if (ldev is None):
        msg = utils.output_log(MSG.INVALID_LDEV_FOR_VOLUME_COPY, type='snapshot', id=snapshot['id'])
        raise exception.VSPError(msg)
    size = volume['size']
    metadata = utils.get_volume_metadata(volume)
    if (size < snapshot['volume_size']):
        msg = utils.output_log(MSG.INVALID_VOLUME_SIZE_FOR_COPY, type='snapshot', volume_id=volume['id'])
        raise exception.VSPError(msg)
    elif ((size > snapshot['volume_size']) and (not self.check_vvol(ldev)) and (self.get_copy_method(metadata) == 'THIN')):
        msg = utils.output_log(MSG.INVALID_VOLUME_SIZE_FOR_TI, copy_method=utils.THIN, type='snapshot', volume_id=volume['id'])
        raise exception.VSPError(msg)
    sync = (size > snapshot['volume_size'])
    new_ldev = self._copy_ldev(ldev, snapshot['volume_size'], metadata, sync)
    if sync:
        self.delete_pair(new_ldev)
        self.extend_ldev(new_ldev, snapshot['volume_size'], size)
    return {'provider_location': six.text_type(new_ldev)}
