You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by mf...@apache.org on 2012/07/30 16:29:17 UTC

[27/50] [abbrv] git commit: Core: Make new image action not require the instance

Core: Make new image action not require the instance

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


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/6118c711
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/6118c711
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/6118c711

Branch: refs/heads/master
Commit: 6118c711b4ed6ade2e7607bcfe539ce7d6a926d5
Parents: 18aab18
Author: Michal Fojtik <mf...@redhat.com>
Authored: Thu Jul 26 13:23:24 2012 +0200
Committer: Michal fojtik <mf...@redhat.com>
Committed: Fri Jul 27 13:51:50 2012 +0200

----------------------------------------------------------------------
 server/lib/deltacloud/collections/images.rb |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/6118c711/server/lib/deltacloud/collections/images.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/collections/images.rb b/server/lib/deltacloud/collections/images.rb
index 6c4583d..827e5d4 100644
--- a/server/lib/deltacloud/collections/images.rb
+++ b/server/lib/deltacloud/collections/images.rb
@@ -22,8 +22,8 @@ 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
+      halt 404 unless params[:instance_id]
+      @instance = Instance.new( :id => params[:instance_id] )
     end
 
     collection :images do