deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject svn commit: r1207875 - /deltacloud/trunk/server/lib/cimi/server.rb
Date Tue, 29 Nov 2011 13:33:41 GMT
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



Mime
View raw message