Class: Fog::Compute::Ecloud::ComputePools

Inherits:
Ecloud::Collection show all
Defined in:
lib/fog/ecloud/models/compute/compute_pools.rb

Instance Method Summary collapse

Methods inherited from Ecloud::Collection

#check_href!, #load

Instance Method Details

#allObject



13
14
15
16
17
# File 'lib/fog/ecloud/models/compute/compute_pools.rb', line 13

def all
  check_href!(:message => "the Compute Pool href of the Environment you want to enumerate")
  data = service.get_compute_pools(href).body[:ComputePool]
  load(data)
end

#from_data(data) ⇒ Object



27
28
29
# File 'lib/fog/ecloud/models/compute/compute_pools.rb', line 27

def from_data(data)
  new(data)
end

#get(uri) ⇒ Object



19
20
21
22
23
24
25
# File 'lib/fog/ecloud/models/compute/compute_pools.rb', line 19

def get(uri)
  if data = service.get_compute_pool(uri)
    new(data.body)
  end
rescue Fog::Errors::NotFound
  nil
end