Software Development Kit (SDK) and API Discussions

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

VISHWASTALULE
4,228 Views

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.....

4 REPLIES 4

sens
4,228 Views

Are you using Java Bindings or core Java NMSDK bundle?

VISHWASTALULE
4,228 Views

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.

sens
4,228 Views

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 VolList.java 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.

Regards,

Sen.

VISHWASTALULE
4,228 Views

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????

Public