You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by ma...@apache.org on 2011/11/29 14:33:41 UTC
svn commit: r1207875 - /deltacloud/trunk/server/lib/cimi/server.rb
Author: marios
Date: Tue Nov 29 13:33:40 2011
New Revision: 1207875
URL: http://svn.apache.org/viewvc?rev=1207875&view=rev
Log:
Adds CIMI::VolumeImage model to cimi/server.rb
Modified:
deltacloud/trunk/server/lib/cimi/server.rb
Modified: deltacloud/trunk/server/lib/cimi/server.rb
URL: http://svn.apache.org/viewvc/deltacloud/trunk/server/lib/cimi/server.rb?rev=1207875&r1=1207874&r2=1207875&view=diff
==============================================================================
--- deltacloud/trunk/server/lib/cimi/server.rb (original)
+++ deltacloud/trunk/server/lib/cimi/server.rb Tue Nov 29 13:33:40 2011
@@ -251,4 +251,32 @@ global_collection :volume_configurations
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