Sha256: 6a030cf2cfbc4c79ddec54c01c2ea72459db117bd6b9a05050cf431d7de735a2
Contents?: true
Size: 1.16 KB
Versions: 18
Compression:
Stored size: 1.16 KB
Contents
require 'beaker-hostgenerator/data' require 'beaker-hostgenerator/roles' require 'beaker-hostgenerator/hypervisor/vmpooler' require 'deep_merge/rails_compat' module BeakerHostGenerator module Utils module_function def pe_dir(version, family = nil) BeakerHostGenerator::Data.pe_dir(version) end def fixup_node(cfg) BeakerHostGenerator::Data.fixup_node(cfg) end def dump_hosts(hosts, path) vmpooler_hypervisor = BeakerHostGenerator::Hypervisor::Vmpooler.new config = {} config.deeper_merge! BeakerHostGenerator::Data.BASE_CONFIG config['CONFIG'].deeper_merge! vmpooler_hypervisor.global_config() hosts.each do |host| config['HOSTS'][host.node_name] = { 'roles' => host['roles'], 'hypervisor' => "#{host['hypervisor']}", 'platform' => "#{host['platform']}", } end File.open(path, 'w') do |file| file.write(config.to_yaml) end end def get_platforms(hypervisor_type='vmpooler', bhg_version=0) BeakerHostGenerator::Data.get_platforms(bhg_version) end def get_roles BeakerHostGenerator::Roles.ROLES end end end
Version data entries
18 entries across 18 versions & 1 rubygems