incubator-deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@redhat.com
Subject [PATCH core 3/3] Renamed 'ebs_snapshot_id' to 'snapshot_id'. Fixed feature description
Date Tue, 10 May 2011 09:43:54 GMT
From: Michal Fojtik <mfojtik@redhat.com>


Signed-off-by: Michal fojtik <mfojtik@redhat.com>
---
 client/lib/deltacloud.rb                        |    4 ++--
 server/lib/deltacloud/base_driver/features.rb   |    6 +++---
 server/lib/deltacloud/drivers/ec2/ec2_driver.rb |    6 +++---
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/client/lib/deltacloud.rb b/client/lib/deltacloud.rb
index 26ed9ae..532bee8 100644
--- a/client/lib/deltacloud.rb
+++ b/client/lib/deltacloud.rb
@@ -294,9 +294,9 @@ module DeltaCloud
           params[:hwp_id] ||= params[:hardware_profile]
         end
 
-        if args[:ebs_snapshot_id] and args[:device_name]
+        if args[:snapshot_id] and args[:device_name]
           params.merge!({
-            :ebs_snapshot_id => args[:ebs_snapshot_id],
+            :snapshot_id => args[:snapshot_id],
             :device_name => args[:device_name]
           })
         end
diff --git a/server/lib/deltacloud/base_driver/features.rb b/server/lib/deltacloud/base_driver/features.rb
index 33ab61d..65c4cba 100644
--- a/server/lib/deltacloud/base_driver/features.rb
+++ b/server/lib/deltacloud/base_driver/features.rb
@@ -232,10 +232,10 @@ module Deltacloud
       end
     end
 
-    declare_feature :instances, :attach_ebs_snapshot do
-      description "Number of instances to be launch with at once"
+    declare_feature :instances, :attach_snapshot do
+      description "Attach an snapshot to instance on create"
       operation :create do
-        param :ebs_snapshot_id,  :string,  :optional
+        param :snapshot_id,  :string,  :optional
         param :device_name,  :string,  :optional
       end
     end
diff --git a/server/lib/deltacloud/drivers/ec2/ec2_driver.rb b/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
index 8ff2144..14c5829 100644
--- a/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
+++ b/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
@@ -43,7 +43,7 @@ module Deltacloud
         feature :images, :owner_id
         feature :buckets, :bucket_location
         feature :instances, :register_to_load_balancer
-        feature :instances, :attach_ebs_snapshot
+        feature :instances, :attach_snapshot
 
         DEFAULT_REGION = 'us-east-1'
 
@@ -206,9 +206,9 @@ module Deltacloud
             :min_count => opts[:instance_count],
             :max_count => opts[:instance_count]
           ) if opts[:instance_count] and opts[:instance_count].length!=0
-          if opts[:ebs_snapshot_id] and opts[:device_name]
+          if opts[:snapshot_id] and opts[:device_name]
             instance_options.merge!(:block_device_mappings => [{
-              :ebs_snapshot_id => opts[:ebs_snapshot_id],
+              :snapshot_id => opts[:snapshot_id],
               :device_name => opts[:device_name]
             }])
           end
-- 
1.7.4.1


Mime
View raw message