Sha256: f93c48bdc557252c99c0c0485598560312670668038fcfb06ab571b211eaf5e5

Contents?: true

Size: 1.37 KB

Versions: 33

Compression:

Stored size: 1.37 KB

Contents

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

module BeakerHostGenerator
  module Hypervisor
    # AlwaysBeScheduling implementation to support CI.next.
    #
    # The ABS services requires the vmpooler template values as input to
    # determine the type of platform that's being requested.
    #
    # Therefore, this hypervisor just reuses the vmpooler hypervisor template
    # values, in addition to ABS-only values for hardware platforms.
    class ABS < BeakerHostGenerator::Hypervisor::Interface
      include BeakerHostGenerator::Data

      def generate_node(node_info, base_config, bhg_version)
        base_config['hypervisor'] = 'abs'

        # Grab vmpooler data for this platform and any hardware (ABS) data.
        # The assumption here is that these are mutually exclusive; that is,
        # any given platform will have *either* :vmpooler data or :abs data
        # so we're not worried about one overriding the other when we merge
        # the hashes together.
        platform = node_info['platform']
        vmpooler_platform_info = get_platform_info(bhg_version, platform, :vmpooler)
        abs_platform_info = get_platform_info(bhg_version, platform, :abs)

        base_config.deep_merge! vmpooler_platform_info
        base_config.deep_merge! abs_platform_info

        return base_config
      end
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
beaker-hostgenerator-1.1.24 lib/beaker-hostgenerator/hypervisor/abs.rb
beaker-hostgenerator-1.1.23 lib/beaker-hostgenerator/hypervisor/abs.rb
beaker-hostgenerator-1.1.22 lib/beaker-hostgenerator/hypervisor/abs.rb
beaker-hostgenerator-1.1.21 lib/beaker-hostgenerator/hypervisor/abs.rb
beaker-hostgenerator-1.1.20 lib/beaker-hostgenerator/hypervisor/abs.rb
beaker-hostgenerator-1.1.19 lib/beaker-hostgenerator/hypervisor/abs.rb
beaker-hostgenerator-1.1.18 lib/beaker-hostgenerator/hypervisor/abs.rb
beaker-hostgenerator-1.1.17 lib/beaker-hostgenerator/hypervisor/abs.rb
beaker-hostgenerator-1.1.16 lib/beaker-hostgenerator/hypervisor/abs.rb
beaker-hostgenerator-1.1.15 lib/beaker-hostgenerator/hypervisor/abs.rb
beaker-hostgenerator-1.1.14 lib/beaker-hostgenerator/hypervisor/abs.rb
beaker-hostgenerator-1.1.13 lib/beaker-hostgenerator/hypervisor/abs.rb
beaker-hostgenerator-1.1.12 lib/beaker-hostgenerator/hypervisor/abs.rb
beaker-hostgenerator-1.1.11 lib/beaker-hostgenerator/hypervisor/abs.rb
beaker-hostgenerator-1.1.10 lib/beaker-hostgenerator/hypervisor/abs.rb
beaker-hostgenerator-1.1.9 lib/beaker-hostgenerator/hypervisor/abs.rb
beaker-hostgenerator-1.1.8 lib/beaker-hostgenerator/hypervisor/abs.rb
beaker-hostgenerator-1.1.7 lib/beaker-hostgenerator/hypervisor/abs.rb
beaker-hostgenerator-1.1.6 lib/beaker-hostgenerator/hypervisor/abs.rb
beaker-hostgenerator-1.1.5 lib/beaker-hostgenerator/hypervisor/abs.rb