incubator-deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@redhat.com
Subject [PATCH core 06/10] Fixed reloading of status on instance object
Date Wed, 29 Sep 2010 14:18:24 GMT
From: Michal Fojtik <mfojtik@redhat.com>

---
 client/lib/deltacloud.rb |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/client/lib/deltacloud.rb b/client/lib/deltacloud.rb
index b143cdf..0eeb4e4 100644
--- a/client/lib/deltacloud.rb
+++ b/client/lib/deltacloud.rb
@@ -194,7 +194,12 @@ module DeltaCloud
                     actions << [link['rel'], link[:href]]
                     define_method :"#{link['rel'].sanitize}!" do
                       client.request(:"#{link['method']}", link['href'], {}, {})
-                      client.send(:"#{item.name}", item['id'])
+                      @current_state = client.send(:"#{item.name}", item['id']).state
+                      obj.instance_eval do |o|
+                        def state
+                          @current_state
+                        end
+                      end
                     end
                   end
                   define_method :actions do
-- 
1.7.2.3


Mime
View raw message