incubator-deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lut...@apache.org
Subject svn commit: r962025 - /incubator/deltacloud/trunk/drivers/mock/lib/mock_driver.rb
Date Thu, 08 Jul 2010 23:17:46 GMT
Author: lutter
Date: Thu Jul  8 23:17:46 2010
New Revision: 962025

URL: http://svn.apache.org/viewvc?rev=962025&view=rev
Log:
Make images?owner=self obtain "self" value from credentials.

Modified:
    incubator/deltacloud/trunk/drivers/mock/lib/mock_driver.rb

Modified: incubator/deltacloud/trunk/drivers/mock/lib/mock_driver.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/drivers/mock/lib/mock_driver.rb?rev=962025&r1=962024&r2=962025&view=diff
==============================================================================
--- incubator/deltacloud/trunk/drivers/mock/lib/mock_driver.rb (original)
+++ incubator/deltacloud/trunk/drivers/mock/lib/mock_driver.rb Thu Jul  8 23:17:46 2010
@@ -67,7 +67,11 @@ class MockDriver < DeltaCloud::BaseDrive
       elsif ( opts[:id] == :self )
         images = images.select{|e| e[:owner_id] == credentials[:name] }
       elsif ( opts[:owner] )
-        images = images.select{|e| e[:owner_id] == opts[:owner] }
+        if ( opts[:owner] == 'self' )
+          images = images.select{|e| e[:owner_id] == credentials[:name] }
+        else
+          images = images.select{|e| e[:owner_id] == opts[:owner] }
+        end
       elsif
         images = []
       end



Mime
View raw message