Return-Path: X-Original-To: apmail-incubator-deltacloud-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-deltacloud-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5C959502D for ; Tue, 10 May 2011 09:44:07 +0000 (UTC) Received: (qmail 31509 invoked by uid 500); 10 May 2011 09:44:07 -0000 Delivered-To: apmail-incubator-deltacloud-dev-archive@incubator.apache.org Received: (qmail 31484 invoked by uid 500); 10 May 2011 09:44:07 -0000 Mailing-List: contact deltacloud-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: deltacloud-dev@incubator.apache.org Delivered-To: mailing list deltacloud-dev@incubator.apache.org Received: (qmail 31476 invoked by uid 99); 10 May 2011 09:44:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 May 2011 09:44:07 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mfojtik@redhat.com designates 209.132.183.28 as permitted sender) Received: from [209.132.183.28] (HELO mx1.redhat.com) (209.132.183.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 May 2011 09:44:00 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p4A9heWX014608 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 10 May 2011 05:43:40 -0400 Received: from dhcp-2-222.brq.redhat.com (dhcp-2-222.brq.redhat.com [10.34.2.222]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p4A9hakO023003 for ; Tue, 10 May 2011 05:43:39 -0400 From: mfojtik@redhat.com To: deltacloud-dev@incubator.apache.org Subject: [PATCH core 3/3] Renamed 'ebs_snapshot_id' to 'snapshot_id'. Fixed feature description Date: Tue, 10 May 2011 11:43:54 +0200 Message-Id: <1305020634-51605-4-git-send-email-mfojtik@redhat.com> In-Reply-To: <1305020634-51605-1-git-send-email-mfojtik@redhat.com> References: <1305020634-51605-1-git-send-email-mfojtik@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 From: Michal Fojtik Signed-off-by: Michal fojtik --- 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