-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
I plan on querying a flasharray for performance values multiple times and was interested when i saw the async_req
keyword argument which nearly all functions offer.
Unfortunately it does always lead to the same error since the case of an async request is not considered in _create_valid_response
.
Thanks for your work!
>>> client.get_arrays_performance(async_req=True)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-10-3e53083da46e> in <module>
----> 1 client.get_arrays_performance(async_req=True)
~/.cache/pypoetry/virtualenvs/pure-metrics-yo8xLWQk-py3.9/lib/python3.9/site-packages/pypureclient/flasharray/FA_2_7/client.py in get_arrays_performance(self, authorization, x_request_id, filter, end_time, resolution, start_time, protocol, protocol_group, limit, offset, sort, total_item_count, async_req, _return_http_data_only, _preload_content, _request_timeout)
3570 kwargs = {k: v for k, v in kwargs.items() if v is not None}
3571 endpoint = self._arrays_api.api27_arrays_performance_get_with_http_info
-> 3572 return self._call_api(endpoint, kwargs)
3573
3574 def get_arrays_space(
~/.cache/pypoetry/virtualenvs/pure-metrics-yo8xLWQk-py3.9/lib/python3.9/site-packages/pypureclient/flasharray/FA_2_7/client.py in _call_api(self, api_function, kwargs)
26043 response = api_function(**kwargs)
26044 # Call was successful (200)
> 26045 return self._create_valid_response(response, api_function, kwargs)
26046 except ApiException as error:
26047 # If no chance for retries, return the error
~/.cache/pypoetry/virtualenvs/pure-metrics-yo8xLWQk-py3.9/lib/python3.9/site-packages/pypureclient/flasharray/FA_2_7/client.py in _create_valid_response(self, response, endpoint, kwargs)
26088 ValidResponse
26089 """
> 26090 body, status, headers = response
26091 continuation_token = getattr(body, "continuation_token", None)
26092 total_item_count = getattr(body, "total_item_count", None)
TypeError: cannot unpack non-iterable ApplyResult object
Metadata
Metadata
Assignees
Labels
No labels