#Folder creation in a volume using CLI

1 messages · Page 1 of 1 (latest)

gloomy ruin
#

Hello,
Is there a way to create a folder inside a volume by using the ontap CLI or any API, except by creating a qtree ?

velvet hill
#

Not in a supported way, no. What are you trying to do? A directory doesn't do anything without client access anyway?

gloomy ruin
#

It is in order to create and configure CIFS shares in a volume fully from the CLI. if the path does not exist in the volume, I cannot create the share before creating the folder manually first... 😢 Should be a good point to have an option in the create share command to create the folder in the path if it doesn't exist.

harsh yacht
#

You could create a qtree instead.

gloomy ruin
#

we were doing it using the powershell command New-NcDirectory, but I have to find a new way to perform the same thing because I have NAS in env without Powershell possible.

velvet hill
gloomy ruin
#

sure, but some SVM on my cluster is in different AD Domain and i have to connect to others jump host in order to access to c$. I cannot automatize this

velvet hill
#

you can use the New-NcDirectory Cmdlet from the ONTAP PowerShell Toolkit

gloomy ruin
#

yes but in the secure env, I don't have the right to use external powershell toolkit 😅😂

velvet hill
#

you can probably cobble together the REST or XMLRPC API call without the PSTK though

gloomy ruin
#

that's why I'm searching a way to do it

#

if someone know the rest api version, i have access to a linux with curl 😅

velvet hill
#

I don't think it's in the REST API already. You probably need to use the XMLRPC (ZAPI) version

#

ZExplore (from the Manageability SDK) can help you create the API call

#

note that XMLRPC is much trickier to do "by hand" (without the proper modules/libraries) than REST

#

so good luck in getting it to work without access to any "external" modules/libraries

wide plank
velvet hill
#

okay I was only looking at the swagger docs and there I couldn't find it