deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Lutterkort <lut...@redhat.com>
Subject Re: [PATCH core 4/4] Added possibility to lunch multiple instances at once for EC2
Date Thu, 26 Aug 2010 23:00:43 GMT
On Tue, 2010-08-24 at 16:04 +0200, mfojtik@redhat.com wrote:
> diff --git a/server/lib/deltacloud/drivers/ec2/ec2_driver.rb b/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
> index 909eca3..91e7855 100644
> --- a/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
> +++ b/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
> @@ -40,6 +40,7 @@ class EC2Driver < Deltacloud::BaseDriver
>    end
>  
>    feature :instances, :user_data
> +  feature :instances, :create_multiple_instance
>    feature :instances, :authentication_key
>    feature :images, :owner_id
>  
> @@ -180,6 +181,8 @@ class EC2Driver < Deltacloud::BaseDriver
>        hwp = find_hardware_profile(credentials, opts[:hwp_id], image.id)
>        ec2_instances = ec2.run_instances(
>          :image_id => image.id,
> +        :min_count => opts[:amount].to_i || 1,
> +        :max_count => opts[:amount].to_i || 1,

Why not expose min_count and max_count directly, i.e. feature
create_multiple_instances adds both as parameters to the crete call ?

David



Mime
View raw message