Hi ,
I have executed below sample code and got the error " Unable to find API: volume-list-info-iter-start" .How to fix this error???
import com.netapp.nmsdk.client.ApiRunner;
import com.netapp.nmsdk.client.ApiTarget;
import com.netapp.nmsdk.client.ApiTarget.TargetType;
import com.netapp.nmsdk.ontap.api.aggr.AggrInfo;
import com.netapp.nmsdk.ontap.api.aggr.AggrListInfoRequest;
import com.netapp.nmsdk.ontap.api.aggr.AggrListInfoResponse;
import com.netapp.nmsdk.ontap.api.volume.VolumeInfo;
import com.netapp.nmsdk.ontap.api.volume.VolumeListInfoIterStartRequest;
import com.netapp.nmsdk.ontap.api.volume.VolumeListInfoIterStartRequest;
import java.util.Iterator;
import java.util.List;
public class VolList {
public static void main(String[] args) {
try {
ApiRunner runner = new ApiRunner(ApiTarget.builder()
.withHost("-------")
.withUserName("----")
.withPassword("-----")
.withTargetType(TargetType.FILER)
.useHttp()
.build());
System.out.println("The application is connected");
VolumeListInfoIterStartRequest volListReq = new VolumeListInfoIterStartRequest();
Iterator<VolumeInfo> volumeIter = runner.iterate(volListReq, 10);
VolumeInfo volume;
while(volumeIter.hasNext()) {
System.out.println("------------------------------------------------");
volume = volumeIter.next();
System.out.println("Name : " + volume.getName());
System.out.println("Type : " + volume.getType());
System.out.println("State : " + volume.getState());
System.out.println("Total size (bytes) : " + volume.getSizeTotal());
System.out.println("Used size (bytes) : " + volume.getSizeUsed());
System.out.println("------------------------------------------------");
}
}
catch(Exception e) {
e.printStackTrace();
}
}
}