ACK - slight nit/clarification:
On 09/03/12 19:51, [email protected] wrote:
> From: Michal Fojtik <[email protected]>
>
> Previously all drivers that support creating images from instances
> automatically accepted :name and :description parameters.
> However in VSphere those parameters are ignored and resulting image
> inherits name and description for instance used for creation.
>
> This patch add two new features for :images collection, that
> are set for all drivers that support image creation except VSphere.
>
> Signed-off-by: Michal fojtik <[email protected]>
> ---
{----8<-------- snip}
> server/lib/deltacloud/server.rb | 8 +++-----
> diff --git a/server/lib/deltacloud/server.rb b/server/lib/deltacloud/server.rb
> index 5ef3cb0..53dd705 100644
> --- a/server/lib/deltacloud/server.rb
> +++ b/server/lib/deltacloud/server.rb
> @@ -249,14 +249,12 @@ END
> operation :create do
> description 'Create image from instance'
> with_capability :create_image
> - param :instance_id, :string, :required
> - param :name, :string, :optional
> - param :description, :string, :optional
> + param :instance_id, :string, :required
why are we removing the :optional :name/:description from the params
list here?
marios
> control do
> @image = driver.create_image(credentials, {
> - :id => params[:instance_id],
> + :id => params[:instance_id],
> :name => params[:name],
> - :description => params[:description]
> + :description => params[:description]
> })
> status 201 # Created
> response['Location'] = image_url(@image.id)