Class: Fog::Vsphere::Compute::Folder

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/vsphere/models/compute/folder.rb

Instance Method Summary collapse

Instance Method Details

#destroyObject



23
24
25
# File 'lib/fog/vsphere/models/compute/folder.rb', line 23

def destroy
  service.folder_destroy(path, datacenter)
end

#to_sObject



19
20
21
# File 'lib/fog/vsphere/models/compute/folder.rb', line 19

def to_s
  name
end

#vms(options = {}) ⇒ Object

Pass :recursive => true to get a Servers object that searches for VM names recursively



14
15
16
17
# File 'lib/fog/vsphere/models/compute/folder.rb', line 14

def vms(options = {})
  return [] if type.to_s != 'vm'
  service.servers(folder: path, datacenter: datacenter, recursive: options[:recursive])
end