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 1/2] Adds CIMI::VolumeImage to server.rb (index/show)
Date Fri, 25 Nov 2011 17:29:20 GMT
Please ignore these 2 patches, obsoleted by newer series "CIMI::Volume
creation" sent 25th November that includes and builds on thses



On 25/11/11 14:07, marios@redhat.com wrote:
> From: marios <marios@redhat.com>
> 
> 
> Signed-off-by: marios <marios@redhat.com>
> ---
>  server/lib/cimi/server.rb |   28 ++++++++++++++++++++++++++++
>  1 files changed, 28 insertions(+), 0 deletions(-)
> 
> diff --git a/server/lib/cimi/server.rb b/server/lib/cimi/server.rb
> index 2bd3a39..fdd7f17 100644
> --- a/server/lib/cimi/server.rb
> +++ b/server/lib/cimi/server.rb
> @@ -255,4 +255,32 @@ global_collection :volumes do
>      end
>    end
>  
> +global_collection :volume_images do
> +  description 'This entity represents an image that could be place on a pre-loaded volume.'
> +
> +  operation :index do
> +    description "List all volumes images"
> +    control do
> +      volume_images = VolumeImage.all(self)
> +      respond_to do |format|
> +        format.xml { volume_images.to_xml_cimi_collection(self) }
> +        format.json { volume_images.to_json_cimi_collection(self) }
> +      end
> +    end
> +  end
> +
> +  operation :show do
> +    description "Show a specific volume image"
> +    param :id, :string, :required
> +    control do
> +      volume_image = VolumeImage.find(params[:id], self)
> +      respond_to do |format|
> +        format.xml { volume_image.to_xml }
> +        format.json { volume_image.to_json }
> +      end
> +    end
> +  end
> +
> +end
> +
>  end


Mime
View raw message