Return-Path: X-Original-To: apmail-deltacloud-commits-archive@www.apache.org Delivered-To: apmail-deltacloud-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3F652E1FC for ; Wed, 5 Dec 2012 06:09:23 +0000 (UTC) Received: (qmail 86959 invoked by uid 500); 5 Dec 2012 06:09:23 -0000 Delivered-To: apmail-deltacloud-commits-archive@deltacloud.apache.org Received: (qmail 86940 invoked by uid 500); 5 Dec 2012 06:09:22 -0000 Mailing-List: contact commits-help@deltacloud.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@deltacloud.apache.org Delivered-To: mailing list commits@deltacloud.apache.org Received: (qmail 86913 invoked by uid 99); 5 Dec 2012 06:09:21 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Dec 2012 06:09:21 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 6A0FD818BDC; Wed, 5 Dec 2012 06:09:21 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: lutter@apache.org To: commits@deltacloud.apache.org X-Mailer: ASF-Git Admin Mailer Subject: git commit: CIMI: make retrieving individual volumes and volume images work again Message-Id: <20121205060921.6A0FD818BDC@tyr.zones.apache.org> Date: Wed, 5 Dec 2012 06:09:21 +0000 (UTC) Updated Branches: refs/heads/master 53fee983c -> 70a00e422 CIMI: make retrieving individual volumes and volume images work again Fixes problems introduced by commits 775cbdf2 and 14f9103e Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/70a00e42 Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/70a00e42 Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/70a00e42 Branch: refs/heads/master Commit: 70a00e422df6ce49f777c62274683778ae4deab6 Parents: 53fee98 Author: David Lutterkort Authored: Tue Dec 4 22:07:47 2012 -0800 Committer: David Lutterkort Committed: Tue Dec 4 22:07:47 2012 -0800 ---------------------------------------------------------------------- server/lib/cimi/models/volume.rb | 4 ++-- server/lib/cimi/models/volume_image.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/deltacloud/blob/70a00e42/server/lib/cimi/models/volume.rb ---------------------------------------------------------------------- diff --git a/server/lib/cimi/models/volume.rb b/server/lib/cimi/models/volume.rb index f1d60f7..a2904ce 100644 --- a/server/lib/cimi/models/volume.rb +++ b/server/lib/cimi/models/volume.rb @@ -43,9 +43,9 @@ class CIMI::Model::Volume < CIMI::Model::Base volumes = context.driver.storage_volumes(creds) volumes.collect{ |volume| from_storage_volume(volume, context) } else - volume = context.driver.storage_volumes(creds) + volume = context.driver.storage_volumes(creds, :id => id).first raise CIMI::Model::NotFound unless volume - from_storage_volume(volume) + from_storage_volume(volume, context) end end http://git-wip-us.apache.org/repos/asf/deltacloud/blob/70a00e42/server/lib/cimi/models/volume_image.rb ---------------------------------------------------------------------- diff --git a/server/lib/cimi/models/volume_image.rb b/server/lib/cimi/models/volume_image.rb index 811d9c9..3ca839e 100644 --- a/server/lib/cimi/models/volume_image.rb +++ b/server/lib/cimi/models/volume_image.rb @@ -30,9 +30,9 @@ class CIMI::Model::VolumeImage < CIMI::Model::Base snapshots = context.driver.storage_snapshots(creds) snapshots.collect{ |snapshot| from_storage_snapshot(snapshot, context) } else - snapshot = context.driver.storage_snapshots(creds) + snapshot = context.driver.storage_snapshots(creds, id => :id).first raise CIMI::Model::NotFound unless snapshot - from_storage_snapshot(snapshot) + from_storage_snapshot(snapshot, context) end end