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

Creating a new quota entry

jivam
2,200 Views

Getting the error when creating a new quota entry when using the NetApp sdk

 

below are the input parameters

<?xml version="1.0" encoding="UTF-8"?>
<netapp vfiler="vservername" xmlns="http://www.netapp.com/filer/admin" version="1.150">
<quota-add-entry>
<disk-limit>40000</disk-limit>
<qtree>""</qtree>
<quota-target>/vol/volname/qtre3name</quota-target>
<quota-type>tree</quota-type>
<volume>volname</volume>
</quota-add-entry>
</netapp>

 

Below is the error

 

<!-- Output of quota-add-entry [Execution Time: 327 ms] -->
<results reason='Qtree cannot be specified for a tree type rule. ' errno='13051' status='failed'/>

 

The API documentation states to use "" for the qtree when using type tree

 

Is this a bug in the API execution

 

or am I missing something?

 

Thanks

 

 

1 REPLY 1

donny_lang
2,106 Views

Try using a null value for the "qtree" input. This API call worked in my lab environment to set the quota:

<?xml version="1.0" encoding="UTF-8"?>
<netapp vfiler="lab-svm-01" xmlns="http://www.netapp.com/filer/admin" version="1.150">
<quota-add-entry>
<disk-limit>40000</disk-limit>
<qtree></qtree>
<quota-target>/vol/qtreetest/test1</quota-target>
<quota-type>tree</quota-type>
<volume>qtreetest</volume>
</quota-add-entry>
</netapp>

 

lab-clst01::> volume quota policy rule show

Vserver: lab-svm-01        Policy: default           Volume: qtreetest

                                               Soft             Soft
                         User         Disk     Disk   Files    Files
Type   Target    Qtree   Mapping     Limit    Limit   Limit    Limit  Threshold
-----  --------  ------- -------  --------  -------  ------  -------  ---------
tree   test1     ""      -         39.06MB        -       -        -          -
Public