_network.py 文件源码

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

项目:txkube 作者: LeastAuthority 项目源码 文件源码
def list(self, kind):
        """
        Issue a I{GET} to retrieve objects of a given kind.
        """
        action = start_action(
            action_type=u"network-client:list",
            kind=kind.kind,
            apiVersion=kind.apiVersion,
        )
        with action.context():
            url = self.kubernetes.base_url.child(*collection_location(kind))
            d = DeferredContext(self._get(url))
            d.addCallback(check_status, (OK,), self.model)
            d.addCallback(readBody)
            d.addCallback(
                lambda body: self.model.iobject_from_raw(loads(body)),
            )
            return d.addActionFinish()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号