deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@redhat.com
Subject [PATCH core 3/3] RHEV-M: Report 404 correctly on unknown datacenter
Date Fri, 24 Feb 2012 12:23:19 GMT
From: Michal Fojtik <mfojtik@redhat.com>


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

diff --git a/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb b/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
index 162175c..10ffef3 100644
--- a/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
+++ b/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
@@ -335,20 +335,16 @@ class RHEVMDriver < Deltacloud::BaseDriver
       status 401
     end
 
-    on /ResourceNotFound/ do
-      status 404
-    end
-
     on /(InternalServerError|nodename nor servname provided)/ do
       status 502
     end
 
-    on /(RestClient|RHEVM|Ovirt)/ do
-      status 500
+    on /(404|ResourceNotFound)/ do
+      status 404
     end
 
-    on /(.*) not found^/ do
-      status 400
+    on /(RestClient|RHEVM|OVIRT)/ do
+      status 500
     end
 
     on /Parameter name/ do
-- 
1.7.9.1


Mime
View raw message