incubator-deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject svn commit: r1189171 - /incubator/deltacloud/trunk/server/bin/deltacloudd
Date Wed, 26 Oct 2011 12:36:43 GMT
Author: mfojtik
Date: Wed Oct 26 12:36:43 2011
New Revision: 1189171

URL: http://svn.apache.org/viewvc?rev=1189171&view=rev
Log:
Core: Fixed deltacloudd ability to list available drivers

Modified:
    incubator/deltacloud/trunk/server/bin/deltacloudd

Modified: incubator/deltacloud/trunk/server/bin/deltacloudd
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/bin/deltacloudd?rev=1189171&r1=1189170&r2=1189171&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/bin/deltacloudd (original)
+++ incubator/deltacloud/trunk/server/bin/deltacloudd Wed Oct 26 12:36:43 2011
@@ -16,6 +16,8 @@
 # under the License.
 #
 
+$:.unshift File.join(File.dirname(__FILE__), '..')
+
 require 'rubygems'
 require 'optparse'
 require 'yaml'
@@ -115,7 +117,10 @@ unless options[:drivers] or ENV["API_DRI
 end
 
 if options[:drivers]
-  require 'server.rb'
+  $top_srcdir = File.join(File.dirname(__FILE__), '..')
+  $:.unshift File.join($top_srcdir, 'lib')
+  server_dir = ENV['API_FRONTEND'] == 'cimi' ? 'cimi' : 'deltacloud'
+  load File.join($top_srcdir, 'lib', server_dir, 'server.rb')
   puts "Available drivers:\n\n"
   puts "* " + driver_config.keys.map{ |d| d.to_s }.join("\n* ")
   puts



Mime
View raw message