Now if I run that using a real volume UUID and path, I get:
netapp_ontap.error.NetAppRestError: Caused by HTTPError('400 Client Error: Bad Request for url: https://abc123-mgmt:443/api/storage/volumes/60c2a6c2-25f2-11eb-87c4-000c29e6051b/files/test_1?return_metadata=True'): Unexpected argument "return_metadata".
and sure enough, if I try and put that URL into a browser (after passing in credentials):
"Unexpected argument \"return_metadata\"."
So am I doing something wrong, are the docs wrong?
I may have jumped the gun on the solved part. If I pull up the URL via the management interface of the cluster with the API call then I get the file information (in this case the metadata of the qtree itself). However, when I do the same from python I just get the "_links" section back. I've stripped the test case back to this (based on your code and the docs):
from netapp_ontap import HostConnection
from netapp_ontap.resources import FileInfo
with HostConnection("<ip_addr>", "<user>", "<password>", verify=False😞
What version of the netapp_ontap library do you have installed? If you update it to the latest, does it change the output? You might want to try the latest rc release: https://pypi.org/project/netapp-ontap/#history. I tried both 9.7.3 and 9.8.0rc1 and in the 9.7.3 version I get the same output as you. With the 9.8.0rc1 version, I get all the fields.
Even if your cluster is running 9.7, you can use the 9.8 version of the library and everything will still work since it's backwards compatible.