incubator-deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sang-min.p...@eucalyptus.com
Subject [PATCH] bug fixes in destroy_storage_snapshot
Date Thu, 10 Mar 2011 23:16:17 GMT
From: Sang-Min Park <spark@eucalyptus.com>

---
 server/lib/deltacloud/drivers/ec2/ec2_driver.rb |    2 +-
 server/server.rb                                |    3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/server/lib/deltacloud/drivers/ec2/ec2_driver.rb b/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
index 3bb91bc..9a2abb6 100644
--- a/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
+++ b/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
@@ -497,7 +497,7 @@ module Deltacloud
         def destroy_storage_snapshot(credentials, opts={})
           ec2 = new_client(credentials)
           safely do
-            unless convert_snapshot(opts[:id])
+	    unless ec2.delete_snapshot(opts[:id])
               raise Deltacloud::BackendError.new(500, "StorageSnapshot", "Cannot destroy
this snapshot")
             end
           end
diff --git a/server/server.rb b/server/server.rb
index 2e20367..845faf6 100644
--- a/server/server.rb
+++ b/server/server.rb
@@ -508,7 +508,7 @@ collection :storage_snapshots do
     with_capability :destroy_storage_snapshot
     param :id,  :string,  :required
     control do
-      driver.create_storage_snapshot(credentials, params)
+      driver.destroy_storage_snapshot(credentials, params)
       respond_to do |format|
         format.xml { return 204 }
         format.json { return 204 }
@@ -516,7 +516,6 @@ collection :storage_snapshots do
       end
     end
   end
-
 end
 
 get '/api/storage_volumes/new' do
-- 
1.7.1


Mime
View raw message