Class: Fog::Compute::Ecloud::ComputePool
Instance Attribute Summary
#loaded
Instance Method Summary
collapse
#load_unless_loaded!, #reload
Instance Method Details
#cpu_usage ⇒ Object
24
25
26
27
|
# File 'lib/fog/ecloud/models/compute/compute_pool.rb', line 24
def cpu_usage
@cpu_usage ||= Fog::Compute::Ecloud::CpuUsageDetailSummary.new(:service => service, :href => "#{service.base_path}/computePools/#{id}/usage/cpu")
end
|
#detached_disks ⇒ Object
46
47
48
|
# File 'lib/fog/ecloud/models/compute/compute_pool.rb', line 46
def detached_disks
@detached_disks ||= self.service.detached_disks(:href => "#{service.base_path}/detacheddisks/computepools/#{id}")
end
|
#edit(options) ⇒ Object
58
59
60
61
62
|
# File 'lib/fog/ecloud/models/compute/compute_pool.rb', line 58
def edit(options)
options[:uri] = href
data = service.compute_pool_edit(options).body
pool = collection.from_data(data)
end
|
#environment ⇒ Object
50
51
52
53
54
55
56
|
# File 'lib/fog/ecloud/models/compute/compute_pool.rb', line 50
def environment
@environment ||= begin
reload unless other_links
environment_link = other_links.find{|l| l[:type] == "application/vnd.tmrk.cloud.environment"}
self.service.environments.get(environment_link[:href])
end
end
|
#id ⇒ Object
64
65
66
|
# File 'lib/fog/ecloud/models/compute/compute_pool.rb', line 64
def id
href.scan(/\d+/)[0]
end
|
#layout ⇒ Object
20
21
22
|
# File 'lib/fog/ecloud/models/compute/compute_pool.rb', line 20
def layout
@layout ||= Fog::Compute::Ecloud::Layouts.new(:service => service, :href => "#{service.base_path}/layout/computePools/#{id}").first
end
|
#memory_usage ⇒ Object
29
30
31
32
|
# File 'lib/fog/ecloud/models/compute/compute_pool.rb', line 29
def memory_usage
@memory_usage ||= Fog::Compute::Ecloud::MemoryUsageDetailSummary.new(:service => service, :href => "#{service.base_path}/computePools/#{id}/usage/memory")
end
|
#operating_system_families ⇒ Object
38
39
40
|
# File 'lib/fog/ecloud/models/compute/compute_pool.rb', line 38
def operating_system_families
@operating_system_families ||= Fog::Compute::Ecloud::OperatingSystemFamilies.new(:service => service, :href => "#{service.base_path}/operatingSystemFamilies/computePools/#{id}")
end
|
#servers ⇒ Object
16
17
18
|
# File 'lib/fog/ecloud/models/compute/compute_pool.rb', line 16
def servers
@servers ||= Fog::Compute::Ecloud::Servers.new( :service => service, :href => "#{service.base_path}/virtualMachines/computePools/#{id}" )
end
|
#storage_usage ⇒ Object
34
35
36
|
# File 'lib/fog/ecloud/models/compute/compute_pool.rb', line 34
def storage_usage
@storage_usage ||= Fog::Compute::Ecloud::StorageUsageDetailSummary.new(:service => service, :href => "#{service.base_path}/computePools/#{id}/usage/storage")
end
|
#templates ⇒ Object
42
43
44
|
# File 'lib/fog/ecloud/models/compute/compute_pool.rb', line 42
def templates
@templates ||= self.service.templates(:href => "#{service.base_path}/templates/computePools/#{id}")
end
|