Class: Fog::Compute::Vsphere::Servers
- Inherits:
-
Fog::Collection
- Object
- Fog::Collection
- Fog::Compute::Vsphere::Servers
- Defined in:
- lib/fog/vsphere/models/compute/servers.rb
Instance Attribute Summary collapse
-
#cluster ⇒ Object
Returns the value of attribute cluster.
-
#datacenter ⇒ Object
Returns the value of attribute datacenter.
-
#folder ⇒ Object
Returns the value of attribute folder.
-
#network ⇒ Object
Returns the value of attribute network.
-
#resource_pool ⇒ Object
Returns the value of attribute resource_pool.
Instance Method Summary collapse
-
#all(filters = { }) ⇒ Object
‘folder’ => ‘/Datacenters/vm/Jeff/Templates’ will be MUCH faster.
- #get(id, datacenter = nil) ⇒ Object
Instance Attribute Details
#cluster ⇒ Object
Returns the value of attribute cluster.
11 12 13 |
# File 'lib/fog/vsphere/models/compute/servers.rb', line 11 def cluster @cluster end |
#datacenter ⇒ Object
Returns the value of attribute datacenter.
9 10 11 |
# File 'lib/fog/vsphere/models/compute/servers.rb', line 9 def datacenter @datacenter end |
#folder ⇒ Object
Returns the value of attribute folder.
13 14 15 |
# File 'lib/fog/vsphere/models/compute/servers.rb', line 13 def folder @folder end |
#network ⇒ Object
Returns the value of attribute network.
10 11 12 |
# File 'lib/fog/vsphere/models/compute/servers.rb', line 10 def network @network end |
#resource_pool ⇒ Object
Returns the value of attribute resource_pool.
12 13 14 |
# File 'lib/fog/vsphere/models/compute/servers.rb', line 12 def resource_pool @resource_pool end |
Instance Method Details
#all(filters = { }) ⇒ Object
‘folder’ => ‘/Datacenters/vm/Jeff/Templates’ will be MUCH faster. than simply listing everything.
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/fog/vsphere/models/compute/servers.rb', line 17 def all(filters = { }) f = { :datacenter => datacenter, :cluster => cluster, :network => network, :resource_pool => resource_pool, :folder => folder }.merge(filters) load service.list_virtual_machines(f) end |