deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@redhat.com
Subject [PATCH core] Core: Report unknown frontend properly (DTACLOUD-331)
Date Mon, 01 Oct 2012 08:45:25 GMT
From: Michal Fojtik <mfojtik@redhat.com>


Signed-off-by: Michal fojtik <mfojtik@redhat.com>
---
 server/config.ru |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/server/config.ru b/server/config.ru
index 6a28352..8ef20e5 100644
--- a/server/config.ru
+++ b/server/config.ru
@@ -54,6 +54,10 @@ end
 #       different root_url's
 #
 frontends.each do |frontend|
+  if Deltacloud[frontend.to_sym].nil?
+    puts "ERROR: Unknown frontend (#{frontend}). Valid values are 'deltacloud,cimi,ec2'"
+    exit(1)
+  end
   Deltacloud[frontend.to_sym].require!
   routes.merge!({
     Deltacloud[frontend].root_url => Deltacloud[frontend].klass
-- 
1.7.10.2


Mime
View raw message