deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Fojtik <mfoj...@redhat.com>
Subject Re: [PATCH core 2/2] Core: Fixed displaying drivers using deltacloudd --drivers
Date Mon, 28 May 2012 13:03:27 GMT
On 05/28/12, marios@redhat.com wrote:
> ACK both

Thanks! Pushed.

> 
> On 28/05/12 11:52, mfojtik@redhat.com wrote:
> > From: Michal Fojtik <mfojtik@redhat.com>
> > 
> > 
> > Signed-off-by: Michal fojtik <mfojtik@redhat.com>
> > ---
> >  server/bin/deltacloudd            |    4 ++--
> >  server/lib/deltacloud/core_ext.rb |    8 ++++++++
> >  2 files changed, 10 insertions(+), 2 deletions(-)
> > 
> > diff --git a/server/bin/deltacloudd b/server/bin/deltacloudd
> > index 8eb448d..3dbe967 100755
> > --- a/server/bin/deltacloudd
> > +++ b/server/bin/deltacloudd
> > @@ -128,9 +128,9 @@ end
> >  if options[:drivers]
> >    $:.unshift File.join($top_srcdir, 'lib')
> >    server_dir = ENV['API_FRONTEND'] == 'cimi' ? 'cimi' : 'deltacloud'
> > -  load File.join($top_srcdir, 'lib', server_dir, 'server.rb')
> > +  load File.join($top_srcdir, 'lib', server_dir, 'api.rb')
> >    puts "Available drivers:\n\n"
> > -  puts "* " + driver_config.keys.map{ |d| d.to_s }.join("\n* ")
> > +  puts Deltacloud.drivers.keys.join("\n")
> >    puts
> >    exit(0)
> >  end
> > diff --git a/server/lib/deltacloud/core_ext.rb b/server/lib/deltacloud/core_ext.rb
> > index edaaa00..b448adb 100644
> > --- a/server/lib/deltacloud/core_ext.rb
> > +++ b/server/lib/deltacloud/core_ext.rb
> > @@ -14,6 +14,14 @@
> >  # under the License.
> >  #
> >  
> > +unless Kernel.respond_to?(:require_relative)
> > +  module Kernel
> > +    def require_relative(path)
> > +      require File.join(File.dirname(caller[0]), path.to_str)
> > +    end
> > +  end
> > +end
> > +
> >  require_relative './core_ext/array'
> >  require_relative './core_ext/hash'
> >  require_relative './core_ext/integer'
> 

-- 
Michal Fojtik
Sr. Software Engineer, Deltacloud API (http://deltacloud.org)

Mime
View raw message