Class: Fog::Compute::VcloudDirector::Tasks

Inherits:
Collection
  • Object
show all
Includes:
VcloudDirector::Query
Defined in:
lib/fog/vcloud_director/models/compute/tasks.rb

Instance Method Summary collapse

Methods included from VcloudDirector::Query

#find_by_query

Methods inherited from Collection

#all, #get_by_name, #get_everyone, #index

Instance Method Details

#get(id) ⇒ Object



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

def get(id)
  data = service.get_task(id).body
  return nil unless data
  data[:id] = data[:href].split('/').last
  data[:progress] ||= 0
  new(data)
end

#query_typeObject



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

def query_type
  "task"
end