base.py 文件源码

python
阅读 35 收藏 0 点赞 0 评论 0

项目:watcher-tempest-plugin 作者: openstack 项目源码 文件源码
def _list_request(self, resource, permanent=False, **kwargs):
        """Get the list of objects of the specified type.

        :param resource: The name of the REST resource, e.g., 'audits'.
        "param **kw: Parameters for the request.
        :return: A tuple with the server response and deserialized JSON list
                 of objects
        """

        uri = self._get_uri(resource, permanent=permanent)
        if kwargs:
            uri += "?%s" % urlparse.urlencode(kwargs)

        resp, body = self.get(uri)
        self.expected_success(200, int(resp['status']))

        return resp, self.deserialize(body)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号