'Return an iterable of Sample instances from polling the resources.
:param manager: The service manager invoking the plugin
:param cache: A dictionary for passing data between plugins
:param resources: end point to poll data from'

def get_samples(self, manager, cache, resources=None):

    resources = (resources or [])
    h_cache = cache.setdefault(self.CACHE_KEY, {})
    sample_iters = []
    identifier = self.meter_definition.name
    for resource in resources:
        (parsed_url, res, extra_metadata) = self._parse_resource(resource)
        if (parsed_url is None):
            LOG.error('Skip    invalid    resource    %s', resource)
            continue
        ins = self._get_inspector(parsed_url)
        try:
            i_cache = h_cache.setdefault(res, {})
            param_key = ((parsed_url.scheme + '.') + identifier)
            inspector_param = self.cached_inspector_params.get(param_key)
            if (not inspector_param):
                param = getattr(self.meter_definition, (parsed_url.scheme + '_inspector'), {})
                inspector_param = ins.prepare_params(param)
                self.cached_inspector_params[param_key] = inspector_param
            if (identifier not in i_cache):
                i_cache[identifier] = list(ins.inspect_generic(host=parsed_url, cache=i_cache, extra_metadata=extra_metadata, param=inspector_param))
            if i_cache[identifier]:
                sample_iters.append(self.generate_samples(parsed_url, i_cache[identifier]))
        except Exception as err:
            LOG.exception('inspector    call    failed    for    %(ident)s    host    %(host)s:    %(err)s', dict(ident=identifier, host=parsed_url.hostname, err=err))
    return itertools.chain(*sample_iters)
