Skip to content
This repository has been archived by the owner on Jul 1, 2021. It is now read-only.

Update ServiceInstance.rb #37

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions lib/rbvmomi/vim/ServiceInstance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ def find_datacenter path=nil
content.rootFolder.childEntity.grep(RbVmomi::VIM::Datacenter).first
end
end

# Retrieve a Datacenter via searchIndex.
# @param path (Path to datacenter)
# @return [Datacenter]
def find_datacenter_by_searchindex path=nil
content.searchIndex.FindByInventoryPath(:inventoryPath => path)
end

# Wait for several tasks to complete.
# @param interested [Array] Property paths to watch for updates.
Expand Down