deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@redhat.com
Subject [PATCH core 9/9] Core: Make new image action not require the instance
Date Thu, 26 Jul 2012 11:29:38 GMT
From: Michal Fojtik <mfojtik@redhat.com>

This patch will revert patch 537352d6, since fetching
the instance will affect performance of this operation[1].

[1] https://issues.apache.org/jira/browse/DTACLOUD-214

Signed-off-by: Michal fojtik <mfojtik@redhat.com>
---
 server/lib/deltacloud/collections/images.rb |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/server/lib/deltacloud/collections/images.rb b/server/lib/deltacloud/collections/images.rb
index 6c4583d..fe1960a 100644
--- a/server/lib/deltacloud/collections/images.rb
+++ b/server/lib/deltacloud/collections/images.rb
@@ -22,8 +22,7 @@ module Deltacloud::Collections
     set :capability, lambda { |m| driver.respond_to? m }
 
     new_route_for :images do
-      @instance = driver.instance(credentials, :id => params[:instance_id]) if params[:instance_id]
-      halt 404 unless @instance
+      @instance = Instance.new( :id => params[:instance_id] )
     end
 
     collection :images do
-- 
1.7.10.2


Mime
View raw message