Sha256: 76315f3497c5d3552747549b3d8cf364273ddfb5b37396d3e95bfd170a0c8aaa

Contents?: true

Size: 783 Bytes

Versions: 15

Compression:

Stored size: 783 Bytes

Contents

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

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

      def generate_node(node_info, base_config, bhg_version)
        base_config['hypervisor'] = 'docker'
        base_config['docker_cmd'] = ['/sbin/init']
        base_config['image'] = node_info['ostype'].sub(/(\d)/, ':\1')
        base_config['image'].sub!(/(\d{2})/, '\1.') if node_info['ostype'] =~ /^ubuntu/

        platform = node_info['platform']
        platform_info = get_platform_info(bhg_version, platform, :docker)
        base_config.deep_merge! platform_info

        return base_config
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
beaker-hostgenerator-1.1.24 lib/beaker-hostgenerator/hypervisor/docker.rb
beaker-hostgenerator-1.1.23 lib/beaker-hostgenerator/hypervisor/docker.rb
beaker-hostgenerator-1.1.22 lib/beaker-hostgenerator/hypervisor/docker.rb
beaker-hostgenerator-1.1.21 lib/beaker-hostgenerator/hypervisor/docker.rb
beaker-hostgenerator-1.1.20 lib/beaker-hostgenerator/hypervisor/docker.rb
beaker-hostgenerator-1.1.19 lib/beaker-hostgenerator/hypervisor/docker.rb
beaker-hostgenerator-1.1.18 lib/beaker-hostgenerator/hypervisor/docker.rb
beaker-hostgenerator-1.1.17 lib/beaker-hostgenerator/hypervisor/docker.rb
beaker-hostgenerator-1.1.16 lib/beaker-hostgenerator/hypervisor/docker.rb
beaker-hostgenerator-1.1.15 lib/beaker-hostgenerator/hypervisor/docker.rb
beaker-hostgenerator-1.1.14 lib/beaker-hostgenerator/hypervisor/docker.rb
beaker-hostgenerator-1.1.13 lib/beaker-hostgenerator/hypervisor/docker.rb
beaker-hostgenerator-1.1.12 lib/beaker-hostgenerator/hypervisor/docker.rb
beaker-hostgenerator-1.1.11 lib/beaker-hostgenerator/hypervisor/docker.rb
beaker-hostgenerator-1.1.10 lib/beaker-hostgenerator/hypervisor/docker.rb