A new Python API example, get_vm_report.py, has been uploaded to our Tintri GitHub site. This new script outputs a CSV report file on all the VMs known to the Tintri server. (A Tintri server is currently a VMstore or TGC.) The script also takes a CSV input file that controls which columns are returned.
The file vm_report_fields.csv is a template that contains all the fields or columns that can be included in the VM report. Each line contains the field name and a short description. To customize your report, copy vm_report_fields.csv to a new file and uncomment the field lines in the new file to be included in the report. An example of this is vm_latency_report_fields.csv. Upon examination, you’ll see that the following field lines are uncommented: VmName, TotalLatency, NewtorkLatency, StorageLatency, and DiskLatency.
The Python script reads the input CSV for the fields, and places the fields in the DTO. The API is invoked and a URL is returned. Using the URL, the report is downloaded. The tintri_1_1.py library was modified to include a file download function.
Until next time,
– Rick –