deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject git commit: RHEV-M: Properly capture the RHEV-M error for user_data (DTACLOUD-153)
Date Wed, 07 Mar 2012 12:10:32 GMT
Updated Branches:
  refs/heads/master f96f99825 -> 3d8bada10


RHEV-M: Properly capture the RHEV-M error for user_data (DTACLOUD-153)

Previosly when client launched an instance and use user_data attribute
against RHEV-M provider that does not have floppyinject hook installed,
client got an 'Unhandled exception' error with 500 (Internal Server Error)
response.
This patch will add correct response 501 (Not supported) and properly
capture the underlaying exception.


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

Branch: refs/heads/master
Commit: 3d8bada107a78c6755c142dad271f8c7a2b0bf2a
Parents: f96f998
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Mon Mar 5 16:11:02 2012 +0100
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Wed Mar 7 13:10:25 2012 +0100

----------------------------------------------------------------------
 .../lib/deltacloud/drivers/rhevm/rhevm_driver.rb   |    4 ++++
 .../lib/deltacloud/helpers/application_helper.rb   |    1 +
 2 files changed, 5 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/3d8bada1/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb b/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
index 10ffef3..8a0764c 100644
--- a/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
+++ b/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
@@ -335,6 +335,10 @@ class RHEVMDriver < Deltacloud::BaseDriver
       status 401
     end
 
+    on /(not supported|custom properties are not configured)/ do
+      status 501
+    end
+
     on /(InternalServerError|nodename nor servname provided)/ do
       status 502
     end

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/3d8bada1/server/lib/deltacloud/helpers/application_helper.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/helpers/application_helper.rb b/server/lib/deltacloud/helpers/application_helper.rb
index 623fac8..e368103 100644
--- a/server/lib/deltacloud/helpers/application_helper.rb
+++ b/server/lib/deltacloud/helpers/application_helper.rb
@@ -266,6 +266,7 @@ module ApplicationHelper
       when 406; { :message => "Not Acceptable" }
       when 500; { :message => "Internal Server Error" }
       when 502; { :message => "Backend Server Error" }
+      when 501; { :message => "Not Supported" }
     end
   end
 


Mime
View raw message