solidfire-sdk-python
solidfire-sdk-python copied to clipboard
list_volume_qos_histograms doesn't seem to work
- 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.
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={})
Doh... Should be VolumeIDs
, not volumeIDs
...
{
"method": "ListVolumeQoSHistograms",
"params": {
"VolumeIDs": [134]
},
"id": 1
}