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: Updated exception list to reflect rbovirt
Date Wed, 22 Feb 2012 14:29:12 GMT
Updated Branches:
  refs/heads/master 0d3192917 -> 984fa6343


RHEV-M: Updated exception list to reflect rbovirt

Since we switched to rbovirt gem, the exceptions are now
raised from rbovirt and not from RestClient. This patch update
list of exceptions we're capturing in RHEV-M driver.

Exceptions should be now propely reported to client.


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

Branch: refs/heads/master
Commit: 984fa634312cab7730bfdf031ab1d47ed3d09ae3
Parents: 0d31929
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Wed Feb 22 15:28:38 2012 +0100
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Wed Feb 22 15:28:38 2012 +0100

----------------------------------------------------------------------
 .../lib/deltacloud/drivers/rhevm/rhevm_driver.rb   |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/984fa634/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 e974944..12f628e 100644
--- a/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
+++ b/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
@@ -195,8 +195,6 @@ class RHEVMDriver < Deltacloud::BaseDriver
   def valid_credentials?(credentials)
     begin
       realms(credentials) && true
-    rescue RestClient::Unauthorized
-      retval = false
     rescue => e
       safely do
         raise e
@@ -333,15 +331,15 @@ class RHEVMDriver < Deltacloud::BaseDriver
       status 400
     end
 
-    on /RestClient::Unauthorized/ do
+    on /Unauthorized/ do
       status 401
     end
 
-    on /RestClient::ResourceNotFound/ do
+    on /ResourceNotFound/ do
       status 404
     end
 
-    on /RestClient::InternalServerError/ do
+    on /InternalServerError/ do
       status 502
     end
 


Mime
View raw message