VMware Cloud Community
manfriday
Enthusiast
Enthusiast
Jump to solution

getAllSubfolders ?

Hi,

I am working on a filed in presentation..

What I want to do it feed it a default folder and populate drop down with all of the subfolders.

I dont see a getAllFolders or getAllSubFolders action.

is there any way to do what I am trying to accomplish?

Thanks

Jason

Reply
0 Kudos
1 Solution

Accepted Solutions
cdecanini_
VMware Employee
VMware Employee
Jump to solution

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.

Christophe.

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you! Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator for vCenter Orchestrator tips and tutorials - @vCOTeam on Twitter

View solution in original post

Reply
0 Kudos
8 Replies
tschoergez
Leadership
Leadership
Jump to solution

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)

Regards,

Joerg

Reply
0 Kudos
manfriday
Enthusiast
Enthusiast
Jump to solution

Sorry for my lack of clarity.

I am looking for VM fodlers in vCenter.

Essentially what I have is folder structure something like this:

WINDOWS

          Webservers

          File/Print Servers

          Database servers

          etc..

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.

Reply
0 Kudos
cdecanini_
VMware Employee
VMware Employee
Jump to solution

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.

Christophe.

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you! Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator for vCenter Orchestrator tips and tutorials - @vCOTeam on Twitter
manfriday
Enthusiast
Enthusiast
Jump to solution

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?

Reply
0 Kudos
cdecanini_
VMware Employee
VMware Employee
Jump to solution

I have just did it and it works for me:

Screen shot 2011-12-14 at 8.34.05 PM.png

Screen shot 2011-12-14 at 8.34.48 PM.png

Is this waht you did ?

Christophe.

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you! Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator for vCenter Orchestrator tips and tutorials - @vCOTeam on Twitter
manfriday
Enthusiast
Enthusiast
Jump to solution

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?

Reply
0 Kudos
cdecanini_
VMware Employee
VMware Employee
Jump to solution

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.

Christophe.

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you! Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator for vCenter Orchestrator tips and tutorials - @vCOTeam on Twitter
Reply
0 Kudos
manfriday
Enthusiast
Enthusiast
Jump to solution

I think I might do that.

Thanks!

Reply
0 Kudos