NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform.
You will still be able to view content, but posting and replying will be temporarily disabled.
To learn more, please review the information in this blog post.

Software Development Kit (SDK) and API Discussions

What is the best API to find the NFS server address of the cluster?

ZhengCai
2,879 Views

 In order to let a client mount a NFS volume on the cluster, we need to find out the IP address of the NFS server.

 

Currently we call the "net-interface-get-iter" API to list all interfaces on the cluster, and then find the interface with a "nfs" substring in its name. Then we can use this interface's IP address to mount the NFS volume. For example, the NFS interface in our cluster has this name: "TME_BENCH_nfs_lif1"

 

However, this looks very hacky to me... So I was just wondering, what would be the best API call to directly find out the IP address of the NFS server for a client to mount to?

 

Regards

1 REPLY 1

yannb
2,783 Views

I think network interface object has a "data-protocols" array that you can iterate to find nfs.

Public