List vmware folders in service dialog

Hi, I would like to use a dynamic dropdown menu for listing existing folders in vsphere for deployment. (chosen folder will be hand over as param to ansible ). I am not sure how to write this method, which object collects these informations.

ems = $evm.vmdb(:ems).where(name: <name>)
all_folders = $evm.vmdb(:ems_folder).where(ems_id: ems.id)
puts all_folders.map{|folder|  folder.folder_path}

Hope this helps

1 Like

Thanks Buc,