beaker-hostgenerator 1.4.0 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 989df830d08bfb7726aaf9ec65529668898cda03efe855b1627f31185c66680a
4
- data.tar.gz: 274abeb00d5230dd22125fd8bfc4a50901a76dbd2cec5b2c646c1eae60aa28a3
3
+ metadata.gz: f66ec9e9bd76078ef767cc152a9d22930c9cb20cd15c856e43149ccf87c04dc1
4
+ data.tar.gz: e9c0cda19a2cf2381b0e609e1a1aff9c2cd0dbc895b809fca0649556d306a1aa
5
5
  SHA512:
6
- metadata.gz: b1edd1be82dfc67db26c277b95880df4da410cb90083f80d0a146e39b5104b4c3d62e0e4dd974d2fa333d78871bec3baa1c3128c3c4e9d1a4da1d14730f6d6db
7
- data.tar.gz: 8768bc0e4ddbac23d5fe918943b4560d605f4dc6386ef100d07af508340b5f5052e849b55d1e1c4fafa0a28686770f5a56973ff0c003c8df7c94e92f3a97364c
6
+ metadata.gz: 91cf25527d7f1fc7dc5de73929e3a774d5e1bdc8c934c267419501845a011e3c752b8fe3484ba661de49f47ba9318e5d6f18d80223ffcb2ccb5ace5aa21dfc2a
7
+ data.tar.gz: 2f49add8f297dd0938a63c7ff2f2b6300e0d8ba0a0bc3498035aefc81747a0ee6ea12adc96eacfa186735bb496be4b8676226f4b6b0eb22ca8343473b6803b9e
data/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [1.5.0](https://github.com/voxpupuli/beaker-hostgenerator/tree/1.5.0) (2021-06-14)
6
+
7
+ [Full Changelog](https://github.com/voxpupuli/beaker-hostgenerator/compare/1.4.0...1.5.0)
8
+
9
+ **Implemented enhancements:**
10
+
11
+ - Ensure amd64 containers are pulled when needed [\#214](https://github.com/voxpupuli/beaker-hostgenerator/pull/214) ([genebean](https://github.com/genebean))
12
+ - Add Fedora 34 support [\#212](https://github.com/voxpupuli/beaker-hostgenerator/pull/212) ([GabrielNagy](https://github.com/GabrielNagy))
13
+
14
+ **Fixed bugs:**
15
+
16
+ - Fix oracle image name [\#215](https://github.com/voxpupuli/beaker-hostgenerator/pull/215) ([genebean](https://github.com/genebean))
17
+ - Avoid activesupport deep\_merge conflict [\#213](https://github.com/voxpupuli/beaker-hostgenerator/pull/213) ([GabrielNagy](https://github.com/GabrielNagy))
18
+
5
19
  ## [1.4.0](https://github.com/voxpupuli/beaker-hostgenerator/tree/1.4.0) (2021-05-11)
6
20
 
7
21
  [Full Changelog](https://github.com/voxpupuli/beaker-hostgenerator/compare/1.3.0...1.4.0)
@@ -83,7 +83,7 @@ module BeakerHostGenerator
83
83
  result = {}
84
84
 
85
85
  # Fedora
86
- (19..33).each do |release|
86
+ (19..34).each do |release|
87
87
  # 32 bit support was dropped in Fedora 31
88
88
  if release < 31
89
89
  result["fedora#{release}-32"] = {
@@ -1924,9 +1924,9 @@ module BeakerHostGenerator
1924
1924
  def get_osinfo(bhg_version)
1925
1925
  case bhg_version
1926
1926
  when 0
1927
- {}.deep_merge!(osinfo)
1927
+ {}.deeper_merge!(osinfo)
1928
1928
  when 1
1929
- {}.deep_merge!(osinfo).deep_merge!(osinfo_bhgv1)
1929
+ {}.deeper_merge!(osinfo).deeper_merge!(osinfo_bhgv1)
1930
1930
  else
1931
1931
  raise "Invalid beaker-hostgenerator version: #{bhg_version}"
1932
1932
  end
@@ -1970,10 +1970,7 @@ module BeakerHostGenerator
1970
1970
  # }
1971
1971
  def get_platform_info(bhg_version, platform, hypervisor)
1972
1972
  info = get_osinfo(bhg_version)[platform]
1973
- result = {}
1974
- result.deep_merge!(info[:general]) if info[:general]
1975
- result.deep_merge!(info[hypervisor]) if info[hypervisor]
1976
- result
1973
+ {}.deeper_merge!(info[:general]).deeper_merge!(info[hypervisor])
1977
1974
  end
1978
1975
 
1979
1976
  # Perform any adjustments or modifications necessary to the given node
@@ -22,7 +22,7 @@ module BeakerHostGenerator
22
22
  def generate(layout, options)
23
23
  layout = prepare(layout)
24
24
  tokens = tokenize_layout(layout)
25
- config = {}.deep_merge(BASE_CONFIG)
25
+ config = {}.deeper_merge(BASE_CONFIG)
26
26
  nodeid = Hash.new(1)
27
27
  ostype = nil
28
28
  bhg_version = options[:osinfo_version] || 0
@@ -51,7 +51,7 @@ module BeakerHostGenerator
51
51
  # Delegate to the hypervisor
52
52
  hypervisor = BeakerHostGenerator::Hypervisor.create(node_info, options)
53
53
  host_config = hypervisor.generate_node(node_info, host_config, bhg_version)
54
- config['CONFIG'].deep_merge!(hypervisor.global_config())
54
+ config['CONFIG'].deeper_merge!(hypervisor.global_config())
55
55
 
56
56
  # Merge in any arbitrary key-value host settings. Treat the 'hostname'
57
57
  # setting specially, and don't merge it in as an arbitrary setting.
@@ -80,7 +80,7 @@ module BeakerHostGenerator
80
80
  decoded = "{#{decoded}}"
81
81
  end
82
82
  global_config = settings_string_to_map(decoded)
83
- config['CONFIG'].deep_merge!(global_config)
83
+ config['CONFIG'].deeper_merge!(global_config)
84
84
  end
85
85
 
86
86
  # Munge non-string scalar values into proper data types
@@ -117,7 +117,7 @@ module BeakerHostGenerator
117
117
 
118
118
  if not options[:disable_role_config]
119
119
  host_config['roles'].each do |role|
120
- host_config.deep_merge! get_role_config(role)
120
+ host_config.deeper_merge! get_role_config(role)
121
121
  end
122
122
  end
123
123
  end
@@ -94,7 +94,7 @@ module BeakerHostGenerator
94
94
  def base_generate_node(node_info, base_config, bhg_version, *hypervisors)
95
95
  platform = node_info['platform']
96
96
  hypervisors.map do |hypervisor|
97
- base_config.deep_merge! get_platform_info(bhg_version, platform, hypervisor)
97
+ base_config.deeper_merge! get_platform_info(bhg_version, platform, hypervisor)
98
98
  end
99
99
 
100
100
  base_config['hypervisor'] = @name
@@ -1,6 +1,6 @@
1
1
  require 'beaker-hostgenerator/data'
2
2
  require 'beaker-hostgenerator/hypervisor'
3
- require 'deep_merge'
3
+ require 'deep_merge/rails_compat'
4
4
 
5
5
  module BeakerHostGenerator
6
6
  module Hypervisor
@@ -1,6 +1,6 @@
1
1
  require 'beaker-hostgenerator/data'
2
2
  require 'beaker-hostgenerator/hypervisor'
3
- require 'deep_merge'
3
+ require 'deep_merge/rails_compat'
4
4
 
5
5
  module BeakerHostGenerator
6
6
  module Hypervisor
@@ -10,8 +10,12 @@ module BeakerHostGenerator
10
10
  def generate_node(node_info, base_config, bhg_version)
11
11
  base_config['docker_cmd'] = ['/sbin/init']
12
12
  base_config['image'] = node_info['ostype'].sub(/(\d)/, ':\1')
13
+ base_config['image'].sub!(/\w+/, 'oraclelinux') if node_info['ostype'] =~ /^oracle/
13
14
  base_config['image'].sub!(/(\w+)/, '\1/leap') if node_info['ostype'] =~ /^opensuse/
14
15
  base_config['image'].sub!(/(\d{2})/, '\1.') if node_info['ostype'] =~ /^ubuntu/
16
+ if node_info['bits'] == '64'
17
+ base_config['image'] = "amd64/#{base_config['image']}"
18
+ end
15
19
 
16
20
  return base_generate_node(node_info, base_config, bhg_version, :docker)
17
21
  end
@@ -1,6 +1,6 @@
1
1
  require 'beaker-hostgenerator/hypervisor'
2
2
  require 'beaker-hostgenerator/data'
3
- require 'deep_merge'
3
+ require 'deep_merge/rails_compat'
4
4
 
5
5
  module BeakerHostGenerator::Hypervisor
6
6
  class Unknown < BeakerHostGenerator::Hypervisor::Interface
@@ -1,6 +1,6 @@
1
1
  require 'beaker-hostgenerator/data'
2
2
  require 'beaker-hostgenerator/hypervisor'
3
- require 'deep_merge'
3
+ require 'deep_merge/rails_compat'
4
4
 
5
5
  module BeakerHostGenerator
6
6
  module Hypervisor
@@ -1,6 +1,6 @@
1
1
  require 'beaker-hostgenerator/data'
2
2
  require 'beaker-hostgenerator/hypervisor'
3
- require 'deep_merge'
3
+ require 'deep_merge/rails_compat'
4
4
 
5
5
  module BeakerHostGenerator
6
6
  module Hypervisor
@@ -1,7 +1,7 @@
1
1
  require 'beaker-hostgenerator/data'
2
2
  require 'beaker-hostgenerator/roles'
3
3
  require 'beaker-hostgenerator/hypervisor/vmpooler'
4
- require 'deep_merge'
4
+ require 'deep_merge/rails_compat'
5
5
 
6
6
  module BeakerHostGenerator
7
7
  module Utils
@@ -18,8 +18,8 @@ module BeakerHostGenerator
18
18
  def dump_hosts(hosts, path)
19
19
  vmpooler_hypervisor = BeakerHostGenerator::Hypervisor::Vmpooler.new
20
20
  config = {}
21
- config.deep_merge! BeakerHostGenerator::Data.BASE_CONFIG
22
- config['CONFIG'].deep_merge! vmpooler_hypervisor.global_config()
21
+ config.deeper_merge! BeakerHostGenerator::Data.BASE_CONFIG
22
+ config['CONFIG'].deeper_merge! vmpooler_hypervisor.global_config()
23
23
 
24
24
  hosts.each do |host|
25
25
  config['HOSTS'][host.node_name] = {
@@ -1,5 +1,5 @@
1
1
  module BeakerHostGenerator
2
2
  module Version
3
- STRING = '1.4.0'
3
+ STRING = '1.5.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker-hostgenerator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Branan Purvine-Riley
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-05-11 00:00:00.000000000 Z
13
+ date: 2021-06-14 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: minitest