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
Fetch quota report for cluster mode filers using NetApp Perl APIs
2016-08-17
03:03 AM
2,520 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using the following LOC to fetch the report. It geneartes the report but the report contains details for a different volume(Not expected) and does not contain any details of the expected volume. I tried verifying by doing a SSH to the particular filer and check the quota entry for a particluar volume. There I see the entries for all the required users for that volume. Don't know where I am missing and what I am missing.
Any leads will be helpful.
Below is the snippet to fetch the report:
$s = NaServer->new($filer, 1, 21 ); $s->set_server_type('FILER'); $s->set_transport_type('HTTPS'); $s->set_port(443); $s->set_style('LOGIN'); $s->set_admin_user('user','passwd'); $api = NaElement->new('quota-report-iter'); my $xo = $s->invoke_elem($api); if ( $xo->results_status() eq 'failed' ) { } else{ my @temp= $xo->sprintf(); }
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
With clustered Data ONTAP you'll need to specify which SVM you want to target. You can further limit the returned results by specifying the volume too.
use Data::Dumper; $s = NaServer->new($filer, 1, 21 ); $s->set_server_type('FILER'); $s->set_transport_type('HTTPS'); $s->set_port(443); $s->set_style('LOGIN'); $s->set_admin_user('user','passwd'); # specify the SVM $s->set_vserver('mySvm'); # specify the volume in the request my $xo = $s->invoke('quota-report-iter', 'path', '/vol/myVol'); if ( $xo->results_status() eq 'passed' ) { # you can get a pretty print of the returned object # using Data::Dumper print Dumper($xo); } else { print $xo->results_reason(); }
Hope that helps.
Andrew
If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
