deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject svn commit: r1207873 - /deltacloud/trunk/server/lib/cimi/server.rb
Date Tue, 29 Nov 2011 13:33:11 GMT
Author: marios
Date: Tue Nov 29 13:33:10 2011
New Revision: 1207873

URL: http://svn.apache.org/viewvc?rev=1207873&view=rev
Log:
Adds CIMI::VolumeConfiguration 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=1207873&r1=1207872&r2=1207873&view=diff
==============================================================================
--- deltacloud/trunk/server/lib/cimi/server.rb (original)
+++ deltacloud/trunk/server/lib/cimi/server.rb Tue Nov 29 13:33:10 2011
@@ -224,3 +224,31 @@ global_collection :volumes do
   end
 
 end
+
+global_collection :volume_configurations do
+  description "The Volume Configuration entity represents the set of configuration values
needed to create a Volume with certain characteristics. Volume Configurations are created
by Providers and MAY, at the Providers discretion, be created by Consumers"
+
+  operation :index do
+    description "Get list all VolumeConfigurations"
+    control do
+      volume_configs = VolumeConfiguration.all(self)
+      respond_to do |format|
+        format.xml { volume_configs.to_xml_cimi_collection(self) }
+        format.json { volume_configs.to_json_cimi_collection(self) }
+      end
+    end
+  end
+
+  operation :show do
+    description "Get a specific VolumeConfiguration"
+    param :id, :required, :string
+    control do
+      volume_config = VolumeConfiguration.find(params[:id], self)
+      respond_to do |format|
+        format.xml { volume_config.to_xml }
+        format.json { volume_config.json }
+      end
+    end
+  end
+
+end



Mime
View raw message