class RbVmomi::VIM::Datacenter

Public Instance Methods

find_compute_resource(path) click to toggle source

Traverse the given inventory path to find a ComputeResource.

# File lib/rbvmomi/vim/Datacenter.rb, line 3
def find_compute_resource path
  hostFolder.traverse path, RbVmomi::VIM::ComputeResource
end
find_datastore(name) click to toggle source

Find the Datastore with the given name.

# File lib/rbvmomi/vim/Datacenter.rb, line 8
def find_datastore name
  datastore.find { |x| x.name == name }
end
find_vm(path) click to toggle source

Traverse the given inventory path to find a VirtualMachine.

# File lib/rbvmomi/vim/Datacenter.rb, line 13
def find_vm path
  vmFolder.traverse path, RbVmomi::VIM::VirtualMachine
end