module Deltacloud::Drivers

Public Class Methods

driver_config() click to toggle source
# File lib/deltacloud/drivers.rb, line 24
def self.driver_config
  if Thread::current[:drivers].nil?
    Thread::current[:drivers] = {}
    top_srcdir = File.join(File.dirname(__FILE__), '..', '..')
    Dir[File.join(top_srcdir, 'config', 'drivers', '*.yaml')].each do |driver_file|
      Thread::current[:drivers].merge!(YAML::load_file(driver_file))
    end
  end
  Thread::current[:drivers]
end