'Finds the location of a cached image.
Returns image location local to the NFS share, that matches the
volume_id, if it exists. Otherwise returns the last entry in
cache_result or None if cache_result is empty.'

def _find_image_location(self, cache_result, volume_id):

    found_local_copy = False
    cache_copy = None
    provider_location = self._get_provider_location(volume_id)
    for res in cache_result:
        (share, file_name) = res
        if (share == provider_location):
            cache_copy = res
            found_local_copy = True
            break
        else:
            cache_copy = res
    return (cache_copy, found_local_copy)
