(ansible) 21-11-16 2:45:14 venu.karnati@ABOUTPIANOORIGIN:~/Desktop/gitProject/python/examples/dynamic-client$ python namespaced_custom_resource.py Traceback (most recent call last): File "namespaced_custom_resource.py", line 250, in <module> main() File "namespaced_custom_resource.py", line 192, in main ingressroute_api.create(body=ingressroute_manifest_first, namespace=namespace_first, async_req=True) File "/Users/venu.karnati/.pyenv/versions/ansible/lib/python3.6/site-packages/kubernetes/dynamic/client.py", line 119, in create return self.request('post', path, body=body, **kwargs) File "/Users/venu.karnati/.pyenv/versions/ansible/lib/python3.6/site-packages/kubernetes/dynamic/client.py", line 62, in inner return serializer(self, json.loads(resp.data.decode('utf8'))) AttributeError: 'ApplyResult' object has no attribute 'data'
Synchronous Implementation with this example is working fine https://github.com/kubernetes-client/python/blob/master/examples/dynamic-client/namespaced_custom_resource.py
Now to make creation process as async update line number 192 on the above example to the following
ingressroute_api.create(body=ingressroute_manifest_first, namespace=namespace_first, async_req=True)
Error Message
(ansible) 21-11-16 2:45:14 venu.karnati@ABOUTPIANOORIGIN:~/Desktop/gitProject/python/examples/dynamic-client$ python namespaced_custom_resource.py Traceback (most recent call last): File "namespaced_custom_resource.py", line 250, in <module> main() File "namespaced_custom_resource.py", line 192, in main ingressroute_api.create(body=ingressroute_manifest_first, namespace=namespace_first, async_req=True) File "/Users/venu.karnati/.pyenv/versions/ansible/lib/python3.6/site-packages/kubernetes/dynamic/client.py", line 119, in create return self.request('post', path, body=body, **kwargs) File "/Users/venu.karnati/.pyenv/versions/ansible/lib/python3.6/site-packages/kubernetes/dynamic/client.py", line 62, in inner return serializer(self, json.loads(resp.data.decode('utf8'))) AttributeError: 'ApplyResult' object has no attribute 'data'