I am able to run non-iterator based calls, such as getStorageArrays, but the computeTotalStoragePerArray.pl example program loops through each array with
each array is not working. It throws this error:
The method name 'null' in the request iterator, does not match the expected method name'VolumeRequest(storageId=86528). context=APISessionContext{clientVersion=1.0,id=3d92ee26:14be69a2397:-7fd2,time=1425575394391,limit=1000}
code snippet:
foreach my $storageArrayObject (@allStorageObjects) {
# We need to build an empty request iterator to seed the call
$iterObject = new SOAPParam( "RequestIterator_2", "namesp1:RequestIterator");
print $storageArrayObject->name() . "\n\n";
my $size = 0;
my @allVolumeObjects;
do {
my $arrayRequester = new SOAP::Data(
value => $storageArrayObject->id(),
name => "String_3",
type => "string");
print Dumper($APIContext);
print Dumper($iterObject);
print Dumper($arrayRequester);
my $volumeResponse = $Soap->getVolumesByStorageArray($APIContext->getSOAP(), $iterObject->getSOAP(), $arrayRequester );
print "foo\n";
$iterObject = Iterator->parseResult($volumeResponse);
my @currVolumeObjects= Volume->parseResult($volumeResponse);
push @allVolumeObjects, @currVolumeObjects;
} while($iterObject->hasMore() eq "true");
foreach my $volume (@allVolumeObjects){
$size += $volume->capacityGB();
}
print "Size in GB as returned by summing the volume sizes: ". $size . "\n\n\n";
}