'Clone directly in nfs share.'

def _direct_nfs_clone(self, volume, image_location, image_id):

    LOG.info('Checking    image    clone    %s    from    glance    share.', image_id)
    cloned = False
    image_locations = self._construct_image_nfs_url(image_location)
    run_as_root = self._execute_as_root
    for loc in image_locations:
        share = self._is_cloneable_share(loc)
        if (share and self._is_share_clone_compatible(volume, share)):
            LOG.debug('Share    is    cloneable    %s', share)
            volume['provider_location'] = share
            (__, ___, img_file) = loc.rpartition('/')
            dir_path = self._get_mount_point_for_share(share)
            img_path = ('%s/%s' % (dir_path, img_file))
            img_info = image_utils.qemu_img_info(img_path, run_as_root=run_as_root)
            if (img_info.file_format == 'raw'):
                LOG.debug('Image    is    raw    %s', image_id)
                self._clone_backing_file_for_volume(img_file, volume['name'], volume_id=None, share=share)
                cloned = True
                break
            else:
                LOG.info('Image    will    locally    be    converted    to    raw    %s', image_id)
                dst = ('%s/%s' % (dir_path, volume['name']))
                image_utils.convert_image(img_path, dst, 'raw', run_as_root=run_as_root)
                data = image_utils.qemu_img_info(dst, run_as_root=run_as_root)
                if (data.file_format != 'raw'):
                    raise exception.InvalidResults((_('Converted    to    raw,    but    format    is    now    %s') % data.file_format))
                else:
                    cloned = True
                    self._register_image_in_cache(volume, image_id)
                    break
    return cloned
