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()
评论列表
文章目录