Class: Fog::Compute::Ecloud::Tasks

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

Instance Method Summary collapse

Methods inherited from Ecloud::Collection

#check_href!, #load

Instance Method Details

#allObject



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

def all
  data = service.get_tasks(href).body
  data = data[:Task] ? data[:Task] : data
  load(data)
end

#get(uri) ⇒ Object



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

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