Software Development Kit (SDK) and API Discussions

How to query Cluster Nodes using the API

billteeple
3,156 Views

Hi,

Is it possible to find out all the nodes in a cluster using the Data_ONTAP API (Java API bindings) ?

The version request returns this version string "NetApp Release 8.1.2 Cluster-Mode: Tue Oct 30 19:51:17 PDT 2012"

I am running the query against the a cluster with two nodes. Actually logging in to the appliance and running "cluster show" command lists the two nodes in the cluster. However there seems to be no way of getting the same info using the API (unless I don't know where to look )

Regards,

--

VI

2 REPLIES 2

aashray
3,155 Views

Hi Bill,

This is possible using the Clustered ONTAP API "system-node-get-iter". This will list all the nodes and many other details of the nodes similar to the cluster show CLI command.

Hope it helped.

- Aashray

billteeple
3,155 Views

Hi Aashray,

Thanks for the info. That does help indeed.

I have been looking at an alternative way as well which gives me a much more detailed information. Would you recommend using NetPortInfo instead ?

I.e. I used NetPortGetIterRequest, set the query object up to have ROLE = CLUSTER i.e. just query for CLUSTER ports and then I get a list of ports back which have the name of cluster node as well as whole load of other information (because its a port)

Is this method reliable as well ?

Regards,

--

Public