Recursive Traversal

Use a
SelectionSpec
to apply a
TraversalSpec
to the results of its own traversal. To use a recursive filter construction, create a
SelectionSpec
that specifies the name of a
TraversalSpec
and add it to the named
TraversalSpec
selection set. The recursive construction extends inventory traversal beyond the paths directly represented by
TraversalSpec
objects.
You can use recursive traversal on any inventory objects that can be nested. See Inventory Hierarchies and ServiceInstance for a general representation of the structure of an inventory. For example, on a vCenter Server, folders can nest to arbitrary depths. To describe a traversal path through a succession of folders, you can add a
SelectionSpec
to the
Folder TraversalSpec
. The
SelectionSpec
must reference the
TraversalSpec
. Figure 1 shows a representation of a
TraversalSpec
and its associated
SelectionSpec
for nested folder traversal.
Recursive TraversalSpec and SelectionSpec