Software Development Kit (SDK) and API Discussions

Quota management delegation

mg
NetApp
3,455 Views

Hello,

 

Here's a Powershell script that allows reading and setting qtree-based quotas based on a UNC (can also be a DFS path!).

I wrote this script for a customer who is looking to delegate CIFS administration as much as possible to Windows admins through the use of vFilers, and the ability to see and set a quota on a qtree was raised as very important. Quota entries are expected to be already present, the script is only meant to update an existing quota.

 

The biggest problem was that Windows admins are working with DFS, thus they don't know on which vFiler (physical path) a qtree is. So the script is able to perform a DFS referral query to get the physical UNC path, then the qtree path and the quota can be obtained by requesting the info to the vFiler.

 

To make the script run, ManageOntap.dll should be in the same folder as the 2 files. A role with the following capabilities is required on each Filer/vFiler:

api-quota-get-entry

api-quota-set-entry

api-quota-resize

api-cifs-share-list-iter-start

api-cifs-share-list-iter-next

api-cifs-share-list-iter-end

api-system-get-version

api-system-get-ontapi-version

Script assumes an RPC authentication but parameter "-InteractiveLogin" will allow using "user/password" path instead.

 

Any comments/questions welcome!

 

Kind regards,

Michel

0 REPLIES 0
Public