Files
gen/openapi/python-asyncio-rest.py.patch
Tomasz Prus 55f9ae0366 add script to create kubernetes_asyncio python client (#60)
* feat: package named kubernetes_asyncio

* feat: fix rest client

* fix: patch rest client to support strategic-merge-patch+json

* fix: docs, move patch to ext. file
2018-06-14 16:40:54 -07:00

30 lines
921 B
Diff

21a22,23
> import asyncio
>
81a84,86
> def __del__(self):
> asyncio.ensure_future(self.pool_manager.close())
>
130a136,138
> if headers['Content-Type'] == 'application/json-patch+json':
> if not isinstance(body, list):
> headers['Content-Type'] = 'application/strategic-merge-patch+json'
164c172,174
< async with self.pool_manager.request(**args) as r:
---
> r = await self.pool_manager.request(**args)
> if _preload_content:
>
168,169c178,179
< # log response body
< logger.debug("response body: %s", r.data)
---
> # log response body
> logger.debug("response body: %s", r.data)
171,172c181,182
< if not 200 <= r.status <= 299:
< raise ApiException(http_resp=r)
---
> if not 200 <= r.status <= 299:
> raise ApiException(http_resp=r)