The NetApp Community is moving to a new platform and is in Read-Only mode. Click to learn more.
Stay connected during the transition - Join our Discord community today.

Software Development Kit (SDK) and API Discussions

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

ZhengCai
2,883 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,787 Views

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

Public