Class: Fog::Vsphere::Compute::Folders

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#datacenterObject

Returns the value of attribute datacenter.



8
9
10
# File 'lib/fog/vsphere/models/compute/folders.rb', line 8

def datacenter
  @datacenter
end

#pathObject

Returns the value of attribute path.



8
9
10
# File 'lib/fog/vsphere/models/compute/folders.rb', line 8

def path
  @path
end

#typeObject

Returns the value of attribute type.



8
9
10
# File 'lib/fog/vsphere/models/compute/folders.rb', line 8

def type
  @type
end

Instance Method Details

#all(filters = {}) ⇒ Object



10
11
12
13
14
# File 'lib/fog/vsphere/models/compute/folders.rb', line 10

def all(filters = {})
  requires :datacenter
  requires :type
  load service.list_folders(filters.merge(datacenter: datacenter, type: type, path: path))
end

#get(id) ⇒ Object



16
17
18
19
# File 'lib/fog/vsphere/models/compute/folders.rb', line 16

def get(id)
  requires :datacenter
  new service.get_folder(id, datacenter, type)
end