deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <di...@fast.au.fujitsu.com>
Subject [PATCH] DTACLOUD-214: don't check the current state of the instance at all, rather let the driver handle the errors from the provider
Date Wed, 30 Jan 2013 04:37:35 GMT
From: Dies Koper <diesk@fast.au.fujitsu.com>

---
 server/lib/deltacloud/helpers/deltacloud_helper.rb | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/server/lib/deltacloud/helpers/deltacloud_helper.rb b/server/lib/deltacloud/helpers/deltacloud_helper.rb
index 4575ae2..cdcbe6f 100644
--- a/server/lib/deltacloud/helpers/deltacloud_helper.rb
+++ b/server/lib/deltacloud/helpers/deltacloud_helper.rb
@@ -140,14 +140,6 @@ module Deltacloud::Helpers
     end
 
     def instance_action(name)
-      original_instance = driver.instance(credentials, :id => params[:id])
-
-      # If original instance doesn't include called action
-      # return with 405 error (Method is not Allowed)
-      unless driver.instance_actions_for(original_instance.state).include?(name.to_sym)
-        return report_error(405)
-      end
-
       @benchmark = Benchmark.measure do
         @instance = driver.send(:"#{name}_instance", credentials, params[:id])
       end
-- 
1.8.0.msysgit.0



Mime
View raw message