incubator-deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "marios@redhat.com" <mandr...@redhat.com>
Subject Re: [PATCH core] Core: Fixed deltacloudd ability to list available drivers
Date Wed, 26 Oct 2011 12:35:18 GMT
ACK

On 26/10/11 15:31, mfojtik@redhat.com wrote:
> From: Bulat Shakirzyanov <mallluhuct@gmail.com>
> 
> 
> Signed-off-by: Michal fojtik <mfojtik@redhat.com>
> ---
>  server/bin/deltacloudd |    7 ++++++-
>  1 files changed, 6 insertions(+), 1 deletions(-)
> 
> diff --git a/server/bin/deltacloudd b/server/bin/deltacloudd
> index 46f5616..e8fca6e 100755
> --- a/server/bin/deltacloudd
> +++ b/server/bin/deltacloudd
> @@ -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_DRIVER"]
>  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