ONTAP Discussions

Get empty response to read a file - FileInfo({})

felipec
748 Views

I'm trying to use this example to read a file but getting always an empty response (tried multiples files), is it my code or something else is missing?

 

 

from netapp_ontap import HostConnection
from netapp_ontap.resources import FileInfo

with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
    resource = FileInfo("54c06ce2-5430-11ea-90f9-005056a73aff", path="aNewFile")
    resource.get(byte_offset=0, length=100)
    print(resource)

 

 

The response that I get is:

 

 

FileInfo({})

 

 

Is that response right?

python version: 3.9.16
netapp-ontap version: 9.13.1.0

1 ACCEPTED SOLUTION

elementx
717 Views

You can use curl with a Swagger-formed command to see if the response is consistent.

View solution in original post

1 REPLY 1

elementx
718 Views

You can use curl with a Swagger-formed command to see if the response is consistent.

Public