deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lut...@apache.org
Subject [2/2] git commit: CIMI - fixes DELETE route for Volume (+adds delete operation for entries)
Date Thu, 29 Nov 2012 22:10:11 GMT
CIMI - fixes DELETE route for Volume (+adds delete operation for entries)

Signed-off-by: marios <marios@redhat.com>
TrackedAt: http://tracker-mfojtik.rhcloud.com/patch/98a76feaaae762f8dd3489f878ec6f47089a9e4f


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/ecbe9fa1
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/ecbe9fa1
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/ecbe9fa1

Branch: refs/heads/master
Commit: ecbe9fa10906c9ddbfb7965f52be248d533a2691
Parents: fdb1db1
Author: marios <marios@redhat.com>
Authored: Thu Nov 29 10:20:13 2012 +0200
Committer: David Lutterkort <lutter@redhat.com>
Committed: Thu Nov 29 13:55:21 2012 -0800

----------------------------------------------------------------------
 server/lib/cimi/collections/volumes.rb |    2 +-
 server/lib/cimi/models/volume.rb       |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/ecbe9fa1/server/lib/cimi/collections/volumes.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/collections/volumes.rb b/server/lib/cimi/collections/volumes.rb
index 59fd69d..a05c396 100644
--- a/server/lib/cimi/collections/volumes.rb
+++ b/server/lib/cimi/collections/volumes.rb
@@ -64,7 +64,7 @@ module CIMI::Collections
         end
       end
 
-      operation :destroy do
+      operation :destroy, :with_capability => :destroy_storage_volume do
         description "Delete a specified Volume"
         control do
           Volume.delete!(params[:id], self)

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/ecbe9fa1/server/lib/cimi/models/volume.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/models/volume.rb b/server/lib/cimi/models/volume.rb
index d777cd0..6bae401 100644
--- a/server/lib/cimi/models/volume.rb
+++ b/server/lib/cimi/models/volume.rb
@@ -87,7 +87,8 @@ class CIMI::Model::Volume < CIMI::Model::Base
                 :snapshots => [], #fixme...
                 :type => 'http://schemas.dmtf.org/cimi/1/mapped',
                 :state => volume.state,
-                :meters => []
+                :meters => [],
+                :operations => [{:href=> context.volume_url(volume.id), :rel =>
"delete"}]
             } )
   end
 


Mime
View raw message