Method: RbVmomi::VIM::Folder#findByInventoryPath

Defined in:
lib/rbvmomi/vim/Folder.rb

#findByInventoryPath(path) ⇒ VIM::ManagedEntity

Retrieve a managed entity by inventory path.

Parameters:

  • path (String)

    A path of the form “My Folder/My Datacenter/vm/Discovered VM/VM1”

Returns:



66
67
68
69
70
71
# File 'lib/rbvmomi/vim/Folder.rb', line 66

def findByInventoryPath path
  propSpecs = {
    :entity => self, :inventoryPath => path
  }
  x = _connection.searchIndex.FindByInventoryPath(propSpecs)
end