Class: RbVmomi::VIM::Datacenter

Inherits:
Object
  • Object
show all
Defined in:
lib/rbvmomi/vim/Datacenter.rb

Instance Method Summary collapse

Instance Method Details

#find_compute_resource(path) ⇒ Object

Traverse the given inventory path to find a ComputeResource.



3
4
5
# File 'lib/rbvmomi/vim/Datacenter.rb', line 3

def find_compute_resource path
  hostFolder.traverse path, RbVmomi::VIM::ComputeResource
end

#find_datastore(name) ⇒ Object

Find the Datastore with the given name.



8
9
10
# File 'lib/rbvmomi/vim/Datacenter.rb', line 8

def find_datastore name
  datastore.find { |x| x.name == name }
end

#find_vm(path) ⇒ Object

Traverse the given inventory path to find a VirtualMachine.



13
14
15
# File 'lib/rbvmomi/vim/Datacenter.rb', line 13

def find_vm path
  vmFolder.traverse path, RbVmomi::VIM::VirtualMachine
end