Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

list_volume_qos_histograms doesn't seem to work #59

Open
scaleoutsean opened this issue Nov 18, 2023 · 1 comment
Open

list_volume_qos_histograms doesn't seem to work #59

scaleoutsean opened this issue Nov 18, 2023 · 1 comment

Comments

@scaleoutsean
Copy link
Contributor

  • Python 3.10.12
  • solidfire-sdk-python 12.3.0.203

According to the docs, volume_ids are optional.

list_volume_stats and list_volume_qos_histograms is supposed to work the same way, but it doesn't.

>>> sfe.list_volume_stats()
2023-11-19 00:06:42,763 - solidfire.Element - INFO - {"method": "ListVolumeStats", "id": 19, "params": {}}
ListVolumeStatsResult(volume_stats=....
<snip>

>>> sfe.list_volume_qos_histograms()
2023-11-19 00:06:47,947 - solidfire.Element - INFO - {"method": "ListVolumeQoSHistograms", "id": 20, "params": {}}
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/sean/.local/lib/python3.10/site-packages/solidfire/__init__.py", line 3126, in list_volume_qos_histograms
    return self.send_request(
  File "/home/sean/.local/lib/python3.10/site-packages/solidfire/common/__init__.py", line 668, in send_request
    return model.extract(result_type, response['result'])
  File "/home/sean/.local/lib/python3.10/site-packages/solidfire/common/model.py", line 75, in extract
    return_value = typ.extract(src, False)
  File "/home/sean/.local/lib/python3.10/site-packages/solidfire/common/model.py", line 348, in extract
    ctor_dict[name] = prop.extract_from(data_val)
  File "/home/sean/.local/lib/python3.10/site-packages/solidfire/common/model.py", line 160, in extract_from
    return [] if data is None else [extract(self._member_type, x) for x
  File "/home/sean/.local/lib/python3.10/site-packages/solidfire/common/model.py", line 160, in <listcomp>
    return [] if data is None else [extract(self._member_type, x) for x
  File "/home/sean/.local/lib/python3.10/site-packages/solidfire/common/model.py", line 75, in extract
    return_value = typ.extract(src, False)
  File "/home/sean/.local/lib/python3.10/site-packages/solidfire/common/model.py", line 348, in extract
    ctor_dict[name] = prop.extract_from(data_val)
  File "/home/sean/.local/lib/python3.10/site-packages/solidfire/common/model.py", line 160, in extract_from
    return [] if data is None else [extract(self._member_type, x) for x
TypeError: 'int' object is not iterable

It also doesn't work with an array.

image

@scaleoutsean
Copy link
Contributor Author

scaleoutsean commented Nov 18, 2023

Forgot to mention in the case somebody comes across this before it's fixed: the old "invoke" workaround still works fine. {"volume_ids": [1]} has no effect, all volumes' QoS histograms get listed.

sfe.invoke_sfapi("ListVolumeQoSHistograms", parameters={})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant