Class: Fog::Vsphere::Compute::Datacenter

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

Instance Method Summary collapse

Instance Method Details

#clusters(filters = {}) ⇒ Object



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

def clusters(filters = {})
  service.clusters({ datacenter: path.join('/') }.merge(filters))
end

#customfields(filters = {}) ⇒ Object



38
39
40
# File 'lib/fog/vsphere/models/compute/datacenter.rb', line 38

def customfields(filters = {})
  service.customfields({ datacenter: path.join('/') }.merge(filters))
end

#datastores(filters = {}) ⇒ Object



18
19
20
# File 'lib/fog/vsphere/models/compute/datacenter.rb', line 18

def datastores(filters = {})
  service.datastores({ datacenter: path.join('/') }.merge(filters))
end

#networks(filters = {}) ⇒ Object



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

def networks(filters = {})
  service.networks({ datacenter: path.join('/') }.merge(filters))
end

#servertypes(filters = {}) ⇒ Object



34
35
36
# File 'lib/fog/vsphere/models/compute/datacenter.rb', line 34

def servertypes(filters = {})
  service.servertypes({ datacenter: name }.merge(filters))
end

#storage_pods(filters = {}) ⇒ Object



22
23
24
# File 'lib/fog/vsphere/models/compute/datacenter.rb', line 22

def storage_pods(filters = {})
  service.storage_pods({ datacenter: path.join('/') }.merge(filters))
end

#to_sObject



42
43
44
# File 'lib/fog/vsphere/models/compute/datacenter.rb', line 42

def to_s
  name
end

#virtual_machines(filters = {}) ⇒ Object



30
31
32
# File 'lib/fog/vsphere/models/compute/datacenter.rb', line 30

def virtual_machines(filters = {})
  service.servers({ datacenter: path.join('/') }.merge(filters))
end

#vm_folders(filters = {}) ⇒ Object



26
27
28
# File 'lib/fog/vsphere/models/compute/datacenter.rb', line 26

def vm_folders(filters = {})
  service.folders({ datacenter: name, type: :vm }.merge(filters))
end