Class: Fog::Compute::Ecloud::ComputePool
Instance Attribute Summary
#loaded
Attributes inherited from Model
#collection, #connection
Instance Method Summary
collapse
#load_unless_loaded!, #reload
Methods inherited from Model
#initialize, #inspect, #reload, #symbolize_keys, #to_json, #wait_for
#_load, #aliases, #attribute, #attributes, #identity, #ignore_attributes, #ignored_attributes
#_dump, #attributes, #dup, #identity, #identity=, #merge_attributes, #new_record?, #requires, #requires_one
Constructor Details
This class inherits a constructor from Fog::Model
Instance Method Details
#cpu_usage ⇒ Object
25
26
27
28
|
# File 'lib/rackspace-fog/ecloud/models/compute/compute_pool.rb', line 25
def cpu_usage
@cpu_usage ||= Fog::Compute::Ecloud::CpuUsageDetailSummary.new(:connection => connection, :href => "/cloudapi/ecloud/computePools/#{id}/usage/cpu")
end
|
#edit(options) ⇒ Object
47
48
49
50
51
|
# File 'lib/rackspace-fog/ecloud/models/compute/compute_pool.rb', line 47
def edit(options)
options[:uri] = href
data = connection.compute_pool_edit(options).body
pool = collection.from_data(data)
end
|
#id ⇒ Object
53
54
55
|
# File 'lib/rackspace-fog/ecloud/models/compute/compute_pool.rb', line 53
def id
href.scan(/\d+/)[0]
end
|
#layout ⇒ Object
21
22
23
|
# File 'lib/rackspace-fog/ecloud/models/compute/compute_pool.rb', line 21
def layout
@layout ||= Fog::Compute::Ecloud::Layouts.new(:connection => connection, :href => "/cloudapi/ecloud/layout/computePools/#{id}").first
end
|
#memory_usage ⇒ Object
30
31
32
33
|
# File 'lib/rackspace-fog/ecloud/models/compute/compute_pool.rb', line 30
def memory_usage
@memory_usage ||= Fog::Compute::Ecloud::MemoryUsageDetailSummary.new(:connection => connection, :href => "/cloudapi/ecloud/computePools/#{id}/usage/memory")
end
|
#operating_system_families ⇒ Object
39
40
41
|
# File 'lib/rackspace-fog/ecloud/models/compute/compute_pool.rb', line 39
def operating_system_families
@operating_system_families ||= Fog::Compute::Ecloud::OperatingSystemFamilies.new(:connection => connection, :href => "/cloudapi/ecloud/operatingSystemFamilies/computePools/#{id}")
end
|
#servers ⇒ Object
17
18
19
|
# File 'lib/rackspace-fog/ecloud/models/compute/compute_pool.rb', line 17
def servers
@servers ||= Fog::Compute::Ecloud::Servers.new( :connection => connection, :href => "/cloudapi/ecloud/virtualMachines/computePools/#{id}" )
end
|
#storage_usage ⇒ Object
35
36
37
|
# File 'lib/rackspace-fog/ecloud/models/compute/compute_pool.rb', line 35
def storage_usage
@storage_usage ||= Fog::Compute::Ecloud::StorageUsageDetailSummary.new(:connection => connection, :href => "/cloudapi/ecloud/computePools/#{id}/usage/storage")
end
|
#templates ⇒ Object
43
44
45
|
# File 'lib/rackspace-fog/ecloud/models/compute/compute_pool.rb', line 43
def templates
@templates ||= Fog::Compute::Ecloud::Templates.new(:connection => connection, :href => "/cloudapi/ecloud/templates/computePools/#{id}")
end
|