Class: Fog::Compute::Vsphere::Servers
- Inherits:
-
Fog::Collection
- Object
- Array
- 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.
Attributes inherited from Fog::Collection
Instance Method Summary collapse
-
#all(filters = { }) ⇒ Object
‘folder’ => ‘/Datacenters/vm/Jeff/Templates’ will be MUCH faster.
- #get(id, datacenter = nil) ⇒ Object
Methods inherited from Fog::Collection
#clear, #create, #destroy, #initialize, #inspect, #load, model, #model, #new, #reload, #table, #to_json
Methods included from Attributes::ClassMethods
#_load, #aliases, #attribute, #attributes, #identity, #ignore_attributes, #ignored_attributes
Methods included from Attributes::InstanceMethods
#_dump, #attributes, #dup, #identity, #identity=, #merge_attributes, #new_record?, #requires, #requires_one
Constructor Details
This class inherits a constructor from Fog::Collection
Instance Attribute Details
#cluster ⇒ Object
Returns the value of attribute cluster.
13 14 15 |
# File 'lib/fog/vsphere/models/compute/servers.rb', line 13 def cluster @cluster end |
#datacenter ⇒ Object
Returns the value of attribute datacenter.
11 12 13 |
# File 'lib/fog/vsphere/models/compute/servers.rb', line 11 def datacenter @datacenter end |
#folder ⇒ Object
Returns the value of attribute folder.
15 16 17 |
# File 'lib/fog/vsphere/models/compute/servers.rb', line 15 def folder @folder end |
#network ⇒ Object
Returns the value of attribute network.
12 13 14 |
# File 'lib/fog/vsphere/models/compute/servers.rb', line 12 def network @network end |
#resource_pool ⇒ Object
Returns the value of attribute resource_pool.
14 15 16 |
# File 'lib/fog/vsphere/models/compute/servers.rb', line 14 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.
19 20 21 22 23 24 25 26 27 |
# File 'lib/fog/vsphere/models/compute/servers.rb', line 19 def all(filters = { }) load connection.list_virtual_machines(filters.merge( :datacenter => datacenter, :cluster => cluster, :network => network, :resource_pool => resource_pool, :folder => folder )) end |