deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@redhat.com
Subject [PATCH core 2/3] RHEV-M: Report unaccessible API_PROVIDER as 502
Date Fri, 24 Feb 2012 12:23:18 GMT
From: Michal Fojtik <mfojtik@redhat.com>

Previously when API_PROVIDER was specified incorrectly
or RHEV-M API server was unaccessible, HTTP status code
500 (Internal Server Error) was reported.
HTTP specification, handle this with 502 (Bad Gateway) error.

Signed-off-by: Michal fojtik <mfojtik@redhat.com>
---
 .../lib/deltacloud/drivers/rhevm/rhevm_driver.rb   |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb b/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
index 12f628e..162175c 100644
--- a/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
+++ b/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
@@ -339,11 +339,11 @@ class RHEVMDriver < Deltacloud::BaseDriver
       status 404
     end
 
-    on /InternalServerError/ do
+    on /(InternalServerError|nodename nor servname provided)/ do
       status 502
     end
 
-    on /(RestClient|RHEVM)/ do
+    on /(RestClient|RHEVM|Ovirt)/ do
       status 500
     end
 
-- 
1.7.9.1


Mime
View raw message