beaker-hostgenerator 0.3.3 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/CHANGELOG.md +17 -0
- data/Gemfile +4 -0
- data/HISTORY.md +201 -2
- data/README.md +91 -0
- data/Rakefile +27 -1
- data/beaker-hostgenerator.gemspec +0 -1
- data/bin/beaker-hostgenerator +5 -1
- data/bin/genconfig2 +5 -1
- data/lib/beaker-hostgenerator/cli.rb +28 -8
- data/lib/beaker-hostgenerator/data/vmpooler.rb +3 -2
- data/lib/beaker-hostgenerator/data.rb +15 -5
- data/lib/beaker-hostgenerator/exceptions.rb +7 -0
- data/lib/beaker-hostgenerator/generator.rb +16 -9
- data/lib/beaker-hostgenerator/util.rb +2 -2
- data/lib/beaker-hostgenerator/version.rb +1 -1
- data/spec/beaker-hostgenerator/generator_spec.rb +35 -3
- data/test/fixtures/default/arista4-32a +20 -0
- data/test/fixtures/default/centos4-32u +21 -0
- data/test/fixtures/default/centos4-64l +21 -0
- data/test/fixtures/default/centos5-32c +21 -0
- data/test/fixtures/default/centos5-64d +21 -0
- data/test/fixtures/default/centos6-32f +21 -0
- data/test/fixtures/default/centos6-64m +21 -0
- data/test/fixtures/default/centos7-64aulcdfm +26 -0
- data/test/fixtures/default/ciscoexr7-64u +22 -0
- data/test/fixtures/default/cisconxos5-64a +23 -0
- data/test/fixtures/default/cumulus25-64l +21 -0
- data/test/fixtures/default/debian6-32c +21 -0
- data/test/fixtures/default/debian6-64d +21 -0
- data/test/fixtures/default/debian7-32f +21 -0
- data/test/fixtures/default/debian7-64m +21 -0
- data/test/fixtures/default/debian8-32aulcdfm +26 -0
- data/test/fixtures/default/debian8-64a +20 -0
- data/test/fixtures/default/debian9-32u +21 -0
- data/test/fixtures/default/debian9-64l +21 -0
- data/test/fixtures/default/fedora14-32l +21 -0
- data/test/fixtures/default/fedora19-32c +21 -0
- data/test/fixtures/default/fedora19-64d +21 -0
- data/test/fixtures/default/fedora20-32f +21 -0
- data/test/fixtures/default/fedora20-64m +21 -0
- data/test/fixtures/default/fedora21-32aulcdfm +26 -0
- data/test/fixtures/default/fedora21-64a +20 -0
- data/test/fixtures/default/fedora22-32u +21 -0
- data/test/fixtures/default/fedora22-64l +21 -0
- data/test/fixtures/default/fedora23-32c +21 -0
- data/test/fixtures/default/fedora23-64d +21 -0
- data/test/fixtures/default/opensuse11-32f +21 -0
- data/test/fixtures/default/opensuse11-64m +21 -0
- data/test/fixtures/default/oracle5-32c +21 -0
- data/test/fixtures/default/oracle5-64d +21 -0
- data/test/fixtures/default/oracle6-32f +21 -0
- data/test/fixtures/default/oracle6-64m +21 -0
- data/test/fixtures/default/oracle7-64aulcdfm +26 -0
- data/test/fixtures/default/osx1010-64u +21 -0
- data/test/fixtures/default/osx1011-64l +21 -0
- data/test/fixtures/default/osx109-64a +20 -0
- data/test/fixtures/default/redhat4-32c +21 -0
- data/test/fixtures/default/redhat4-64d +21 -0
- data/test/fixtures/default/redhat5-32f +21 -0
- data/test/fixtures/default/redhat5-64m +21 -0
- data/test/fixtures/default/redhat6-32aulcdfm +26 -0
- data/test/fixtures/default/redhat6-64a +20 -0
- data/test/fixtures/default/redhat7-64u +21 -0
- data/test/fixtures/default/scientific5-32aulcdfm +26 -0
- data/test/fixtures/default/scientific5-64a +20 -0
- data/test/fixtures/default/scientific6-32u +21 -0
- data/test/fixtures/default/scientific6-64l +21 -0
- data/test/fixtures/default/scientific7-64c +21 -0
- data/test/fixtures/default/sles10-32d +21 -0
- data/test/fixtures/default/sles10-64f +21 -0
- data/test/fixtures/default/sles11-32m +21 -0
- data/test/fixtures/default/sles11-64aulcdfm +26 -0
- data/test/fixtures/default/sles12-64a +20 -0
- data/test/fixtures/default/solaris10-32u +21 -0
- data/test/fixtures/default/solaris10-64l +21 -0
- data/test/fixtures/default/solaris11-32c +21 -0
- data/test/fixtures/default/solaris11-64d +21 -0
- data/test/fixtures/default/solaris112-32f +21 -0
- data/test/fixtures/default/solaris112-64m +21 -0
- data/test/fixtures/default/ubuntu1004-32aulcdfm +26 -0
- data/test/fixtures/default/ubuntu1004-64a +20 -0
- data/test/fixtures/default/ubuntu1204-32u +21 -0
- data/test/fixtures/default/ubuntu1204-64l +21 -0
- data/test/fixtures/default/ubuntu1404-32c +21 -0
- data/test/fixtures/default/ubuntu1404-64d +21 -0
- data/test/fixtures/default/ubuntu1504-32f +21 -0
- data/test/fixtures/default/ubuntu1504-64m +21 -0
- data/test/fixtures/default/ubuntu1510-32aulcdfm +26 -0
- data/test/fixtures/default/ubuntu1510-64a +20 -0
- data/test/fixtures/default/windows10ent-32l +22 -0
- data/test/fixtures/default/windows10ent-64c +22 -0
- data/test/fixtures/default/windows10pro-64d +22 -0
- data/test/fixtures/default/windows2003-6432l +22 -0
- data/test/fixtures/default/windows2003-64u +22 -0
- data/test/fixtures/default/windows2003r2-32c +22 -0
- data/test/fixtures/default/windows2003r2-6432f +22 -0
- data/test/fixtures/default/windows2003r2-64d +22 -0
- data/test/fixtures/default/windows2008-6432aulcdfm +27 -0
- data/test/fixtures/default/windows2008-64m +22 -0
- data/test/fixtures/default/windows2008r2-6432u +22 -0
- data/test/fixtures/default/windows2008r2-64a +21 -0
- data/test/fixtures/default/windows2012-6432c +22 -0
- data/test/fixtures/default/windows2012-64l +22 -0
- data/test/fixtures/default/windows2012r2-6432f +22 -0
- data/test/fixtures/default/windows2012r2-64d +22 -0
- data/test/fixtures/default/windows7-64m +22 -0
- data/test/fixtures/default/windows8-64aulcdfm +27 -0
- data/test/fixtures/default/windows81-64a +21 -0
- data/test/fixtures/default/windowsvista-64u +22 -0
- data/test/fixtures/environment_variable_tests/pe_version_and_pe_family/centos6-32a +24 -0
- data/test/fixtures/environment_variable_tests/pe_version_and_pe_family_no_upgrade/centos6-32a +22 -0
- data/test/fixtures/environment_variable_tests/pe_version_and_pe_family_upgrade_only/centos6-32a +22 -0
- data/test/fixtures/osinfo-version-0/arista4-32a +20 -0
- data/test/fixtures/osinfo-version-0/centos4-32u +21 -0
- data/test/fixtures/osinfo-version-0/centos4-64l +21 -0
- data/test/fixtures/osinfo-version-0/centos5-32c +21 -0
- data/test/fixtures/osinfo-version-0/centos5-64d +21 -0
- data/test/fixtures/osinfo-version-0/centos6-32f +21 -0
- data/test/fixtures/osinfo-version-0/centos6-64m +21 -0
- data/test/fixtures/osinfo-version-0/centos7-64aulcdfm +26 -0
- data/test/fixtures/osinfo-version-0/ciscoexr7-64u +22 -0
- data/test/fixtures/osinfo-version-0/cisconxos5-64a +23 -0
- data/test/fixtures/osinfo-version-0/cumulus25-64l +21 -0
- data/test/fixtures/osinfo-version-0/debian6-32c +21 -0
- data/test/fixtures/osinfo-version-0/debian6-64d +21 -0
- data/test/fixtures/osinfo-version-0/debian7-32f +21 -0
- data/test/fixtures/osinfo-version-0/debian7-64m +21 -0
- data/test/fixtures/osinfo-version-0/debian8-32aulcdfm +26 -0
- data/test/fixtures/osinfo-version-0/debian8-64a +20 -0
- data/test/fixtures/osinfo-version-0/debian9-32u +21 -0
- data/test/fixtures/osinfo-version-0/debian9-64l +21 -0
- data/test/fixtures/osinfo-version-0/fedora14-32l +21 -0
- data/test/fixtures/osinfo-version-0/fedora19-32c +21 -0
- data/test/fixtures/osinfo-version-0/fedora19-64d +21 -0
- data/test/fixtures/osinfo-version-0/fedora20-32f +21 -0
- data/test/fixtures/osinfo-version-0/fedora20-64m +21 -0
- data/test/fixtures/osinfo-version-0/fedora21-32aulcdfm +26 -0
- data/test/fixtures/osinfo-version-0/fedora21-64a +20 -0
- data/test/fixtures/osinfo-version-0/fedora22-32u +21 -0
- data/test/fixtures/osinfo-version-0/fedora22-64l +21 -0
- data/test/fixtures/osinfo-version-0/fedora23-32c +21 -0
- data/test/fixtures/osinfo-version-0/fedora23-64d +21 -0
- data/test/fixtures/osinfo-version-0/opensuse11-32f +21 -0
- data/test/fixtures/osinfo-version-0/opensuse11-64m +21 -0
- data/test/fixtures/osinfo-version-0/oracle5-32c +21 -0
- data/test/fixtures/osinfo-version-0/oracle5-64d +21 -0
- data/test/fixtures/osinfo-version-0/oracle6-32f +21 -0
- data/test/fixtures/osinfo-version-0/oracle6-64m +21 -0
- data/test/fixtures/osinfo-version-0/oracle7-64aulcdfm +26 -0
- data/test/fixtures/osinfo-version-0/osx1010-64u +21 -0
- data/test/fixtures/osinfo-version-0/osx1011-64l +21 -0
- data/test/fixtures/osinfo-version-0/osx109-64a +20 -0
- data/test/fixtures/osinfo-version-0/redhat4-32c +21 -0
- data/test/fixtures/osinfo-version-0/redhat4-64d +21 -0
- data/test/fixtures/osinfo-version-0/redhat5-32f +21 -0
- data/test/fixtures/osinfo-version-0/redhat5-64m +21 -0
- data/test/fixtures/osinfo-version-0/redhat6-32aulcdfm +26 -0
- data/test/fixtures/osinfo-version-0/redhat6-64a +20 -0
- data/test/fixtures/osinfo-version-0/redhat7-64u +21 -0
- data/test/fixtures/osinfo-version-0/scientific5-32aulcdfm +26 -0
- data/test/fixtures/osinfo-version-0/scientific5-64a +20 -0
- data/test/fixtures/osinfo-version-0/scientific6-32u +21 -0
- data/test/fixtures/osinfo-version-0/scientific6-64l +21 -0
- data/test/fixtures/osinfo-version-0/scientific7-64c +21 -0
- data/test/fixtures/osinfo-version-0/sles10-32d +21 -0
- data/test/fixtures/osinfo-version-0/sles10-64f +21 -0
- data/test/fixtures/osinfo-version-0/sles11-32m +21 -0
- data/test/fixtures/osinfo-version-0/sles11-64aulcdfm +26 -0
- data/test/fixtures/osinfo-version-0/sles12-64a +20 -0
- data/test/fixtures/osinfo-version-0/solaris10-32u +21 -0
- data/test/fixtures/osinfo-version-0/solaris10-64l +21 -0
- data/test/fixtures/osinfo-version-0/solaris11-32c +21 -0
- data/test/fixtures/osinfo-version-0/solaris11-64d +21 -0
- data/test/fixtures/osinfo-version-0/solaris112-32f +21 -0
- data/test/fixtures/osinfo-version-0/solaris112-64m +21 -0
- data/test/fixtures/osinfo-version-0/ubuntu1004-32aulcdfm +26 -0
- data/test/fixtures/osinfo-version-0/ubuntu1004-64a +20 -0
- data/test/fixtures/osinfo-version-0/ubuntu1204-32u +21 -0
- data/test/fixtures/osinfo-version-0/ubuntu1204-64l +21 -0
- data/test/fixtures/osinfo-version-0/ubuntu1404-32c +21 -0
- data/test/fixtures/osinfo-version-0/ubuntu1404-64d +21 -0
- data/test/fixtures/osinfo-version-0/ubuntu1504-32f +21 -0
- data/test/fixtures/osinfo-version-0/ubuntu1504-64m +21 -0
- data/test/fixtures/osinfo-version-0/ubuntu1510-32aulcdfm +26 -0
- data/test/fixtures/osinfo-version-0/ubuntu1510-64a +20 -0
- data/test/fixtures/osinfo-version-0/windows10ent-32l +22 -0
- data/test/fixtures/osinfo-version-0/windows10ent-64c +22 -0
- data/test/fixtures/osinfo-version-0/windows10pro-64d +22 -0
- data/test/fixtures/osinfo-version-0/windows2003-6432l +22 -0
- data/test/fixtures/osinfo-version-0/windows2003-64u +22 -0
- data/test/fixtures/osinfo-version-0/windows2003r2-32c +22 -0
- data/test/fixtures/osinfo-version-0/windows2003r2-6432f +22 -0
- data/test/fixtures/osinfo-version-0/windows2003r2-64d +22 -0
- data/test/fixtures/osinfo-version-0/windows2008-6432aulcdfm +27 -0
- data/test/fixtures/osinfo-version-0/windows2008-64m +22 -0
- data/test/fixtures/osinfo-version-0/windows2008r2-6432u +22 -0
- data/test/fixtures/osinfo-version-0/windows2008r2-64a +21 -0
- data/test/fixtures/osinfo-version-0/windows2012-6432c +22 -0
- data/test/fixtures/osinfo-version-0/windows2012-64l +22 -0
- data/test/fixtures/osinfo-version-0/windows2012r2-6432f +22 -0
- data/test/fixtures/osinfo-version-0/windows2012r2-64d +22 -0
- data/test/fixtures/osinfo-version-0/windows7-64m +22 -0
- data/test/fixtures/osinfo-version-0/windows8-64aulcdfm +27 -0
- data/test/fixtures/osinfo-version-0/windows81-64a +21 -0
- data/test/fixtures/osinfo-version-0/windowsvista-64u +22 -0
- data/test/fixtures/osinfo-version-1/arista4-32a +20 -0
- data/test/fixtures/osinfo-version-1/centos4-32u +21 -0
- data/test/fixtures/osinfo-version-1/centos4-64l +21 -0
- data/test/fixtures/osinfo-version-1/centos5-32c +21 -0
- data/test/fixtures/osinfo-version-1/centos5-64d +21 -0
- data/test/fixtures/osinfo-version-1/centos6-32f +21 -0
- data/test/fixtures/osinfo-version-1/centos6-64m +21 -0
- data/test/fixtures/osinfo-version-1/centos7-64aulcdfm +26 -0
- data/test/fixtures/osinfo-version-1/ciscoexr7-64u +22 -0
- data/test/fixtures/osinfo-version-1/cisconxos5-64a +23 -0
- data/test/fixtures/osinfo-version-1/cumulus25-64l +21 -0
- data/test/fixtures/osinfo-version-1/debian6-32c +21 -0
- data/test/fixtures/osinfo-version-1/debian6-64d +21 -0
- data/test/fixtures/osinfo-version-1/debian7-32f +21 -0
- data/test/fixtures/osinfo-version-1/debian7-64m +21 -0
- data/test/fixtures/osinfo-version-1/debian8-32aulcdfm +26 -0
- data/test/fixtures/osinfo-version-1/debian8-64a +20 -0
- data/test/fixtures/osinfo-version-1/debian9-32u +21 -0
- data/test/fixtures/osinfo-version-1/debian9-64l +21 -0
- data/test/fixtures/osinfo-version-1/fedora14-32l +21 -0
- data/test/fixtures/osinfo-version-1/fedora19-32c +21 -0
- data/test/fixtures/osinfo-version-1/fedora19-64d +21 -0
- data/test/fixtures/osinfo-version-1/fedora20-32f +21 -0
- data/test/fixtures/osinfo-version-1/fedora20-64m +21 -0
- data/test/fixtures/osinfo-version-1/fedora21-32aulcdfm +26 -0
- data/test/fixtures/osinfo-version-1/fedora21-64a +20 -0
- data/test/fixtures/osinfo-version-1/fedora22-32u +21 -0
- data/test/fixtures/osinfo-version-1/fedora22-64l +21 -0
- data/test/fixtures/osinfo-version-1/fedora23-32c +21 -0
- data/test/fixtures/osinfo-version-1/fedora23-64d +21 -0
- data/test/fixtures/osinfo-version-1/opensuse11-32f +21 -0
- data/test/fixtures/osinfo-version-1/opensuse11-64m +21 -0
- data/test/fixtures/osinfo-version-1/oracle5-32c +21 -0
- data/test/fixtures/osinfo-version-1/oracle5-64d +21 -0
- data/test/fixtures/osinfo-version-1/oracle6-32f +21 -0
- data/test/fixtures/osinfo-version-1/oracle6-64m +21 -0
- data/test/fixtures/osinfo-version-1/oracle7-64aulcdfm +26 -0
- data/test/fixtures/osinfo-version-1/osx1010-64u +21 -0
- data/test/fixtures/osinfo-version-1/osx1011-64l +21 -0
- data/test/fixtures/osinfo-version-1/osx109-64a +20 -0
- data/test/fixtures/osinfo-version-1/redhat4-32c +21 -0
- data/test/fixtures/osinfo-version-1/redhat4-64d +21 -0
- data/test/fixtures/osinfo-version-1/redhat5-32f +21 -0
- data/test/fixtures/osinfo-version-1/redhat5-64m +21 -0
- data/test/fixtures/osinfo-version-1/redhat6-32aulcdfm +26 -0
- data/test/fixtures/osinfo-version-1/redhat6-64a +20 -0
- data/test/fixtures/osinfo-version-1/redhat7-64u +21 -0
- data/test/fixtures/osinfo-version-1/scientific5-32aulcdfm +26 -0
- data/test/fixtures/osinfo-version-1/scientific5-64a +20 -0
- data/test/fixtures/osinfo-version-1/scientific6-32u +21 -0
- data/test/fixtures/osinfo-version-1/scientific6-64l +21 -0
- data/test/fixtures/osinfo-version-1/scientific7-64c +21 -0
- data/test/fixtures/osinfo-version-1/sles10-32d +21 -0
- data/test/fixtures/osinfo-version-1/sles10-64f +21 -0
- data/test/fixtures/osinfo-version-1/sles11-32m +21 -0
- data/test/fixtures/osinfo-version-1/sles11-64aulcdfm +26 -0
- data/test/fixtures/osinfo-version-1/sles12-64a +20 -0
- data/test/fixtures/osinfo-version-1/solaris10-32u +21 -0
- data/test/fixtures/osinfo-version-1/solaris10-64l +21 -0
- data/test/fixtures/osinfo-version-1/solaris11-32c +21 -0
- data/test/fixtures/osinfo-version-1/solaris11-64d +21 -0
- data/test/fixtures/osinfo-version-1/solaris112-32f +21 -0
- data/test/fixtures/osinfo-version-1/solaris112-64m +21 -0
- data/test/fixtures/osinfo-version-1/ubuntu1004-32aulcdfm +26 -0
- data/test/fixtures/osinfo-version-1/ubuntu1004-64a +20 -0
- data/test/fixtures/osinfo-version-1/ubuntu1204-32u +21 -0
- data/test/fixtures/osinfo-version-1/ubuntu1204-64l +21 -0
- data/test/fixtures/osinfo-version-1/ubuntu1404-32c +21 -0
- data/test/fixtures/osinfo-version-1/ubuntu1404-64d +21 -0
- data/test/fixtures/osinfo-version-1/ubuntu1504-32f +21 -0
- data/test/fixtures/osinfo-version-1/ubuntu1504-64m +21 -0
- data/test/fixtures/osinfo-version-1/ubuntu1510-32aulcdfm +26 -0
- data/test/fixtures/osinfo-version-1/ubuntu1510-64a +20 -0
- data/test/fixtures/osinfo-version-1/windows10ent-32l +22 -0
- data/test/fixtures/osinfo-version-1/windows10ent-64c +22 -0
- data/test/fixtures/osinfo-version-1/windows10pro-64d +22 -0
- data/test/fixtures/osinfo-version-1/windows2003-6432l +22 -0
- data/test/fixtures/osinfo-version-1/windows2003-64u +22 -0
- data/test/fixtures/osinfo-version-1/windows2003r2-32c +22 -0
- data/test/fixtures/osinfo-version-1/windows2003r2-6432f +22 -0
- data/test/fixtures/osinfo-version-1/windows2003r2-64d +22 -0
- data/test/fixtures/osinfo-version-1/windows2008-6432aulcdfm +27 -0
- data/test/fixtures/osinfo-version-1/windows2008-64m +22 -0
- data/test/fixtures/osinfo-version-1/windows2008r2-6432u +22 -0
- data/test/fixtures/osinfo-version-1/windows2008r2-64a +21 -0
- data/test/fixtures/osinfo-version-1/windows2012-6432c +22 -0
- data/test/fixtures/osinfo-version-1/windows2012-64l +22 -0
- data/test/fixtures/osinfo-version-1/windows2012r2-6432f +22 -0
- data/test/fixtures/osinfo-version-1/windows2012r2-64d +22 -0
- data/test/fixtures/osinfo-version-1/windows7-64m +22 -0
- data/test/fixtures/osinfo-version-1/windows8-64aulcdfm +27 -0
- data/test/fixtures/osinfo-version-1/windows81-64a +21 -0
- data/test/fixtures/osinfo-version-1/windowsvista-64u +22 -0
- data/test/fixtures/pe_dir/centos6-64mdc +23 -0
- data/test/fixtures/pe_upgrade_dir/centos6-64mdc +23 -0
- data/test/fixtures/pe_upgrade_ver/centos6-64mdc +23 -0
- data/test/fixtures/pe_ver/centos6-64mdc +23 -0
- data/test/test_cli.rb +20 -0
- data/test/test_generator.rb +27 -0
- data/test/test_stdout.rb +24 -0
- data/test/test_util.rb +26 -0
- data/test/util/generator_helpers.rb +150 -0
- metadata +294 -3
- data/lib/beaker-hostgenerator/error.rb +0 -6
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZTQyMTQzOTYwYjk2NzU5NTdjZGI1NzE0NzFlY2JjZWQ5OTFiZWNjOQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YzIxMWNjZWJmZDQ2ODFhZWI0NTk5YjcxNzUxZTQ5OWMwZTBlMmZiOQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZTE3ZTcyZjE0YzM1MGJiMWE2MzJlYTFiOTJmYjRiZjllNDM1MmI1MDI1N2U4
|
10
|
+
ODU5MGQyZmI3YjE0NmQwNzE1NmU4Zjc4NzVmNmM2OWJiN2M2ODBmMDdjMzUw
|
11
|
+
ZTUxMjQyZTMzNTNkYjQ1OWI3MTllZTAyZWQ2ZmYyMWMyNjllNDE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NmYxZjUyOGEyYjY1OTdiODVjNmNhZTExN2RmNWI3YWI4MzE3N2RjYWI2NDU1
|
14
|
+
MDE1ZDFmMzExMTdlYTZjY2NiN2ZjZDY0NWNjZWQ4MWZhNmM1ODM0NTMyYzU5
|
15
|
+
ODY1NTYyNWE0MGMwZDNiYzQyMTdmZDE1YTI2NDdiNzY3NjYyODE=
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,23 @@ Versioning](http://semver.org).
|
|
7
7
|
## [Unreleased][unreleased]
|
8
8
|
### Changed
|
9
9
|
|
10
|
+
## [0.4.0] - 2016-02-05
|
11
|
+
- Add new optional parameters to CLI:
|
12
|
+
--pe_upgrade_dir UPGRADE_PATH
|
13
|
+
Explicitly set pe_upgrade_dir attribute on generated hosts.
|
14
|
+
--pe_upgrade_ver UPGRADE_VERSION
|
15
|
+
Explicitly set pe_upgrade_ver attribute on generated hosts.
|
16
|
+
--pe_dir PATH
|
17
|
+
Explicitly set pe_dir attribute on generated hosts.
|
18
|
+
--pe_ver VERSION
|
19
|
+
Explicitly set pe_ver attribute on generated hosts.
|
20
|
+
|
21
|
+
- Implement data-driven testing approach that separates test logic from test
|
22
|
+
data to improve coverage on important code path (BeakerHostGenerator::CLI).
|
23
|
+
|
24
|
+
## [0.3.3] - 2016-02-04
|
25
|
+
- Fix Cisco platforms by setting required parameters for the vmpooler templates.
|
26
|
+
|
10
27
|
## [0.3.2] - 2016-01-28
|
11
28
|
- Change the way we generate the platform string for windows 10 hosts.
|
12
29
|
|
data/Gemfile
CHANGED
data/HISTORY.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# default - History
|
2
2
|
## Tags
|
3
|
-
* [LATEST -
|
3
|
+
* [LATEST - 10 Feb, 2016 (fe10edc1)](#LATEST)
|
4
|
+
* [0.3.3 - 3 Feb, 2016 (41051da9)](#0.3.3)
|
4
5
|
* [0.3.2 - 28 Jan, 2016 (299df8ec)](#0.3.2)
|
5
6
|
* [0.3.1 - 30 Dec, 2015 (7a3f10ca)](#0.3.1)
|
6
7
|
* [0.3.0 - 30 Dec, 2015 (4b03eaf4)](#0.3.0)
|
@@ -9,7 +10,205 @@
|
|
9
10
|
* [0.0.1 - 7 Oct, 2015 (d99251e6)](#0.0.1)
|
10
11
|
|
11
12
|
## Details
|
12
|
-
### <a name = "LATEST">LATEST -
|
13
|
+
### <a name = "LATEST">LATEST - 10 Feb, 2016 (fe10edc1)
|
14
|
+
|
15
|
+
* (GEM) update beaker-hostgenerator version to 0.4.0 (fe10edc1)
|
16
|
+
|
17
|
+
* (MAINT) Remove hard-coded gemspec date. (4770b013)
|
18
|
+
|
19
|
+
* Merge pull request #23 from puppetlabs/maint (f8b77852)
|
20
|
+
|
21
|
+
|
22
|
+
```
|
23
|
+
Merge pull request #23 from puppetlabs/maint
|
24
|
+
|
25
|
+
(QENG-3466) Fix --list bug and write tests to prevent recurrences.
|
26
|
+
```
|
27
|
+
* (MAINT) s/Errors/Exceptions/ in bin directory (b8b68c60)
|
28
|
+
|
29
|
+
* (MAINT) Better semantics for exception naming. (d0129893)
|
30
|
+
|
31
|
+
* (MAINT) Actually add new test. (f80192f3)
|
32
|
+
|
33
|
+
* (MAINT) Be more explicit in CHANGELOG (0a39fb6b)
|
34
|
+
|
35
|
+
* (MAINT) Write test for safe early exit behavior. (34866de1)
|
36
|
+
|
37
|
+
|
38
|
+
```
|
39
|
+
(MAINT) Write test for safe early exit behavior.
|
40
|
+
|
41
|
+
Specifically, ensure that when passed the "--list" options,
|
42
|
+
BeakerHostGenerator::CLI.initialize will raise the
|
43
|
+
BeakerHostGenerator::Errors::SafeEarlyExit exception which is intended to be
|
44
|
+
ignored by the script calling BeakerHostGenerator::CLI.initialize
|
45
|
+
```
|
46
|
+
* (MAINT) Update CHANGELOG (bb52432b)
|
47
|
+
|
48
|
+
* (MAINT) Write tests to protect --list CLI behavior. (e523773f)
|
49
|
+
|
50
|
+
* (MAINT) Don't call 'exit' in BeakerHostGenerator::CLI class. (e3bac654)
|
51
|
+
|
52
|
+
* (MAINT) Fix bug introduced by eecc04c (865b04c2)
|
53
|
+
|
54
|
+
* Merge pull request #21 from puppetlabs/qeng-3370 (45bf2295)
|
55
|
+
|
56
|
+
|
57
|
+
```
|
58
|
+
Merge pull request #21 from puppetlabs/qeng-3370
|
59
|
+
|
60
|
+
(QENG-3370) Add pe_* value CLI override options.
|
61
|
+
```
|
62
|
+
* (QENG-3370) Use mixins instead of module method references. (eecc04c8)
|
63
|
+
|
64
|
+
* (QENG-3370) Address PR feedback. (19cc3a9b)
|
65
|
+
|
66
|
+
* (QENG-3370) Fix grammar no no. (4d7d5db3)
|
67
|
+
|
68
|
+
* Revert "(QENG-3370) Add .projectile (emacs plugin) path exclusion." (1db7dfcc)
|
69
|
+
|
70
|
+
|
71
|
+
```
|
72
|
+
Revert "(QENG-3370) Add .projectile (emacs plugin) path exclusion."
|
73
|
+
|
74
|
+
This reverts commit 3dd4eb3a5488b55f6aae1d65db43e84c7c0ff625.
|
75
|
+
```
|
76
|
+
* (QENG-3370) Fix fixtures after merging cisco changes from master branch. (e1c65ffc)
|
77
|
+
|
78
|
+
* Merge remote-tracking branch 'origin/master' into qeng-3370 (8559505b)
|
79
|
+
|
80
|
+
* (QENG-3370) Fix module constant initialization bug. (aa3e08cd)
|
81
|
+
|
82
|
+
|
83
|
+
```
|
84
|
+
(QENG-3370) Fix module constant initialization bug.
|
85
|
+
|
86
|
+
Similar to the BeakerHostGenerator::Data::Vmpooler data initialization bug, this
|
87
|
+
is something that would not typically show up during normal command line usage
|
88
|
+
of beaker-hostgenerator because at that time there is typically only one
|
89
|
+
reference made to the BeakerHostGenerator::Utils module constant. However during
|
90
|
+
test fixture generation and rspec tests the modules were only loaded once so
|
91
|
+
there was only one attempt to read in environment variables which led to
|
92
|
+
inconsisten results depending on the order in which the fixtures were
|
93
|
+
generated/tested.
|
94
|
+
```
|
95
|
+
* (QENG-3370) Fix major bug in BeakerHostGenerator::Data::Vmpooler (f3359c8f)
|
96
|
+
|
97
|
+
|
98
|
+
```
|
99
|
+
(QENG-3370) Fix major bug in BeakerHostGenerator::Data::Vmpooler
|
100
|
+
|
101
|
+
Since the OSINFO and OSINFO_BHGv1 module constants are only initialized once
|
102
|
+
(during library load), do not refer directly to them using reference variables.
|
103
|
+
Instead, initialize the osinfo variable directly on each call of get_osinfo and
|
104
|
+
merge in the module constants as appropriate based on the given
|
105
|
+
beaker-hostenerator version integer.
|
106
|
+
|
107
|
+
This bug never came up during normal command-line usage of beaker-hostgenerator
|
108
|
+
because get_osinfo would never be expected to be called with both bhg_version=0
|
109
|
+
and bhg_version=1. However, it came up both during generation of test fixtures
|
110
|
+
and validation of those test fixtures in rspec since the module is only loaded
|
111
|
+
once which led to the mutated value of the OSINFO module constant to persist
|
112
|
+
across all initializations of the BeakerHostGenerator::CLI class.
|
113
|
+
```
|
114
|
+
* (QENG-3370) Generate test cases for pe_{family,version} variable combinations. (99965b3f)
|
115
|
+
|
116
|
+
* (QENG-3370) Minor cleanup of new rspec test. (e9a77bb5)
|
117
|
+
|
118
|
+
* (QENG-3370) Use fixtures in rspec tests instead of minitest. (b401574d)
|
119
|
+
|
120
|
+
|
121
|
+
```
|
122
|
+
(QENG-3370) Use fixtures in rspec tests instead of minitest.
|
123
|
+
|
124
|
+
This makes it possible to treat each individual fixture its own test case which
|
125
|
+
improves the reporting and ensures that all fixtures are tested even if some
|
126
|
+
fail.
|
127
|
+
|
128
|
+
Using a loop containing an assertion in minitest did not work for this purpose
|
129
|
+
because a failed assertion caused the loop to break prematurely; it probably
|
130
|
+
would have been possible to catch whatever the exception was and continue the
|
131
|
+
loop but whatever. I already did this.
|
132
|
+
```
|
133
|
+
* (QENG-3370) Rename options_string to arguments_string. (c6507fd4)
|
134
|
+
|
135
|
+
* (QENG-3370) Add documentation for test fixtures. (b6712a9b)
|
136
|
+
|
137
|
+
* (QENG-3370) Make it a little easier to generate fixtures. (a829a425)
|
138
|
+
|
139
|
+
|
140
|
+
```
|
141
|
+
(QENG-3370) Make it a little easier to generate fixtures.
|
142
|
+
|
143
|
+
* Move FixtureGenerator class into test/utils/generator_helpers.rb
|
144
|
+
* Create generate:test Rake task
|
145
|
+
```
|
146
|
+
* (QENG-3370) Add assert_equal mismatch message. (11cbba23)
|
147
|
+
|
148
|
+
* (QENG-3370) Add .projectile (emacs plugin) path exclusion. (3dd4eb3a)
|
149
|
+
|
150
|
+
* (QENG-3370) Use YAML.load_file method. (0b353986)
|
151
|
+
|
152
|
+
* (QENG-3370) Don't use minitest to generate fixtures. (6c3a890f)
|
153
|
+
|
154
|
+
* (QENG-3370) Generate various option fixtures. (71e4efca)
|
155
|
+
|
156
|
+
* (QENG-3370) Add some fixtures and a test case to iterate over them. (722abcd5)
|
157
|
+
|
158
|
+
* (QENG-3370) Use enumerators to produce more diverse combinations of host roles. (2f913aec)
|
159
|
+
|
160
|
+
* (QENG-3370) Move helper methods into helper module. (f4fd1cf5)
|
161
|
+
|
162
|
+
|
163
|
+
```
|
164
|
+
(QENG-3370) Move helper methods into helper module.
|
165
|
+
|
166
|
+
Unclutters the fixture generator class and maintains distinction between test
|
167
|
+
and helper methods.
|
168
|
+
```
|
169
|
+
* (QENG-3370) Create common method for generating options-based fixtures. (6be93ddc)
|
170
|
+
|
171
|
+
|
172
|
+
```
|
173
|
+
(QENG-3370) Create common method for generating options-based fixtures.
|
174
|
+
|
175
|
+
This will make it easier to generate many many fixtures.
|
176
|
+
```
|
177
|
+
* (QENG-3370) Add janky fixture generator. (88ac0341)
|
178
|
+
|
179
|
+
|
180
|
+
```
|
181
|
+
(QENG-3370) Add janky fixture generator.
|
182
|
+
|
183
|
+
This script allows one to generate test fixtures using beaker-hostgenerator
|
184
|
+
itself. Yay. The generated directory structure could use some more thought.
|
185
|
+
```
|
186
|
+
* (QENG-3370) Move GeneratorTestHelpers into its own file. (f7d3f996)
|
187
|
+
|
188
|
+
* (QENG-3370) Use BeakerHostGenerator::CLI directly. (45a2f7e4)
|
189
|
+
|
190
|
+
|
191
|
+
```
|
192
|
+
(QENG-3370) Use BeakerHostGenerator::CLI directly.
|
193
|
+
|
194
|
+
This may be necessary to ensure coverage checks can work correctly. Also, it
|
195
|
+
makes sense to test at this since I know of at least one project that is doing
|
196
|
+
something similar.
|
197
|
+
|
198
|
+
Not so sure about the way this is handling stderr though--just trying to avoid
|
199
|
+
polluting the minitest console output.
|
200
|
+
```
|
201
|
+
* (QENG-3770) Add GeneratorTestHelpers and default options test for test class. (388867d1)
|
202
|
+
|
203
|
+
* (QENG-3770) Stub out minitest for Generator class. (3af5796d)
|
204
|
+
|
205
|
+
* (QENG-3770) Get test:spec rake task to run minitest also. (436bb778)
|
206
|
+
|
207
|
+
* (QENG-3370) Add pe_* value CLI override options. (e321afc3)
|
208
|
+
|
209
|
+
### <a name = "0.3.3">0.3.3 - 3 Feb, 2016 (41051da9)
|
210
|
+
|
211
|
+
* (HISTORY) update beaker-hostgenerator history for gem release 0.3.3 (41051da9)
|
13
212
|
|
14
213
|
* (GEM) update beaker-hostgenerator version to 0.3.3 (34f5cee5)
|
15
214
|
|
data/README.md
CHANGED
@@ -8,6 +8,21 @@ but is designed in a way that makes it possible to easily add support for
|
|
8
8
|
additional hypervisor templates (any hypervisor type supported by
|
9
9
|
[beaker][beaker]).
|
10
10
|
|
11
|
+
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-generate-toc again -->
|
12
|
+
**Table of Contents**
|
13
|
+
|
14
|
+
- [Beaker Host Generator](#beaker-host-generator)
|
15
|
+
- [Usage](#usage)
|
16
|
+
- [Simple two-host SUT layout](#simple-two-host-sut-layout)
|
17
|
+
- [Single-host SUT layout with Arbitrary Roles](#single-host-sut-layout-with-arbitrary-roles)
|
18
|
+
- [Testing](#testing)
|
19
|
+
- [Test Fixtures](#test-fixtures)
|
20
|
+
- [Generated Fixtures](#generated-fixtures)
|
21
|
+
- [Support](#support)
|
22
|
+
- [License](#license)
|
23
|
+
|
24
|
+
<!-- markdown-toc end -->
|
25
|
+
|
11
26
|
## Usage
|
12
27
|
|
13
28
|
Below are some example usages of `beaker-hostgenerator`.
|
@@ -86,6 +101,82 @@ CONFIG:
|
|
86
101
|
pooling_api: http://vmpooler.delivery.puppetlabs.net/
|
87
102
|
```
|
88
103
|
|
104
|
+
## Testing
|
105
|
+
|
106
|
+
Beaker Host Generator currently uses both rspec and minitest tests. To run both
|
107
|
+
at the same time, run:
|
108
|
+
```bash
|
109
|
+
bundle exec rake tests
|
110
|
+
```
|
111
|
+
|
112
|
+
### Test Fixtures
|
113
|
+
|
114
|
+
Beaker Host Generator makes extensive use of test fixtures to validate its
|
115
|
+
behavior under specific conditions. An example of such a test fixture is as
|
116
|
+
follows:
|
117
|
+
|
118
|
+
```yaml
|
119
|
+
---
|
120
|
+
arguments_string: "--pe_dir /opt/hello centos6-64mdc"
|
121
|
+
environment_variables: {}
|
122
|
+
expected_hash:
|
123
|
+
HOSTS:
|
124
|
+
centos6-64-1:
|
125
|
+
pe_dir: "/opt/hello"
|
126
|
+
pe_ver:
|
127
|
+
pe_upgrade_dir:
|
128
|
+
pe_upgrade_ver:
|
129
|
+
hypervisor: vmpooler
|
130
|
+
platform: centos-6-x86_64
|
131
|
+
template: centos-6-x86_64
|
132
|
+
roles:
|
133
|
+
- agent
|
134
|
+
- master
|
135
|
+
- database
|
136
|
+
- dashboard
|
137
|
+
CONFIG:
|
138
|
+
nfs_server: none
|
139
|
+
consoleport: 443
|
140
|
+
pooling_api: http://vmpooler.delivery.puppetlabs.net/
|
141
|
+
expected_exception:
|
142
|
+
```
|
143
|
+
|
144
|
+
These test fixtures are yaml files searched for in the directory
|
145
|
+
`test/fixtures`. The data structure expected in these files is a hash with four
|
146
|
+
keys:
|
147
|
+
|
148
|
+
- `arguments_string`: The command line arguments that should be passed to
|
149
|
+
`beaker-hostgenerator`
|
150
|
+
- `environment_variables`: The environment variables that should be set during
|
151
|
+
the `beaker-hostgenerator` call.
|
152
|
+
- `expected_hash`: A hash that should match the output of `beaker-hostgenerator`
|
153
|
+
when it is run with `options\_string`
|
154
|
+
- `expected_exception`: If the `arguments_string` passed to `beaker-hostgenerator`
|
155
|
+
is expected to lead to an exceptional state, this is the name of the exception
|
156
|
+
that the fixture test will attempt to match.
|
157
|
+
|
158
|
+
#### Generated Fixtures
|
159
|
+
|
160
|
+
It is possible to generate test fixtures using the current state of the
|
161
|
+
`beaker-hostgenerator` library. To do this, call the `generate:fixtures` Rake
|
162
|
+
task.
|
163
|
+
|
164
|
+
However, this is not something that should need to be done very often. If you
|
165
|
+
are running tests and find that some fixtures no longer work, you have most
|
166
|
+
likely made a change that incompatibly changes the behavior of
|
167
|
+
`beaker-hostgenerator` for other users. Use the test fixtures as a guide to
|
168
|
+
figure out what you did wrong and figure out how to achieve your goal without
|
169
|
+
potentially breaking `beaker-hostgenerator` for other users.
|
170
|
+
|
171
|
+
There are a few circumstances when you should expect to run the
|
172
|
+
`generate:fixtures` task:
|
173
|
+
|
174
|
+
- When you modify the `FixtureGenerator` to generate new fixtures.
|
175
|
+
- When you need to fix a bug (generated hosts are not usable without your
|
176
|
+
change, for example).
|
177
|
+
- When preparing for a major version bump of Beaker Host Generator.
|
178
|
+
|
179
|
+
|
89
180
|
## Support
|
90
181
|
|
91
182
|
Support offered by [Puppet Labs](https://puppetlabs.com) may not always be timely
|
data/Rakefile
CHANGED
@@ -1,13 +1,24 @@
|
|
1
1
|
require 'rspec/core/rake_task'
|
2
|
+
require 'rake/testtask'
|
2
3
|
|
3
4
|
namespace :test do
|
4
5
|
|
5
6
|
namespace :spec do
|
6
7
|
|
8
|
+
task :minitest do
|
9
|
+
desc "Run minitest tests"
|
10
|
+
Rake::TestTask.new do |task|
|
11
|
+
task.libs << %w(test lib)
|
12
|
+
task.test_files = FileList['test/test*.rb']
|
13
|
+
task.verbose = true
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
7
17
|
desc "Run spec tests"
|
8
18
|
RSpec::Core::RakeTask.new(:run) do |t|
|
9
19
|
t.rspec_opts = ['--color']
|
10
20
|
t.pattern = 'spec/'
|
21
|
+
t.ruby_opts = '-Itest'
|
11
22
|
end
|
12
23
|
|
13
24
|
desc "Run spec tests with coverage"
|
@@ -37,10 +48,25 @@ A quick acceptance test, named because it has no pre-suites to run
|
|
37
48
|
|
38
49
|
end
|
39
50
|
|
51
|
+
namespace :generate do
|
52
|
+
desc "Generate test fixtures."
|
53
|
+
task :fixtures do
|
54
|
+
$LOAD_PATH.unshift(
|
55
|
+
File.join(Dir.pwd, 'lib'),
|
56
|
+
File.join(Dir.pwd, 'test')
|
57
|
+
)
|
58
|
+
require 'beaker-hostgenerator'
|
59
|
+
require 'util/generator_helpers'
|
60
|
+
|
61
|
+
fixgen = FixtureGenerator.new
|
62
|
+
fixgen.generate
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
40
66
|
# namespace-named default tasks.
|
41
67
|
# these are the default tasks invoked when only the namespace is referenced.
|
42
68
|
# they're needed because `task :default` in those blocks doesn't work as expected.
|
43
|
-
task 'test:spec' => 'test:spec:run'
|
69
|
+
task 'test:spec' => ['test:spec:run', 'test:spec:minitest']
|
44
70
|
task 'test:acceptance' => 'test:acceptance:quick'
|
45
71
|
|
46
72
|
# global defaults
|
@@ -5,7 +5,6 @@ require 'beaker-hostgenerator/version'
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = "beaker-hostgenerator"
|
7
7
|
s.version = BeakerHostGenerator::Version::STRING
|
8
|
-
s.date = "2015-10-07"
|
9
8
|
s.authors = ["Branan Purvine-Riley", "Wayne Warren"]
|
10
9
|
s.email = ["qe-team@puppetlabs.com"]
|
11
10
|
s.homepage = "https://github.com/puppetlabs/beaker-hostgenerator"
|
data/bin/beaker-hostgenerator
CHANGED
data/bin/genconfig2
CHANGED
@@ -7,4 +7,8 @@ require 'beaker-hostgenerator'
|
|
7
7
|
|
8
8
|
STDERR.puts("Warning: 'genconfig2' is deprecated and will be removed in beaker-hostgenerator 1.x\n\n")
|
9
9
|
|
10
|
-
|
10
|
+
begin
|
11
|
+
cli = BeakerHostGenerator::CLI.new
|
12
|
+
cli.execute!
|
13
|
+
rescue BeakerHostGenerator::Exceptions::SafeEarlyExit
|
14
|
+
end
|
@@ -64,6 +64,26 @@ Usage: beaker-hostgenerator [options] <layout>
|
|
64
64
|
@options[:hypervisor] = h
|
65
65
|
end
|
66
66
|
|
67
|
+
opts.on('--pe_upgrade_dir UPGRADE_PATH',
|
68
|
+
'Explicitly set pe_upgrade_dir attribute on generated hosts. ') do |p|
|
69
|
+
@options[:pe_upgrade_dir] = p
|
70
|
+
end
|
71
|
+
|
72
|
+
opts.on('--pe_upgrade_ver UPGRADE_VERSION',
|
73
|
+
'Explicitly set pe_upgrade_ver attribute on generated hosts. ') do |p|
|
74
|
+
@options[:pe_upgrade_ver] = p
|
75
|
+
end
|
76
|
+
|
77
|
+
opts.on('--pe_dir PATH',
|
78
|
+
'Explicitly set pe_dir attribute on generated hosts. ') do |p|
|
79
|
+
@options[:pe_dir] = p
|
80
|
+
end
|
81
|
+
|
82
|
+
opts.on('--pe_ver VERSION',
|
83
|
+
'Explicitly set pe_ver attribute on generated hosts. ') do |p|
|
84
|
+
@options[:pe_ver] = p
|
85
|
+
end
|
86
|
+
|
67
87
|
opts.on('--disable-role-config',
|
68
88
|
"Do not include role-specific configuration.") do
|
69
89
|
@options[:disable_role_config] = true
|
@@ -98,14 +118,13 @@ Usage: beaker-hostgenerator [options] <layout>
|
|
98
118
|
|
99
119
|
if @options[:list_platforms_and_roles]
|
100
120
|
print_platforms_and_roles
|
101
|
-
|
102
|
-
|
121
|
+
raise BeakerHostGenerator::Exceptions::SafeEarlyExit
|
122
|
+
else
|
123
|
+
# Tokenizing the config definition for great justice
|
124
|
+
@tokens = argv[0].split('-')
|
103
125
|
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
if @options[:osinfo_version] === 0
|
108
|
-
warning = <<-eow
|
126
|
+
if @options[:osinfo_version] === 0
|
127
|
+
warning = <<-eow
|
109
128
|
WARNING: Starting with beaker-hostgenerator 1.x platform strings for "el" hosts
|
110
129
|
will correspond to the actual linux distribution name. ie, the platform string
|
111
130
|
corresponding to a host specified as "centos4_64a" will be "centos-4-x86_64"
|
@@ -113,7 +132,8 @@ rather than "el-4-x86_64". It is recommended that you update your project's test
|
|
113
132
|
suites ASAP or be forced to do so when beaker-hostgenerator development moves on
|
114
133
|
to the 1.x series. We don't intend to backport features or platforms to 0.x.
|
115
134
|
eow
|
116
|
-
|
135
|
+
STDERR.puts(warning)
|
136
|
+
end
|
117
137
|
end
|
118
138
|
end
|
119
139
|
|
@@ -441,11 +441,12 @@ module BeakerHostGenerator
|
|
441
441
|
}
|
442
442
|
|
443
443
|
def get_osinfo(bhg_version=0)
|
444
|
+
osinfo = {}
|
444
445
|
case bhg_version
|
445
446
|
when 0
|
446
|
-
osinfo
|
447
|
+
osinfo.deep_merge! OSINFO
|
447
448
|
when 1
|
448
|
-
osinfo
|
449
|
+
osinfo.deep_merge! OSINFO
|
449
450
|
osinfo.deep_merge! OSINFO_BHGv1
|
450
451
|
else
|
451
452
|
raise "Invalid beaker-hostgenerator version: #{bhg_version}"
|
@@ -1,11 +1,21 @@
|
|
1
1
|
module BeakerHostGenerator
|
2
2
|
module Data
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
4
|
+
def pe_version
|
5
|
+
ENV['pe_version']
|
6
|
+
end
|
7
|
+
|
8
|
+
def pe_family
|
9
|
+
ENV['pe_family']
|
10
|
+
end
|
11
|
+
|
12
|
+
def pe_upgrade_version
|
13
|
+
ENV['pe_upgrade_version']
|
14
|
+
end
|
15
|
+
|
16
|
+
def pe_upgrade_family
|
17
|
+
ENV['pe_upgrade_family']
|
18
|
+
end
|
9
19
|
|
10
20
|
PE_USE_WIN32=ENV['pe_use_win32']
|
11
21
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'beaker-hostgenerator/util'
|
2
2
|
require 'beaker-hostgenerator/data'
|
3
|
-
require 'beaker-hostgenerator/
|
3
|
+
require 'beaker-hostgenerator/exceptions'
|
4
4
|
require 'beaker-hostgenerator/roles'
|
5
5
|
|
6
6
|
require 'yaml'
|
@@ -8,15 +8,9 @@ require 'yaml'
|
|
8
8
|
module BeakerHostGenerator
|
9
9
|
class Generator
|
10
10
|
include BeakerHostGenerator::Data
|
11
|
-
include BeakerHostGenerator::
|
11
|
+
include BeakerHostGenerator::Exceptions
|
12
12
|
include BeakerHostGenerator::Utils
|
13
13
|
|
14
|
-
BASE_HOST_CONFIG = {
|
15
|
-
'pe_dir' => BeakerHostGenerator::Utils.pe_dir(PE_VERSION, PE_FAMILY),
|
16
|
-
'pe_ver' => PE_VERSION,
|
17
|
-
'pe_upgrade_dir' => BeakerHostGenerator::Utils.pe_dir(PE_UPGRADE_VERSION, PE_UPGRADE_FAMILY),
|
18
|
-
'pe_upgrade_ver' => PE_UPGRADE_VERSION,
|
19
|
-
}
|
20
14
|
attr_reader :options
|
21
15
|
|
22
16
|
def initialize options
|
@@ -56,8 +50,21 @@ module BeakerHostGenerator
|
|
56
50
|
node_info['ostype'] = ostype
|
57
51
|
node_info['nodeid'] = nodeid[ostype]
|
58
52
|
|
53
|
+
config = {
|
54
|
+
'pe_dir' => pe_dir(pe_version, pe_family),
|
55
|
+
'pe_ver' => pe_version,
|
56
|
+
'pe_upgrade_dir' => pe_dir(pe_upgrade_version, pe_upgrade_family),
|
57
|
+
'pe_upgrade_ver' => pe_upgrade_version,
|
58
|
+
}
|
59
|
+
|
60
|
+
[:pe_dir, :pe_ver, :pe_upgrade_dir, :pe_upgrade_ver].each do |option|
|
61
|
+
if @options[option]
|
62
|
+
config[option.to_s] = @options[option]
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
59
66
|
host_name, host_config = generate_node(
|
60
|
-
node_info,
|
67
|
+
node_info, config, bhg_version=@options[:osinfo_version])
|
61
68
|
|
62
69
|
if PE_USE_WIN32 && ostype =~ /windows/ && node_info['bits'] == "64"
|
63
70
|
host_config['ruby_arch'] = 'x86'
|
@@ -22,7 +22,7 @@ module BeakerHostGenerator
|
|
22
22
|
|
23
23
|
def fixup_node(cfg)
|
24
24
|
# PE 2.8 doesn't exist for EL 4. We use 2.0 instead.
|
25
|
-
if cfg['platform'] =~ /el-4/ and
|
25
|
+
if cfg['platform'] =~ /el-4/ and pe_version =~ /2\.8/
|
26
26
|
cfg['pe_ver'] = "2.0.3"
|
27
27
|
end
|
28
28
|
end
|
@@ -59,6 +59,6 @@ module BeakerHostGenerator
|
|
59
59
|
return BeakerHostGenerator::Data::ROLES
|
60
60
|
end
|
61
61
|
|
62
|
-
module_function :
|
62
|
+
module_function :get_roles, :get_platforms, :dump_hosts, :fixup_node, :pe_dir
|
63
63
|
end
|
64
64
|
end
|