Which Folders are you referring to?
Workflow Folders in vCO?
Or Host/VM/Datastore-Folder in vCenter?
For both you can try to find some scripting examples in the library how to traverse these recursivly.
(For Workflow Folder for instance there are some com.vmware.webview.getallXXXX of category actions)
Sorry for my lack of clarity.
I am looking for VM fodlers in vCenter.
Essentially what I have is folder structure something like this:
I want to specify the WINDOWS folder, and then have the user choose here to place his newly created VM, by choosing one of the subfolders.
I didn't see any sort of action that seemed to get all of the subfolders of a folder. I'll look again though.
1 person found this helpful
There is a presentation properties called "select a root object to be shown in the chooser".
You can create an attribute with specifying the root folder and use it in this property.
So, I created an attribute, called "WSSFolder, made it a type VC:VmFolder, and assigned the Top level "WINDOWS" folder to it.
In the presentation for the field I want the user to select, I chose 'Specify a root object to be shown in the chooser', and for the value i tried #WSSFolder.
That didnt seem to work. Am I not understnading how to use this field?
Yes, that is what I did.
I see what is going on now.
I also had added the "Select Value AS" -> Drop-Down property.
Somehow that undoes the "Specify root object" Property. Maybe a bug? Or maybe that is as designed and I just dont understand how it is supposed to be used?
A select value as drop down does disable the tree view. Not sure if this is a bug or a non implementation of a features.
If you want to use it you could create an action returning all the VMs for a vCenter folder and use it with the predefined list of elements properties.
I think I might do that.