def patch_status(self, path, data):
LOG.debug("Patch_status %(path)s: %(data)s", {
'path': path, 'data': data})
path = path + '/status'
url, header = self._get_url_and_header(path)
response = requests.patch(url, json={"status": data},
headers=header, cert=self.cert,
verify=self.verify_server)
if response.ok:
return response.json().get('status')
raise exc.K8sClientException(response.text)
评论列表
文章目录