def _list(self, url, response_key=None, obj_class=None, body=None,
              expect_single=False):
        resp = self.api.get(url)
        if not resp.content:
            raise exc.HTTPNotFound
        body = resp.json()

        if obj_class is None:
            obj_class = self.resource_class

        if response_key:
            try:
                data = body[response_key]
            except __HOLE__:
                return []
        else:
            data = body
        if expect_single:
            data = [data]
        return [obj_class(self, res, loaded=True) for res in data if res]
dataset/ETHPy150Open openstack/python-cloudkittyclient/cloudkittyclient/common/base.py/Manager._list