Simulator Discussions

print_volume.pl in sdk 5.1 error "Unable to find API: volume-list-info" against simulate 8.2.1RC1

mevan
5,010 Views

There seems to be an API mismatch between sample codes in SDK 5.1 and Simulate ONTAP 8.2.1RC1 because I get an error "Unable to find API: volume-list-info" from many of the sample codes.

Is the sample code incorrect or is the simulator missing something?

apitest.pl provides a status of "passed", so does apitest (C).

vollist (C sample) returns "Unable to find API: volume-list-info"

So does print_volume.pl and unified_capacity_mgmt.pl.

Thanks.

3 REPLIES 3

JUERWAREE
4,791 Views

Hi, you can try with "volume-get-root-name" and you can see "volume-get-iter" as well.

Bye.

jnpr
3,351 Views

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();
}
}
}

jnpr
3,349 Views

Hi Maven,

 

 

Are you able to get volume-info using the sample code??

Public