Return-Path: Delivered-To: apmail-incubator-deltacloud-dev-archive@minotaur.apache.org Received: (qmail 87492 invoked from network); 29 Sep 2010 14:19:06 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 29 Sep 2010 14:19:06 -0000 Received: (qmail 13594 invoked by uid 500); 29 Sep 2010 14:19:05 -0000 Delivered-To: apmail-incubator-deltacloud-dev-archive@incubator.apache.org Received: (qmail 13554 invoked by uid 500); 29 Sep 2010 14:19:05 -0000 Mailing-List: contact deltacloud-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: deltacloud-dev@incubator.apache.org Delivered-To: mailing list deltacloud-dev@incubator.apache.org Received: (qmail 13546 invoked by uid 99); 29 Sep 2010 14:19:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Sep 2010 14:19:05 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=10.0 tests=RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mfojtik@redhat.com designates 209.132.183.28 as permitted sender) Received: from [209.132.183.28] (HELO mx1.redhat.com) (209.132.183.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Sep 2010 14:18:59 +0000 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o8TEIcIN032672 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 29 Sep 2010 10:18:38 -0400 Received: from patashnik.brq.redhat.com (dhcp-2-247.brq.redhat.com [10.34.2.247]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o8TEITJd007782 for ; Wed, 29 Sep 2010 10:18:37 -0400 From: mfojtik@redhat.com To: deltacloud-dev@incubator.apache.org Subject: [PATCH core 06/10] Fixed reloading of status on instance object Date: Wed, 29 Sep 2010 16:18:24 +0200 Message-Id: <1285769908-27056-7-git-send-email-mfojtik@redhat.com> In-Reply-To: <1285769908-27056-1-git-send-email-mfojtik@redhat.com> References: <1285769908-27056-1-git-send-email-mfojtik@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 X-Virus-Checked: Checked by ClamAV on apache.org From: Michal Fojtik --- 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