Class: Fog::Compute::VcloudDirector::Task
- Inherits:
-
Model
- Object
- Model
- Fog::Compute::VcloudDirector::Task
- Defined in:
- lib/fog/vcloud_director/models/compute/task.rb
Instance Method Summary collapse
Instance Method Details
#cancel ⇒ Object
49 50 51 |
# File 'lib/fog/vcloud_director/models/compute/task.rb', line 49 def cancel service.post_cancel_task(id) end |
#non_running? ⇒ Boolean
36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/fog/vcloud_director/models/compute/task.rb', line 36 def non_running? if @service.show_progress? && (@last_progress ||= 0) < 100 if status == 'running' || status == 'queued' Fog::Formatador.(progress, 100, :label => operation_name, :started_at => start_time) @last_progress = progress elsif status == 'success' Fog::Formatador.(100, 100, :label => operation_name, :started_at => start_time) @last_progress = 100 end end ! %w(running queued).include?(status) end |
#ready? ⇒ Boolean
28 29 30 |
# File 'lib/fog/vcloud_director/models/compute/task.rb', line 28 def ready? status == 'success' end |
#success? ⇒ Boolean
32 33 34 |
# File 'lib/fog/vcloud_director/models/compute/task.rb', line 32 def success? status == 'success' end |