Skip to content
This repository has been archived by the owner on Mar 13, 2022. It is now read-only.

Async Request fix for Dynamic Client #269

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
44 changes: 30 additions & 14 deletions dynamic/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,20 +267,36 @@ def request(self, method, path, body=None, **params):
# Authentication setting
auth_settings = ['BearerToken']

return self.client.call_api(
path,
method.upper(),
path_params,
query_params,
header_params,
body=body,
post_params=form_params,
async_req=params.get('async_req'),
files=local_var_files,
auth_settings=auth_settings,
_preload_content=False,
_return_http_data_only=params.get('_return_http_data_only', True)
)
if params.get('async_req'):
return self.client.call_api(
path,
method.upper(),
path_params,
query_params,
header_params,
body=body,
post_params=form_params,
async_req=params.get('async_req'),
files=local_var_files,
auth_settings=auth_settings,
_preload_content=False,
_return_http_data_only=params.get('_return_http_data_only', True)
).get()
venukarnati92 marked this conversation as resolved.
Show resolved Hide resolved
else:
return self.client.call_api(
path,
method.upper(),
path_params,
query_params,
header_params,
body=body,
post_params=form_params,
async_req=params.get('async_req'),
files=local_var_files,
auth_settings=auth_settings,
_preload_content=False,
_return_http_data_only=params.get('_return_http_data_only', True)
)

def validate(self, definition, version=None, strict=False):
"""validate checks a kubernetes resource definition
Expand Down