deltacloud-dev mailing list archives

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

Previously, when client accessed VSphere through our
VSphere driver and wrong API_PROVIDER was specified,
client got 500 (Internal Server) error.
This kind of error is according to HTTP specification
covered by 502 (Bad Gateway).

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

diff --git a/server/lib/deltacloud/drivers/vsphere/vsphere_driver.rb b/server/lib/deltacloud/drivers/vsphere/vsphere_driver.rb
index 0f6d93a..e2e7654 100644
--- a/server/lib/deltacloud/drivers/vsphere/vsphere_driver.rb
+++ b/server/lib/deltacloud/drivers/vsphere/vsphere_driver.rb
@@ -356,6 +356,10 @@ module Deltacloud::Drivers::VSphere
         status 401
       end
 
+      on /nodename nor servname provided/ do
+        status 502
+      end
+
       on /ERROR/ do
         status 500
       end
-- 
1.7.9.1


Mime
View raw message