beaker-hostgenerator 1.2.10 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/release.yml +22 -0
- data/.github/workflows/test.yml +27 -0
- data/CHANGELOG.md +1981 -308
- data/CODEOWNERS +0 -1
- data/Gemfile +5 -1
- data/HISTORY.md +53 -26
- data/README.md +14 -0
- data/Rakefile +24 -0
- data/beaker-hostgenerator.gemspec +2 -2
- data/lib/beaker-hostgenerator/data.rb +84 -203
- data/lib/beaker-hostgenerator/hypervisor/abs.rb +10 -1
- data/lib/beaker-hostgenerator/hypervisor/docker.rb +1 -0
- data/lib/beaker-hostgenerator/hypervisor/vmpooler.rb +7 -0
- data/lib/beaker-hostgenerator/parser.rb +3 -3
- data/lib/beaker-hostgenerator/version.rb +1 -1
- metadata +11 -10
- data/.travis.yml +0 -10
@@ -20,7 +20,16 @@ module BeakerHostGenerator
|
|
20
20
|
# any given platform will have *either* :vmpooler data or :abs data
|
21
21
|
# so we're not worried about one overriding the other when we merge
|
22
22
|
# the hashes together.
|
23
|
-
|
23
|
+
base_config = base_generate_node(node_info, base_config, bhg_version, :vmpooler, :abs)
|
24
|
+
|
25
|
+
case node_info['ostype']
|
26
|
+
when /^centos/
|
27
|
+
base_config['template'] = base_config['platform'].gsub(/^el/, 'centos')
|
28
|
+
when /^fedora/
|
29
|
+
base_config['template'] = base_config['platform']
|
30
|
+
end
|
31
|
+
|
32
|
+
base_config
|
24
33
|
end
|
25
34
|
end
|
26
35
|
end
|
@@ -10,6 +10,7 @@ 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+)/, '\1/leap') if node_info['ostype'] =~ /^opensuse/
|
13
14
|
base_config['image'].sub!(/(\d{2})/, '\1.') if node_info['ostype'] =~ /^ubuntu/
|
14
15
|
|
15
16
|
return base_generate_node(node_info, base_config, bhg_version, :docker)
|
@@ -17,6 +17,13 @@ module BeakerHostGenerator
|
|
17
17
|
def generate_node(node_info, base_config, bhg_version)
|
18
18
|
base_config = base_generate_node(node_info, base_config, bhg_version, :vmpooler)
|
19
19
|
|
20
|
+
case node_info['ostype']
|
21
|
+
when /^centos/
|
22
|
+
base_config['template'] = base_config['platform'].gsub(/^el/, 'centos')
|
23
|
+
when /^fedora/
|
24
|
+
base_config['template'] = base_config['platform']
|
25
|
+
end
|
26
|
+
|
20
27
|
# Some vmpooler/vsphere platforms have special requirements.
|
21
28
|
# We munge the node host config here if that is necessary.
|
22
29
|
fixup_node base_config
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'beaker-hostgenerator/data'
|
2
2
|
require 'beaker-hostgenerator/exceptions'
|
3
|
-
require '
|
3
|
+
require 'cgi'
|
4
4
|
|
5
5
|
module BeakerHostGenerator
|
6
6
|
# Functions for parsing the raw user input host layout string and turning
|
@@ -75,7 +75,7 @@ module BeakerHostGenerator
|
|
75
75
|
# @returns [String] Input string with transformations necessary for
|
76
76
|
# tokenization.
|
77
77
|
def prepare(spec)
|
78
|
-
|
78
|
+
CGI.unescape(spec)
|
79
79
|
end
|
80
80
|
|
81
81
|
# Breaks apart the host input string into chunks suitable for processing
|
@@ -260,7 +260,7 @@ module BeakerHostGenerator
|
|
260
260
|
current_depth = current_depth.pred
|
261
261
|
next
|
262
262
|
end
|
263
|
-
|
263
|
+
|
264
264
|
# When there is assignment happening, we need to create a new
|
265
265
|
# corresponding data structure, add it to the object depth, and
|
266
266
|
# then change the current depth
|
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
|
+
version: 1.3.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:
|
13
|
+
date: 2021-04-15 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: minitest
|
@@ -58,36 +58,36 @@ dependencies:
|
|
58
58
|
name: fakefs
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
|
-
- - "
|
61
|
+
- - ">="
|
62
62
|
- !ruby/object:Gem::Version
|
63
63
|
version: '0.6'
|
64
64
|
- - "<"
|
65
65
|
- !ruby/object:Gem::Version
|
66
|
-
version:
|
66
|
+
version: '2.0'
|
67
67
|
type: :development
|
68
68
|
prerelease: false
|
69
69
|
version_requirements: !ruby/object:Gem::Requirement
|
70
70
|
requirements:
|
71
|
-
- - "
|
71
|
+
- - ">="
|
72
72
|
- !ruby/object:Gem::Version
|
73
73
|
version: '0.6'
|
74
74
|
- - "<"
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version:
|
76
|
+
version: '2.0'
|
77
77
|
- !ruby/object:Gem::Dependency
|
78
78
|
name: rake
|
79
79
|
requirement: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
81
|
- - "~>"
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version: '
|
83
|
+
version: '13.0'
|
84
84
|
type: :development
|
85
85
|
prerelease: false
|
86
86
|
version_requirements: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
88
|
- - "~>"
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version: '
|
90
|
+
version: '13.0'
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: simplecov
|
93
93
|
requirement: !ruby/object:Gem::Requirement
|
@@ -185,10 +185,11 @@ extensions: []
|
|
185
185
|
extra_rdoc_files: []
|
186
186
|
files:
|
187
187
|
- ".github/dependabot.yml"
|
188
|
+
- ".github/workflows/release.yml"
|
189
|
+
- ".github/workflows/test.yml"
|
188
190
|
- ".gitignore"
|
189
191
|
- ".rspec"
|
190
192
|
- ".simplecov"
|
191
|
-
- ".travis.yml"
|
192
193
|
- CHANGELOG.md
|
193
194
|
- CODEOWNERS
|
194
195
|
- CONTRIBUTING.md
|
@@ -235,7 +236,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
235
236
|
- !ruby/object:Gem::Version
|
236
237
|
version: '0'
|
237
238
|
requirements: []
|
238
|
-
rubygems_version: 3.
|
239
|
+
rubygems_version: 3.1.6
|
239
240
|
signing_key:
|
240
241
|
specification_version: 4
|
241
242
|
summary: Beaker Host Generator Utility
|