Module: AETK

Defined in:
lib/abiquo-etk.rb

Defined Under Namespace

Modules: OutputFormatters Classes: Log, System

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.load_plugins(extra_plugins_dir = nil) ⇒ Object



248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
# File 'lib/abiquo-etk.rb', line 248

def self.load_plugins(extra_plugins_dir = nil)
  puts "Loading plugins...".yellow.bold
  version = System.abiquo_version
  plugins = Dir[File.dirname(__FILE__) + "/checks/#{version}/*.rb"].sort
  if extra_plugins_dir and File.directory? extra_plugins_dir
    puts "Loading extra plugins...".yellow.bold
    plugins.concat( Dir[extra_plugins_dir + '/*.rb'].sort )
  end
  log = Log.instance
  if log.level == Logger::DEBUG
    plugins.each do |p|
      log.debug "  #{File.basename(p,'.rb')}..."
    end
  end
  plugins.each do |p|
    $stdout.sync = true
    load p
  end

end

Instance Method Details

#detect_install_typeObject



166
167
168
# File 'lib/abiquo-etk.rb', line 166

def detect_install_type
  AETK::System.detect_install_type
end