NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

Software Development Kit (SDK) and API Discussions

Perl API to add/modify user quota on cluster mode filers

rahuldhek
4,400 Views

Need some help to add/create quota for the users.

I am ablr to GET the quota report but not able to modify/add quota for existing/new users.

Any leads would be appreaciated.

 

Thanks,

Rahul

1 ACCEPTED SOLUTION

asulliva
4,384 Views

Hello Rahul,

 

I think this thread might help answer your question.

 

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

View solution in original post

3 REPLIES 3

asulliva
4,385 Views

Hello Rahul,

 

I think this thread might help answer your question.

 

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

rahuldhek
4,348 Views

Thanks for the quick reply.

Could not get much help.. following is the snippet where I am getting the error:

 

if ($filer_type eq "ontap-cm"){
                $out = $s->invoke( "quota-add-entry",
                            "disk-limit","$disklimit",
                            "quota-type","user",
                            "quota-target","$uid",
                            "volume","$volume");

                        if ($out->results_status() eq "failed"){
                                print($out->results_errno());
                                print($out->results_reason());
                         }
}
else{
                $out = $s->invoke( "quota-add-entry",
                            "disk-limit","$disklimit",
                            "quota-type","user",
                            "volume","$volume",
                            "quota-target","$uid",
                            "qtree","$qtree" );
               

                        if ($out->results_status() eq "failed"){
                                print ($out->results_errno());
                                print($out->results_reason());
                        }
}

The snippet works perfectly fine when the filer type is "ontap" but throws an error when filer type is "ontap-cm"

The error message is "13005 Unable to find API: quota-add-entry ".

 

Any help/lead would be appreciated.

 

Thanks,

Rahul

asulliva
4,319 Views

The "quota-add-entry" API must be directed at a SVM/vserver.  Make sure you're either connecting to the SVM admin LIF, or doing vserver tunneling from the cluster LIF.

 

Hope that helps.

 

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
Public