Sha256: e4223ef3ac840b69d1649f2c5af07dd8535a03f8037941fef28c71f20feda59f

Contents?: true

Size: 1 KB

Versions: 2

Compression:

Stored size: 1 KB

Contents

require 'beaker-hostgenerator/data'
require 'beaker-hostgenerator/hypervisor'
require 'deep_merge'

module BeakerHostGenerator
  module Hypervisor
    class Vmpooler < BeakerHostGenerator::Hypervisor::Interface
      include BeakerHostGenerator::Data

      # default global configuration keys
      def global_config()
        {
          'pooling_api' => 'http://vmpooler.delivery.puppetlabs.net/'
        }
      end

      def generate_node(node_info, base_config, bhg_version)
        base_config = base_generate_node(node_info, base_config, bhg_version, :vmpooler)

        case node_info['ostype']
        when /^centos/
          base_config['template'] = base_config['platform'].gsub(/^el/, 'centos')
        when /^fedora/
          base_config['template'] = base_config['platform']
        end

        # Some vmpooler/vsphere platforms have special requirements.
        # We munge the node host config here if that is necessary.
        fixup_node base_config

        return base_config
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
beaker-hostgenerator-1.4.0 lib/beaker-hostgenerator/hypervisor/vmpooler.rb
beaker-hostgenerator-1.3.0 lib/beaker-hostgenerator/hypervisor/vmpooler.rb