Subscribe

Recursive delete of directory using NMSDK

In order to automatically manage home directory creation, access rights setting and cleanup of obsolete homes, we use our IdM system to remotely control the filer via the NMSDK Java API.

But currently it seems to be impossible to recursively delete a directory using the com.netapp.nmsdk.ontap.api.file.FileDeleteDirectoryRequest

In my opinion the solution would be to also implement the "withForce" option as it is available in com.netapp.nmsdk.ontap.api.qtree.QtreeDeleteRequest for use with the com.netapp.nmsdk.ontap.api.file.FileDeleteDirectoryRequest

I'm aware that it is possible to recursively iterate over the directory contents and delete every single file and subdirectory manually until the original directory is empty and can therefore also be deleted.
Unfortunately the solution is impractical for large scale use because of poor performance.

 

Also making every home directory a qtree is impratical because the number of qtrees per volume is limited to something around 5.000 as far as I know.

And also this would introduce unecessary overhead.

 

Would it be possible to extend the API at this point to allow recursive deletes?

Or is there any other solution to my problem that I have overlooked?

 

I would be grateful for any pointers. Thanks for your time in advance.

 

For reference: I also used the search and found the following posts concerning the issue, but none of them could help me solve the problem.