Class: RbVmomi::VIM::Datacenter
- Inherits:
-
Object
- Object
- RbVmomi::VIM::Datacenter
- Defined in:
- lib/rbvmomi/vim/Datacenter.rb
Overview
Copyright © 2011-2017 VMware, Inc. All Rights Reserved. SPDX-License-Identifier: MIT
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_folder(path) ⇒ Object
Traverse the given inventory
path
to find a Folder. -
#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.
6 7 8 |
# File 'lib/rbvmomi/vim/Datacenter.rb', line 6 def find_compute_resource path hostFolder.traverse path, RbVmomi::VIM::ComputeResource end |
#find_datastore(name) ⇒ Object
Find the Datastore with the given name
.
11 12 13 |
# File 'lib/rbvmomi/vim/Datacenter.rb', line 11 def find_datastore name datastore.find { |x| x.name == name } end |
#find_folder(path) ⇒ Object
Traverse the given inventory path
to find a Folder.
21 22 23 |
# File 'lib/rbvmomi/vim/Datacenter.rb', line 21 def find_folder path vmFolder.traverse path, RbVmomi::VIM::Folder end |
#find_vm(path) ⇒ Object
Traverse the given inventory path
to find a VirtualMachine.
16 17 18 |
# File 'lib/rbvmomi/vim/Datacenter.rb', line 16 def find_vm path vmFolder.traverse path, RbVmomi::VIM::VirtualMachine end |