Class: RbVmomi::VIM::Folder

Inherits:
Object
  • Object
show all
Defined in:
lib/vmonkey/vim/Folder.rb

Instance Method Summary collapse

Instance Method Details

#findByInstanceUuid(uuid, type = RbVmomi::VIM::VirtualMachine, dc = nil) ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'lib/vmonkey/vim/Folder.rb', line 10

def findByInstanceUuid uuid, type=RbVmomi::VIM::VirtualMachine, dc=nil
  propSpecs = {
    :entity => self, :uuid => uuid, :instanceUuid => true,
    :vmSearch => type == RbVmomi::VIM::VirtualMachine
  }
  propSpecs[:datacenter] = dc if dc
  x = _connection.searchIndex.FindByUuid(propSpecs)
  x if x.is_a? type
end

#vm_folderObject



6
7
8
# File 'lib/vmonkey/vim/Folder.rb', line 6

def vm_folder
  self
end

#vm_poolObject



2
3
4
# File 'lib/vmonkey/vim/Folder.rb', line 2

def vm_pool
  monkey.cluster.resourcePool
end