discovery.vSphereFindObjects

discovery.vSphereFindObjects(target, "object_type", ["property", "property", ...])

Queries to search from the root folder the instances of an object type and 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.
  • object_type - a vSphere managed object name specified in the VMware documentation. For example, Folder, Datacenter, ComputeResource, ResourcePool, or HostSystem.
  • properties - list of properties to retrieve. Each must be simple type (string, int, boolean, and so on), no objects, or lists.

This code example shows retrieving the name and hardware.systemInfo.uuid of HostSystem MOR:

hosts := discovery.vSphereFindObjects(vc_host, "HostSystem", ["name", "hardware.systemInfo.uuid"]);

Was this page helpful? Yes No Submitting... Thank you

Comments