Class: Fog::Compute::Vsphere::Datacenter
- Inherits:
-
Model
- Object
- Model
- Fog::Compute::Vsphere::Datacenter
show all
- Defined in:
- lib/fog/vsphere/models/compute/datacenter.rb
Instance Attribute Summary
Attributes inherited from Model
#collection, #service
Instance Method Summary
collapse
Methods inherited from Model
#initialize, #inspect, #reload, #symbolize_keys, #to_json, #wait_for
#_load, #aliases, #attribute, #attributes, #identity, #ignore_attributes, #ignored_attributes
#connection, #connection=, #prepare_service_value
#_dump, #attributes, #dup, #identity, #identity=, #merge_attributes, #new_record?, #persisted?, #requires, #requires_one
Constructor Details
This class inherits a constructor from Fog::Model
Instance Method Details
#clusters(filters = { }) ⇒ Object
12
13
14
|
# File 'lib/fog/vsphere/models/compute/datacenter.rb', line 12
def clusters filters = { }
service.clusters({ :datacenter => path.join("/") }.merge(filters))
end
|
#customfields(filters = {}) ⇒ Object
36
37
38
|
# File 'lib/fog/vsphere/models/compute/datacenter.rb', line 36
def customfields filters = {}
service.customfields({ :datacenter => path.join("/")}.merge(filters))
end
|
#datastores(filters = { }) ⇒ Object
20
21
22
|
# File 'lib/fog/vsphere/models/compute/datacenter.rb', line 20
def datastores filters = { }
service.datastores({ :datacenter => path.join("/") }.merge(filters))
end
|
#networks(filters = { }) ⇒ Object
16
17
18
|
# File 'lib/fog/vsphere/models/compute/datacenter.rb', line 16
def networks filters = { }
service.networks({ :datacenter => path.join("/") }.merge(filters))
end
|
#servertypes(filters = {}) ⇒ Object
32
33
34
|
# File 'lib/fog/vsphere/models/compute/datacenter.rb', line 32
def servertypes filters={}
service.servertypes({:datacenter => name }.merge(filters))
end
|
#to_s ⇒ Object
40
41
42
|
# File 'lib/fog/vsphere/models/compute/datacenter.rb', line 40
def to_s
name
end
|
#virtual_machines(filters = {}) ⇒ Object
28
29
30
|
# File 'lib/fog/vsphere/models/compute/datacenter.rb', line 28
def virtual_machines filters = {}
service.servers({ :datacenter => path.join("/") }.merge(filters))
end
|
#vm_folders(filters = { }) ⇒ Object
24
25
26
|
# File 'lib/fog/vsphere/models/compute/datacenter.rb', line 24
def vm_folders filters = { }
service.folders({ :datacenter => path.join("/"), :type => :vm }.merge(filters))
end
|