VMware Cloud Community
heojuhan
Contributor
Contributor

Find a specific folder

Hello I am doing the vro but I have a problem creating the workflow. I am importing the Vmfolder from vCenter and putting it into the database. Importing information from vCenter's VMfolder succeeded. There is a problem here. The parent folder subfolder is not divided. Can I get the data of VMfolder with the parent folder subfolder divided? Attach the below image ex) KD-TEST (parentfolder) sub folder HK-TEST, JH-TEST In this way ...
0 Kudos
4 Replies
iiliev
VMware Employee
VMware Employee

Hi,

I'm not sure I fully understand the question. What do you mean by 'divided' folder? A folder that has multiple (2 or more) child folders, or something else?

On the image you provided, what data you want to retrieve? Eg. the folder structure (all folders + their parent <-> child relations) or something else?

0 Kudos
heojuhan
Contributor
Contributor

I want to distinguish the KD-TEST shown in the image as the parent folder. I would also like to know that HK-TEST and JH-TEST are subfolders.
0 Kudos
iiliev
VMware Employee
VMware Employee

Folder objects have property parent, that returns they parent object, and by checking the type of this property you can determine that HK-TEST and JH-TEST are subfolders because they have a folder as a parent.

Also, folder objects have property childEntity, that returns an array with children of the folder, so you check that KD-TEST have another folders as children.

0 Kudos
heojuhan
Contributor
Contributor

Thank you very much !!!
0 Kudos