Please ignore for now. Probably need to add a test case first to confirm
drivers are handling the errors correctly.

Regards,
Dies

> -----Original Message-----
> From: di...@fast.au.fujitsu.com [mailto:di...@fast.au.fujitsu.com]
> Sent: Wednesday, 30 January 2013 3:38 PM
> To: dev@deltacloud.apache.org
> 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
> 
> From: Dies Koper <di...@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_sy
m)
> -        return report_error(405)
> -      end
> -
>        @benchmark = Benchmark.measure do
>          @instance = driver.send(:"#{name}_instance", credentials,
params[:id])
>        end
> --
> 1.8.0.msysgit.0
> 
> 


Reply via email to