Class: RbVmomi::VIM::Datacenter
- Inherits:
-
Object
- Object
- RbVmomi::VIM::Datacenter
- Defined in:
- lib/rbvmomi/vim/Datacenter.rb
Instance Method Summary collapse
-
#find_compute_resource(path) ⇒ Object
Traverse the given inventory
path
to find a ComputeResource. -
#find_datastore(name) ⇒ Object
Find the Datastore with the given
name
. -
#find_vm(path) ⇒ Object
Traverse the given inventory
path
to find a VirtualMachine.
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 |