Sha256: 890eddefb48847bb55526549cdeb9598a44c18579f5e7c0349db6903b686f877

Contents?: true

Size: 1.2 KB

Versions: 17

Compression:

Stored size: 1.2 KB

Contents

module Beaker
  class Hypervisor

    def configure(hosts)
      @logger.debug "No post-provisioning configuration necessary for #{self.class.name} boxes"
    end

    def self.create(type, hosts_to_provision, options)
      @logger = options[:logger]
      @logger.notify("Beaker::Hypervisor, found some #{type} boxes to create") 
      hyper_class = case type
        when /aix/
          Beaker::Aixer
        when /solaris/
          Beaker::Solaris
        when /vsphere/
          Beaker::Vsphere
        when /fusion/
          Beaker::Fusion
        when /blimpy/
          Beaker::Blimper
        when /vcloud/
          if options['pooling_api']
            Beaker::VcloudPooled
          else
            Beaker::Vcloud
          end
        when /vagrant/
          Beaker::Vagrant
        end
      hypervisor = hyper_class.new(hosts_to_provision, options)
      hypervisor.provision

      hypervisor
    end

    def provision
      nil
    end

  end
end

%w( vsphere_helper vagrant fusion blimper vsphere vcloud vcloud_pooled aixer solaris).each do |lib|
  begin
    require "hypervisor/#{lib}"
  rescue LoadError
    require File.expand_path(File.join(File.dirname(__FILE__), "hypervisor", lib))
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
beaker-1.8.1 lib/beaker/hypervisor.rb
beaker-1.8.0 lib/beaker/hypervisor.rb
beaker-1.7.0 lib/beaker/hypervisor.rb
beaker-1.6.2 lib/beaker/hypervisor.rb
beaker-1.6.1 lib/beaker/hypervisor.rb
beaker-1.6.0 lib/beaker/hypervisor.rb
beaker-1.5.0 lib/beaker/hypervisor.rb
beaker-1.4.1 lib/beaker/hypervisor.rb
beaker-1.4.0 lib/beaker/hypervisor.rb
beaker-1.3.2 lib/beaker/hypervisor.rb
beaker-1.3.1 lib/beaker/hypervisor.rb
beaker-1.3.0 lib/beaker/hypervisor.rb
beaker-1.2.0 lib/beaker/hypervisor.rb
beaker-1.1.0 lib/beaker/hypervisor.rb
beaker-1.0.1 lib/beaker/hypervisor.rb
beaker-1.0.1.pre lib/beaker/hypervisor.rb
beaker-1.0.0 lib/beaker/hypervisor.rb