incubator-deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject svn commit: r1134366 - /incubator/deltacloud/trunk/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
Date Fri, 10 Jun 2011 16:13:57 GMT
Author: marios
Date: Fri Jun 10 16:13:56 2011
New Revision: 1134366

URL: http://svn.apache.org/viewvc?rev=1134366&view=rev
Log:
Minor edit in 'blobs' method to utilise :id if present

Signed-off-by: marios <marios@redhat.com>

Modified:
    incubator/deltacloud/trunk/server/lib/deltacloud/drivers/ec2/ec2_driver.rb

Modified: incubator/deltacloud/trunk/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/lib/deltacloud/drivers/ec2/ec2_driver.rb?rev=1134366&r1=1134365&r2=1134366&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/lib/deltacloud/drivers/ec2/ec2_driver.rb (original)
+++ incubator/deltacloud/trunk/server/lib/deltacloud/drivers/ec2/ec2_driver.rb Fri Jun 10
16:13:56 2011
@@ -387,8 +387,12 @@ module Deltacloud
           blobs = []
           safely do
             s3_bucket = s3_client.bucket(opts['bucket'])
-            s3_bucket.keys({}, true).each do |s3_object|
-              blobs << convert_object(s3_object)
+            if(opts[:id])
+              blobs << convert_object(s3_bucket.key(opts[:id], true))
+            else
+              s3_bucket.keys({}, true).each do |s3_object|
+                blobs << convert_object(s3_object)
+              end
             end
           end
           blobs = filter_on(blobs, :id, opts)



Mime
View raw message