deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject [5/65] git commit: Core: Check if instance used to create new image exists correctly
Date Fri, 20 Jul 2012 09:59:21 GMT
Core: Check if instance used to create new image exists correctly


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

Branch: refs/heads/master
Commit: 537352d672b617198faa65ce8fb12f5e9f9e9926
Parents: 8da2883
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Thu Jul 19 14:54:31 2012 +0200
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Fri Jul 20 11:59:09 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/537352d6/server/lib/deltacloud/collections/images.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/collections/images.rb b/server/lib/deltacloud/collections/images.rb
index 2bb836e..6c4583d 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 = Instance.new( :id => params[:instance_id] )
-      status 404 unless @instance
+      @instance = driver.instance(credentials, :id => params[:instance_id]) if params[:instance_id]
+      halt 404 unless @instance
     end
 
     collection :images do


Mime
View raw message