swevm / scaleio-py

ScaleIO API Bindings
Apache License 2.0
13 stars 14 forks source link

statistics class + property #31

Closed kevin-rondinone closed 2 years ago

kevin-rondinone commented 9 years ago

Created a Statistics class and property for getting cluster stats

swevm commented 9 years ago

Thanks for the addition. Do you have any example code that uses this functionality? Would be great to add to show how it can be used.

kevin-rondinone commented 9 years ago

I wrote it so it would work just like your other methods:

print cluster statistics:

pprint(sio.statistics)

if you look at the 3 lines commented out in scaleio.py (lines 938-940) I just modeled it after your other similar methods. But for some reason it does not want to append the statistics to a list. So right now it just returns the API call's response.