@classmethod
def list(cls, session, paginated=False, **params):
    """This method is a generator which yields resource objects.

        This resource object list generator handles pagination and takes query
        params for response filtering.

        :param session: The session to use for making this request.
        :type session: :class:`~openstack.session.Session`
        :param bool paginated: ``True`` if a GET to this resource returns
                               a paginated series of responses, or ``False``
                               if a GET returns only one page of data.
                               **When paginated is False only one
                               page of data will be returned regardless
                               of the API's support of pagination.**
        :param dict params: These keyword arguments are passed through the
            :meth:`~openstack.resource2.QueryParamter._transpose` method
            to find if any of them match expected query parameters to be
            sent in the *params* argument to
            :meth:`~openstack.session.Session.get`. They are additionally
            checked against the
            :data:`~openstack.resource2.Resource.base_path` format string
            to see if any path fragments need to be filled in by the contents
            of this argument.

        :return: A generator of :class:`Resource` objects.
        :raises: :exc:`~openstack.exceptions.MethodNotSupported` if
                 :data:`Resource.allow_list` is not set to ``True``.
        """
    more_data = True
    query_params = cls._query_mapping._transpose(params)
    uri = cls.base_path % params
    headers = {'Accept': 'application/json', 'Content-type': 'application/json'
        }
    while more_data:
        endpoint_override = cls.service.get_endpoint_override()
        resp = session.get(uri, endpoint_filter=cls.service,
            endpoint_override=endpoint_override, headers=headers, params=
            query_params)
        resp = resp.json()
        if cls.resources_key:
            resp = resp[cls.resources_key]
        if not resp:
            more_data = False
        yielded = 0
        new_marker = None
        for data in resp:
            data.pop('self', None)
            value = cls.existing(**data)
            new_marker = value.id
            yielded += 1
            yield value
        if not paginated:
            return
        if 'limit' in query_params and yielded < query_params['limit']:
            return
        query_params['limit'] = yielded
        query_params['marker'] = new_marker
