incubator-deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tcraw...@redhat.com
Subject [PATCH 09/14] Imported convert_object to EC2 driver.
Date Tue, 21 Dec 2010 12:26:50 GMT
From: Michal Fojtik <mfojtik@redhat.com>

---
 server/lib/deltacloud/drivers/ec2/ec2_driver.rb |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/server/lib/deltacloud/drivers/ec2/ec2_driver.rb b/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
index 039b39c..bf99a84 100644
--- a/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
+++ b/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
@@ -468,6 +468,16 @@ module Deltacloud
           )
         end
 
+        def convert_object(s3_object)
+          Blob.new(
+            :id => s3_object.name,
+            :bucket => s3_object.bucket.name.to_s,
+            :content_length => s3_object.headers['content-length'],
+            :content_type => s3_object.headers['content-type'],
+            :last_modified => s3_object.last_modified
+          )  
+        end
+
         def convert_realm(realm)
           Realm.new(
             :id => realm[:zone_name],
-- 
1.7.3.2


Mime
View raw message