Class: Pulp::Task

Inherits:
Connection::Base show all
Defined in:
lib/pulp/task.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Connection::Base

base, base_delete, base_get, base_post, base_put, base_unparsed_delete, base_unparsed_get, base_unparsed_post, base_unparsed_put, identifier, #initialize, merge_params, parse_item_cmd, plain_base, plain_get, plain_unparsed_get, reset, s, #set_fields

Methods included from Common::Lifecycle

#fields, included, #locked_fields, #record_fields, #special_fields, #user_fields

Constructor Details

This class inherits a constructor from Pulp::Connection::Base

Class Method Details

.cancel(taskid) ⇒ Object



17
18
19
# File 'lib/pulp/task.rb', line 17

def self.cancel(taskid)
  self.new(base_post(taskid,'cancel/'))
end

.delete_snapshot(taskid) ⇒ Object



25
26
27
# File 'lib/pulp/task.rb', line 25

def self.delete_snapshot(taskid)
  Pulp::TaskSnapshot.new(base_delete(taskid,'snapshot/'))
end

.snapshot(taskid) ⇒ Object



33
34
35
# File 'lib/pulp/task.rb', line 33

def self.snapshot(taskid)
  Pulp::TaskSnapshot.new(base_get(taskid,'snapshot/'))
end

Instance Method Details

#cancelObject



13
14
15
# File 'lib/pulp/task.rb', line 13

def cancel
  self.class.cancel(id)
end

#delete_snapshotObject



21
22
23
# File 'lib/pulp/task.rb', line 21

def delete_snapshot
  self.class.delete_snapshot(id)
end

#snapshotObject



29
30
31
# File 'lib/pulp/task.rb', line 29

def snapshot
  self.class.snapshot(id)
end