deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "marios@redhat.com" <mandr...@redhat.com>
Subject Re: [PATCH] DTACLOUD-390 Add name when creating volume.
Date Tue, 18 Dec 2012 14:32:45 GMT
ACK & PSH

(I updated DTACLOUD-390 accordingly)

marios

On 18/12/12 16:00, jvlcek@redhat.com wrote:
> From: Joe VLcek <jvlcek@redhat.com>
> 
> ---
>  server/lib/cimi/models/volume.rb | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/server/lib/cimi/models/volume.rb b/server/lib/cimi/models/volume.rb
> index 53613f5..bbc61f9 100644
> --- a/server/lib/cimi/models/volume.rb
> +++ b/server/lib/cimi/models/volume.rb
> @@ -95,9 +95,13 @@ class CIMI::Model::Volume < CIMI::Model::Base
>    def self.create_volume(params, data, context)
>      if params[:volume_config_id]
>        volume_config = CIMI::Model::VolumeConfiguration.find(params[:volume_config_id],
context)
> -      opts = {:capacity=>context.from_kibibyte(volume_config.capacity, "GB"), :snapshot_id=>params[:volume_image_id]
}
> +      opts = {:capacity=>context.from_kibibyte(volume_config.capacity, "GB"),
> +              :snapshot_id=>params[:volume_image_id],
> +              :name=>data["name"]}
>      elsif params[:capacity]
> -      opts = {:capacity=>context.from_kibibyte(params[:capacity], "GB"), :snapshot_id=>params[:volume_image_id]}
> +      opts = {:capacity=>context.from_kibibyte(params[:capacity], "GB"),
> +              :snapshot_id=>params[:volume_image_id],
> +              :name=>data["name"]}
>      end
>      storage_volume = context.driver.create_storage_volume(context.credentials, opts)
>      entity = store_attributes_for(storage_volume, data)
> 


Mime
View raw message