Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
volume-get-iter api not fetching full volume list from cluster

2014-08-14
09:51 AM
4,360 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
API "volume-get-iter” is used to get the list of volumes on a cluster. When we run this against a cluster which has more than 1000 volumes, it is not retrieving entire volume list. For example, when we ran this on a cluster, it returned 1002 volumes but we have 1258 volumes on that cluster.
Here is the sample code used to retrieve the list of volumes on a cluster. please let me know if any one has experienced this issue.
my $in = NaElement->new("volume-get-iter");
$in->child_add_string( 'max-records', 10000 );
my $output = $cluster_conn->invoke_elem($in);
if ( $output->results_errno != 0 ) {
exit;
}
else
{
foreach ( $output->child_get("attributes-list")->children_get() )
{
my $volname = $_->child_get("volume-id-attributes")->child_get_string("name");
my $aggrname = $_->child_get("volume-id-attributes")->child_get_string("containing-aggregate-name");
print "$aggrname,$volname\n";
}
}
Regards
Unni
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you checking for a next-tag entry on the response?
If there are more entries than can fit in the response (you have set max-records to 1000) then you should get a tag in the answer
You need to make a new request with the content of the next-tag under a tag entry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This would be by design. It's an iteration so you need to handle the 'page' size returned.
