Software Development Kit (SDK) and API Discussions

How to get list of LUN's, Disks and aggregates in a volume using java?


I want to get information about disks, LUNs and aggregates using netapp api and java exactly similar to volumelist given in sample code.

How can I achieve that using java?

Thanks in advance.....



Are you using Java Bindings or core Java NMSDK bundle?


NMSDK 8.1.

I tried demo given with sdk 8.1. It is working for volume list. Same kind of data I want to display for LUNs, Disks and aggregates.


Hi Vishwas,

There is no NMSDK 8.1 version at this moment.

However, from your responses I am assuming the following:

  • You are probably using NMSDK 5.1 Java Bindings bundle and the jar you are using is - ontap-api-8.1.jar
  • You are using Data ONTAP 8.1
  • The storage system is in 7 Mode [since sample code is working for you].

Based on these assumptions, please find the response to your queries below:

  • To display LUNs, you need to use LunListInfoRequest and LunListInfoResponse classes.
  • For Disks, you have use DiskListInfoRequest and DiskListInfoResponse classes.
  • And for aggregates, you will have to use AggrListInfoRequest and AggrListInfoResponse classes.

Details of these classes can be found from ontap-api-8.1-javadoc.jar [available under doc\Data_ONTAP\ directory].

[You can extract this jar and open the index.html from the extracted directory to see the javadoc for the classes].

Please feel free to revert back if you still have more queries on this.




Exactly Sens..

I am using these classes.

But don't know how to use response and request class together.

Here is my code:

Here is a code:

LunListInfoRequest lunreq = new LunListInfoRequest();

System.out.println("luninfo is .. " + lunreq);

Iterator<LunInfo> lunInfoIter = apirunner.iterate(lunreq,10);

In this code I got error to iterate method at line 3.

Is there any alternate way to iterate the object?

Can you guide me with piece of code please????

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