This documentation refers to a previously released version of BMC Discovery.
See the information on this topic for the latest version (11.2) or version 11.0.

discovery.vSphereTraverseToObjects(target, "start_vsphere_type", start_vsphere_id, "traversal", "end_vsphere_type", ["property", "property", ...])

Queries to traverse from the initial object to instances of an object type and get properties on those objects.You need to know the vsphere_id (MOR ID) from Managed Object Type that you want to start traversing with. It returns the requested properties for each object found. The required parameters are:

  • target - the ESX/ESXi node if discovering using vSphere or via vCenter, or the vCenter node if discovering information about the vCenter server.
  • start_vsphere_type - the starting point, given as a vSphere managed object name specified in the VMware documentation. For example, Folder, Datacenter, ComputeResource, ResourcePool, or HostSystem.

  • start_vsphere_id - MOR (managed object reference) where to start from. The type and id together uniquely identify a managed object in the system we are communicating with.

  • traversal - this is a property name which tells how to get from the start_vsphere_type/start_vsphere_id to end_vsphere_type. It is a simple string.

  • end_vsphere_type - the managed object type at the end of the traversal. Given as a vSphere managed object name specified in the VMware documentation. For example, Folder, Datacenter, ComputeResource, ResourcePool, or HostSystem. All managed objects of different type are dropped.

  • properties - List of properties to retrieve. Each must be simple type (string, int, boolean, and so on), no objects, or lists.

This code example (from the VMware.VirtualCenter pattern module) shows retrieving HostSystem objects from ClusterComputeResource objects. In this example, root_node is the ESXi Host node:

discovery.vSphereTraverseToObjects(root_node, "ClusterComputeResource", cluster_id, "host", "HostSystem", ["name", "hardware.systemInfo.uuid"]);
Was this page helpful? Yes No Submitting... Thank you
  • No labels


© Copyright 2017 BMC Software, Inc. © Copyright 2017 BladeLogic, Inc.

Legal notices


© Copyright 2017 BMC Software, Inc.
Legal notices