From 3de804c3a5be8deae15896835484a3557dd41085 Mon Sep 17 00:00:00 2001 From: Rodrigo Estebanez Date: Fri, 5 Jul 2013 16:33:51 +0200 Subject: [PATCH] improved status --- lib/fog/vcloudng/models/compute/task.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/fog/vcloudng/models/compute/task.rb b/lib/fog/vcloudng/models/compute/task.rb index 683ba5c24..730f07630 100644 --- a/lib/fog/vcloudng/models/compute/task.rb +++ b/lib/fog/vcloudng/models/compute/task.rb @@ -28,6 +28,20 @@ module Fog def success? status == 'success' end + + def non_running? + if status == 'running' + if progress.to_i == 0 + printf '.' + else + puts progress + end + else + puts status + end + status != 'running' + end + end end end