The findRelation operation finds all the children elements in an inventory that belong to a particular parent or type of parent.
Knowing how a child is related to its parent is useful if you develop tree viewers to view the objects in a library. The findRelation operation is declared as follows.
public FinderResult[] findRelation(String parentType, String parentId, String relation, String username, String password);
The parentType property can be the name of a plug-in, or it can specify a more narrowly defined parent. For example, you can specify the parentType as "VC:" to obtain the objects at the root of VMware vCenter Server plug-in, or you can a specific folder, such as "VC:VmFolder". |
||
The ID of a particular parent object. The parentId parameter allows you to find the children of a specific parent object, if you know its ID. |
||
Calling findRelation returns all children elements under a parent identified by its parentId. If you omit the parentId the parentType is not the root type of the inventory, the findRelation operation returns null. See Relation Types for more information. |
||
The relation property types are defined by the plug-ins. The validity of relations depends on the parent type.
This table lists the relation types defined by each of the standard plug-ins provided by Orchestrator.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The relation property can also reference relation types specified in each plug-in's vso.xml file. The following example is an excerpt from the networking plug-in vso.xml file.
[...] <relations> <relation name="Subnet" type="Class:Subnet"/> <relation name="Range" type="Class:Range"/> <relation name="NetworkDomain" type="Class:NetworkDomain"/> <relation name="MacAddressPool" type="Class:MacAddressPool"/> </relations> [...]
In addition to the relation types listed in Standard Orchestrator Relation Types, Orchestrator also defines the CHILDREN relation, to represent all relation types.