The transition to NetApp MS Azure AD B2C is complete. If you missed the pre-registration, you will be invited to reigister at next log in.
Please note that access to your NetApp data may take up to 1 hour.
To learn more, read the FAQ and watch the video.
Need assistance? Complete this form and select “Registration Issue” as the Feedback Category.

Software Development Kit (SDK) and API Discussions

Is there an API call to essentially rdfile/?

dunjames_ms

Hi,

I'm looking for a way to read the different configuration files on the filer.  IE, hosts, rc, etc.   Does an API equivalent exist? 

7 REPLIES 7

aborzenkov

Yes. It is called - surprise - file-read-file ☺

STACKSCALE_JDS

Unfortunately, that requires the file to be read to be within a volume:

$ python apitest.py netapp-sim8.local USER PASS file-read-file path /etc/rc offset 0 length 4096

OUTPUT:

<results status="failed" errno="22" reason="Invalid argument, path must begin with /vol/"></results>

any other suggestions?

rle
NetApp Alumni

Hi Jereon,

All files in ONTAP are in a volume.  The documentation for file-read-file states that the volume name must be included in the path. Try:

$ python apitest.py netapp-sim8.local USER PASS file-read-file path /vol/vol0/etc/rc offset 0 length 4096

Regards,

   - Rick -

STACKSCALE_JDS

Thanks Rick, that worked!

rle
NetApp Alumni

Hi Jeroen,

Please mark the question answered.

Thanks,

   - Rick -

STACKSCALE_JDS

Hi Rick,

I would do it but I don't see anywhere where I can do that...

rle
NetApp Alumni

Sorry Jeroen,  Only James can mark it.  I thought you asked the original question.

   - Rick -

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public