beaker-hostgenerator 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (185) hide show
  1. checksums.yaml +8 -8
  2. data/CHANGELOG.md +4 -0
  3. data/HISTORY.md +233 -2
  4. data/README.md +50 -11
  5. data/beaker-hostgenerator.gemspec +2 -2
  6. data/lib/beaker-hostgenerator.rb +0 -1
  7. data/lib/beaker-hostgenerator/cli.rb +38 -26
  8. data/lib/beaker-hostgenerator/data.rb +960 -35
  9. data/lib/beaker-hostgenerator/generator.rb +57 -97
  10. data/lib/beaker-hostgenerator/hypervisor.rb +97 -0
  11. data/lib/beaker-hostgenerator/hypervisor/none.rb +17 -0
  12. data/lib/beaker-hostgenerator/hypervisor/vmpooler.rb +32 -0
  13. data/lib/beaker-hostgenerator/parser.rb +199 -0
  14. data/lib/beaker-hostgenerator/roles.rb +21 -14
  15. data/lib/beaker-hostgenerator/util.rb +10 -29
  16. data/lib/beaker-hostgenerator/version.rb +1 -1
  17. data/spec/beaker-hostgenerator/generator_spec.rb +73 -109
  18. data/spec/beaker-hostgenerator/parser_spec.rb +84 -0
  19. data/test/fixtures/default/cisconx-64a +1 -1
  20. data/test/fixtures/default/windows10ent-32d +22 -0
  21. data/test/fixtures/default/windows10ent-64f +22 -0
  22. data/test/fixtures/default/windows10pro-64m +22 -0
  23. data/test/fixtures/default/windows2003-6432d +22 -0
  24. data/test/fixtures/default/windows2003-64c +22 -0
  25. data/test/fixtures/default/windows2003r2-32f +22 -0
  26. data/test/fixtures/default/windows2003r2-6432aulcdfm +27 -0
  27. data/test/fixtures/default/windows2003r2-64m +22 -0
  28. data/test/fixtures/default/windows2008-6432u +22 -0
  29. data/test/fixtures/default/windows2008-64a +21 -0
  30. data/test/fixtures/default/windows2008r2-6432c +22 -0
  31. data/test/fixtures/default/windows2008r2-64l +22 -0
  32. data/test/fixtures/default/windows2012-6432f +22 -0
  33. data/test/fixtures/default/windows2012-64d +22 -0
  34. data/test/fixtures/default/windows2012r2-6432aulcdfm +27 -0
  35. data/test/fixtures/default/windows2012r2-64m +22 -0
  36. data/test/fixtures/default/windows7-64a +21 -0
  37. data/test/fixtures/default/windows8-64u +22 -0
  38. data/test/fixtures/default/windows81-64l +22 -0
  39. data/test/fixtures/default/windowsvista-64c +22 -0
  40. data/test/fixtures/multiplatform/arista4-32a-windows10pro-64-arista4-32aulcdfm +47 -0
  41. data/test/fixtures/multiplatform/centos4-32u-windows10ent-64-centos4-32m +43 -0
  42. data/test/fixtures/multiplatform/centos4-64l-windows10ent-32-centos4-64f +43 -0
  43. data/test/fixtures/multiplatform/centos5-32c-windowsvista-64-centos5-32d +43 -0
  44. data/test/fixtures/multiplatform/centos5-64d-windows81-64-centos5-64c +43 -0
  45. data/test/fixtures/multiplatform/centos6-32f-windows8-64-centos6-32l +43 -0
  46. data/test/fixtures/multiplatform/centos6-64m-windows7-64-centos6-64u +43 -0
  47. data/test/fixtures/multiplatform/centos7-64aulcdfm-windows2012r2-6432-centos7-64a +47 -0
  48. data/test/fixtures/multiplatform/cisconx-64a-windows2012r2-64-cisconx-64aulcdfm +53 -0
  49. data/test/fixtures/multiplatform/ciscoxr-64u-windows2012-6432-ciscoxr-64m +43 -0
  50. data/test/fixtures/multiplatform/cumulus25-64l-windows2012-64-cumulus25-64f +43 -0
  51. data/test/fixtures/multiplatform/debian6-32c-windows2008r2-6432-debian6-32d +43 -0
  52. data/test/fixtures/multiplatform/debian6-64d-windows2008r2-64-debian6-64c +43 -0
  53. data/test/fixtures/multiplatform/debian7-32f-windows2008-6432-debian7-32l +43 -0
  54. data/test/fixtures/multiplatform/debian7-64m-windows2008-64-debian7-64u +43 -0
  55. data/test/fixtures/multiplatform/debian8-32aulcdfm-windows2003r2-6432-debian8-32a +47 -0
  56. data/test/fixtures/multiplatform/debian8-64a-windows2003r2-64-debian8-64aulcdfm +47 -0
  57. data/test/fixtures/multiplatform/debian9-32u-windows2003r2-32-debian9-32m +43 -0
  58. data/test/fixtures/multiplatform/debian9-64l-windows2003-6432-debian9-64f +43 -0
  59. data/test/fixtures/multiplatform/fedora14-32l-solaris11-64-fedora14-32f +42 -0
  60. data/test/fixtures/multiplatform/fedora19-32c-solaris11-32-fedora19-32d +42 -0
  61. data/test/fixtures/multiplatform/fedora19-64d-solaris10-64-fedora19-64c +42 -0
  62. data/test/fixtures/multiplatform/fedora20-32f-solaris10-32-fedora20-32l +42 -0
  63. data/test/fixtures/multiplatform/fedora20-64m-sles12-64-fedora20-64u +42 -0
  64. data/test/fixtures/multiplatform/fedora21-32aulcdfm-sles11-64-fedora21-32a +46 -0
  65. data/test/fixtures/multiplatform/fedora21-64a-sles11-32-fedora21-64aulcdfm +46 -0
  66. data/test/fixtures/multiplatform/fedora22-32u-sles10-64-fedora22-32m +42 -0
  67. data/test/fixtures/multiplatform/fedora22-64l-sles10-32-fedora22-64f +42 -0
  68. data/test/fixtures/multiplatform/fedora23-32c-scientific7-64-fedora23-32d +42 -0
  69. data/test/fixtures/multiplatform/fedora23-64d-scientific6-64-fedora23-64c +42 -0
  70. data/test/fixtures/multiplatform/opensuse11-32f-scientific6-32-opensuse11-32l +42 -0
  71. data/test/fixtures/multiplatform/opensuse11-64m-scientific5-64-opensuse11-64u +42 -0
  72. data/test/fixtures/multiplatform/oracle5-32c-windows2003-64-oracle5-32d +43 -0
  73. data/test/fixtures/multiplatform/oracle5-64d-ubuntu1604-64-oracle5-64c +42 -0
  74. data/test/fixtures/multiplatform/oracle6-32f-ubuntu1604-32-oracle6-32l +42 -0
  75. data/test/fixtures/multiplatform/oracle6-64m-ubuntu1510-64-oracle6-64u +42 -0
  76. data/test/fixtures/multiplatform/oracle7-64aulcdfm-ubuntu1510-32-oracle7-64a +46 -0
  77. data/test/fixtures/multiplatform/osx1010-64u-ubuntu1504-32-osx1010-64m +42 -0
  78. data/test/fixtures/multiplatform/osx1011-64l-ubuntu1404-64-osx1011-64f +42 -0
  79. data/test/fixtures/multiplatform/osx109-64a-ubuntu1504-64-osx109-64aulcdfm +46 -0
  80. data/test/fixtures/multiplatform/redhat4-32c-ubuntu1404-32-redhat4-32d +42 -0
  81. data/test/fixtures/multiplatform/redhat4-64d-ubuntu1204-64-redhat4-64c +42 -0
  82. data/test/fixtures/multiplatform/redhat5-32f-ubuntu1204-32-redhat5-32l +42 -0
  83. data/test/fixtures/multiplatform/redhat5-64m-ubuntu1004-64-redhat5-64u +42 -0
  84. data/test/fixtures/multiplatform/redhat6-32aulcdfm-ubuntu1004-32-redhat6-32a +46 -0
  85. data/test/fixtures/multiplatform/redhat6-64a-solaris112-64-redhat6-64aulcdfm +46 -0
  86. data/test/fixtures/multiplatform/redhat7-64u-solaris112-32-redhat7-64m +42 -0
  87. data/test/fixtures/multiplatform/scientific5-32aulcdfm-scientific5-32-scientific5-32a +46 -0
  88. data/test/fixtures/multiplatform/scientific5-64a-opensuse11-64-scientific5-64aulcdfm +46 -0
  89. data/test/fixtures/multiplatform/scientific6-32u-opensuse11-32-scientific6-32m +42 -0
  90. data/test/fixtures/multiplatform/scientific6-64l-fedora23-64-scientific6-64f +42 -0
  91. data/test/fixtures/multiplatform/scientific7-64c-fedora23-32-scientific7-64d +42 -0
  92. data/test/fixtures/multiplatform/sles10-32d-fedora22-64-sles10-32c +42 -0
  93. data/test/fixtures/multiplatform/sles10-64f-fedora22-32-sles10-64l +42 -0
  94. data/test/fixtures/multiplatform/sles11-32m-fedora21-64-sles11-32u +42 -0
  95. data/test/fixtures/multiplatform/sles11-64aulcdfm-fedora21-32-sles11-64a +46 -0
  96. data/test/fixtures/multiplatform/sles12-64a-fedora20-64-sles12-64aulcdfm +46 -0
  97. data/test/fixtures/multiplatform/solaris10-32u-fedora20-32-solaris10-32m +42 -0
  98. data/test/fixtures/multiplatform/solaris10-64l-fedora19-64-solaris10-64f +42 -0
  99. data/test/fixtures/multiplatform/solaris11-32c-fedora19-32-solaris11-32d +42 -0
  100. data/test/fixtures/multiplatform/solaris11-64d-fedora14-32-solaris11-64c +42 -0
  101. data/test/fixtures/multiplatform/solaris112-32f-redhat7-64-solaris112-32l +42 -0
  102. data/test/fixtures/multiplatform/solaris112-64m-redhat6-64-solaris112-64u +42 -0
  103. data/test/fixtures/multiplatform/ubuntu1004-32aulcdfm-redhat6-32-ubuntu1004-32a +46 -0
  104. data/test/fixtures/multiplatform/ubuntu1004-64a-redhat5-64-ubuntu1004-64aulcdfm +46 -0
  105. data/test/fixtures/multiplatform/ubuntu1204-32u-redhat5-32-ubuntu1204-32m +42 -0
  106. data/test/fixtures/multiplatform/ubuntu1204-64l-redhat4-64-ubuntu1204-64f +42 -0
  107. data/test/fixtures/multiplatform/ubuntu1404-32c-redhat4-32-ubuntu1404-32d +42 -0
  108. data/test/fixtures/multiplatform/ubuntu1404-64d-osx1011-64-ubuntu1404-64c +42 -0
  109. data/test/fixtures/multiplatform/ubuntu1504-32f-osx1010-64-ubuntu1504-32l +42 -0
  110. data/test/fixtures/multiplatform/ubuntu1504-64m-osx109-64-ubuntu1504-64u +42 -0
  111. data/test/fixtures/multiplatform/ubuntu1510-32aulcdfm-oracle7-64-ubuntu1510-32a +46 -0
  112. data/test/fixtures/multiplatform/ubuntu1510-64a-oracle6-64-ubuntu1510-64aulcdfm +46 -0
  113. data/test/fixtures/multiplatform/ubuntu1604-32u-oracle6-32-ubuntu1604-32m +42 -0
  114. data/test/fixtures/multiplatform/ubuntu1604-64l-oracle5-64-ubuntu1604-64f +42 -0
  115. data/test/fixtures/multiplatform/windows10ent-32d-centos4-64-windows10ent-32c +44 -0
  116. data/test/fixtures/multiplatform/windows10ent-64f-centos4-32-windows10ent-64l +44 -0
  117. data/test/fixtures/multiplatform/windows10pro-64m-arista4-32-windows10pro-64u +44 -0
  118. data/test/fixtures/multiplatform/windows2003-6432d-debian9-64-windows2003-6432c +44 -0
  119. data/test/fixtures/multiplatform/windows2003-64c-oracle5-32-windows2003-64d +44 -0
  120. data/test/fixtures/multiplatform/windows2003r2-32f-debian9-32-windows2003r2-32l +44 -0
  121. data/test/fixtures/multiplatform/windows2003r2-6432aulcdfm-debian8-32-windows2003r2-6432a +48 -0
  122. data/test/fixtures/multiplatform/windows2003r2-64m-debian8-64-windows2003r2-64u +44 -0
  123. data/test/fixtures/multiplatform/windows2008-6432u-debian7-32-windows2008-6432m +44 -0
  124. data/test/fixtures/multiplatform/windows2008-64a-debian7-64-windows2008-64aulcdfm +48 -0
  125. data/test/fixtures/multiplatform/windows2008r2-6432c-debian6-32-windows2008r2-6432d +44 -0
  126. data/test/fixtures/multiplatform/windows2008r2-64l-debian6-64-windows2008r2-64f +44 -0
  127. data/test/fixtures/multiplatform/windows2012-6432f-ciscoxr-64-windows2012-6432l +44 -0
  128. data/test/fixtures/multiplatform/windows2012-64d-cumulus25-64-windows2012-64c +44 -0
  129. data/test/fixtures/multiplatform/windows2012r2-6432aulcdfm-centos7-64-windows2012r2-6432a +48 -0
  130. data/test/fixtures/multiplatform/windows2012r2-64m-cisconx-64-windows2012r2-64u +47 -0
  131. data/test/fixtures/multiplatform/windows7-64a-centos6-64-windows7-64aulcdfm +48 -0
  132. data/test/fixtures/multiplatform/windows8-64u-centos6-32-windows8-64m +44 -0
  133. data/test/fixtures/multiplatform/windows81-64l-centos5-64-windows81-64f +44 -0
  134. data/test/fixtures/multiplatform/windowsvista-64c-centos5-32-windowsvista-64d +44 -0
  135. data/test/fixtures/osinfo-version-0/cisconx-64a +1 -1
  136. data/test/fixtures/osinfo-version-0/windows10ent-32d +22 -0
  137. data/test/fixtures/osinfo-version-0/windows10ent-64f +22 -0
  138. data/test/fixtures/osinfo-version-0/windows10pro-64m +22 -0
  139. data/test/fixtures/osinfo-version-0/windows2003-6432d +22 -0
  140. data/test/fixtures/osinfo-version-0/windows2003-64c +22 -0
  141. data/test/fixtures/osinfo-version-0/windows2003r2-32f +22 -0
  142. data/test/fixtures/osinfo-version-0/windows2003r2-6432aulcdfm +27 -0
  143. data/test/fixtures/osinfo-version-0/windows2003r2-64m +22 -0
  144. data/test/fixtures/osinfo-version-0/windows2008-6432u +22 -0
  145. data/test/fixtures/osinfo-version-0/windows2008-64a +21 -0
  146. data/test/fixtures/osinfo-version-0/windows2008r2-6432c +22 -0
  147. data/test/fixtures/osinfo-version-0/windows2008r2-64l +22 -0
  148. data/test/fixtures/osinfo-version-0/windows2012-6432f +22 -0
  149. data/test/fixtures/osinfo-version-0/windows2012-64d +22 -0
  150. data/test/fixtures/osinfo-version-0/windows2012r2-6432aulcdfm +27 -0
  151. data/test/fixtures/osinfo-version-0/windows2012r2-64m +22 -0
  152. data/test/fixtures/osinfo-version-0/windows7-64a +21 -0
  153. data/test/fixtures/osinfo-version-0/windows8-64u +22 -0
  154. data/test/fixtures/osinfo-version-0/windows81-64l +22 -0
  155. data/test/fixtures/osinfo-version-0/windowsvista-64c +22 -0
  156. data/test/fixtures/osinfo-version-1/cisconx-64a +1 -1
  157. data/test/fixtures/osinfo-version-1/windows10ent-32d +22 -0
  158. data/test/fixtures/osinfo-version-1/windows10ent-64f +22 -0
  159. data/test/fixtures/osinfo-version-1/windows10pro-64m +22 -0
  160. data/test/fixtures/osinfo-version-1/windows2003-6432d +22 -0
  161. data/test/fixtures/osinfo-version-1/windows2003-64c +22 -0
  162. data/test/fixtures/osinfo-version-1/windows2003r2-32f +22 -0
  163. data/test/fixtures/osinfo-version-1/windows2003r2-6432aulcdfm +27 -0
  164. data/test/fixtures/osinfo-version-1/windows2003r2-64m +22 -0
  165. data/test/fixtures/osinfo-version-1/windows2008-6432u +22 -0
  166. data/test/fixtures/osinfo-version-1/windows2008-64a +21 -0
  167. data/test/fixtures/osinfo-version-1/windows2008r2-6432c +22 -0
  168. data/test/fixtures/osinfo-version-1/windows2008r2-64l +22 -0
  169. data/test/fixtures/osinfo-version-1/windows2012-6432f +22 -0
  170. data/test/fixtures/osinfo-version-1/windows2012-64d +22 -0
  171. data/test/fixtures/osinfo-version-1/windows2012r2-6432aulcdfm +27 -0
  172. data/test/fixtures/osinfo-version-1/windows2012r2-64m +22 -0
  173. data/test/fixtures/osinfo-version-1/windows7-64a +21 -0
  174. data/test/fixtures/osinfo-version-1/windows8-64u +22 -0
  175. data/test/fixtures/osinfo-version-1/windows81-64l +22 -0
  176. data/test/fixtures/osinfo-version-1/windowsvista-64c +22 -0
  177. data/test/fixtures/per-host-settings/arbitrary-settings.yaml +57 -0
  178. data/test/fixtures/per-host-settings/every-hypervisor.yaml +30 -0
  179. data/test/fixtures/per-host-settings/malformed-input.yaml +5 -0
  180. data/test/test_stdout.rb +2 -2
  181. data/test/util/generator_helpers.rb +12 -4
  182. metadata +167 -6
  183. data/lib/beaker-hostgenerator/data/vmpooler.rb +0 -467
  184. data/lib/beaker-hostgenerator/generator/vmpooler.rb +0 -59
  185. data/test/test_util.rb +0 -26
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZTE2MGFlYTY5NGNkZjk1MDQ1NTI1NmQ2NGRjM2U0ZmM0NWNjMDVhMA==
4
+ MmQ0NmI3NGFiYjQ2YjQxYzI3YTBhZTZhNzY5YzdhZjM5NjU0MmZjZQ==
5
5
  data.tar.gz: !binary |-
6
- YjkxOTdhNTg0NTg4NTllNDhlYjJlODE4ODk3ODBiNmFjYTI5NTgyOQ==
6
+ ZWExY2JjZTI3MTBlYzc5Nzk2NjdhYjZhZTg2YjE4ZTMwYmEzZGRjYw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OGFmY2YyYzI2ZWZiNWQyOTRhNTUyNTU4ZjQxMmNmZTBlOTBiMjQ3M2YwMjQw
10
- ZTM5N2ZiODY2NTg0MDgyNDVkNzIzNDZiN2QwNDE2ZWRkODBjMjVmOTZmYTBh
11
- ZDMxNWM3NjUwZmE5MTg5ODJiZGJiZmQzYjg4MzM1MDM5ZmVmMmU=
9
+ ZjY5N2NiNDc2OGM3NGVmNDhmM2Q4N2YzY2JlOWM4MWZlMDQxZjVmODU5MmRj
10
+ Y2EwNmFlMjM3NmFkMzk4NTI5MjRkMGFiYjAyZTVlYTk0OWU3N2ExNmVlNjYx
11
+ MTNjZjcyOWI4ZmY2ZDc4NzFhYjliOGFhOTc5YTU2MTgxZmM3YzQ=
12
12
  data.tar.gz: !binary |-
13
- ZWFiOTBmM2UwYTllZTAwOWFlMGZiOTQzOTg2Y2ZkMjQxNzZhMDA3ODc0NTM1
14
- Zjc2ZGVlZDg0MGYzNDI4NTJjYWU1MjYwNTY1OTE1ZDQwOGIxNzc1NTNhY2Vh
15
- ZDQ4MjcxNGQ2NGYxMDI5Y2M5MjkwNjJmZTI2MDE4YWY5NjQwMTA=
13
+ ODNkYmRmY2RkNWIyNmRjZmE4ZDAwNjVhMTZhZmI0YzBkNDRmZTk4ZDE4NTE3
14
+ NWYxMmI4ODZlYzMxMWQ4ZWFhMjIzYmY0MmJkMmUxMDA4YTJiYTU0M2QxODc4
15
+ Mjc2YThkODhjMGRkYzEzZjQ1YTJiYTQwNmZiYjEwNDk5YTFkYmE=
@@ -7,6 +7,10 @@ Versioning](http://semver.org).
7
7
  ## [Unreleased][unreleased]
8
8
  ### Changed
9
9
 
10
+ ## [0.6.0] - 2016-05-11
11
+ - Add new 'none' hypervisor implementation to support static, non-provisioned hosts.
12
+ - Add support for arbitrary, per-host key=value settings.
13
+
10
14
  ## [0.5.0] - 2016-03-30
11
15
  - Add platforms:
12
16
  - Ubuntu 16.06 x86 and x86_64
data/HISTORY.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # default - History
2
2
  ## Tags
3
- * [LATEST - 31 Mar, 2016 (36291ea6)](#LATEST)
3
+ * [LATEST - 11 May, 2016 (4a8ee90e)](#LATEST)
4
+ * [0.5.0 - 31 Mar, 2016 (fa3ae0c8)](#0.5.0)
4
5
  * [0.4.0 - 10 Feb, 2016 (dc333b1c)](#0.4.0)
5
6
  * [0.3.3 - 3 Feb, 2016 (41051da9)](#0.3.3)
6
7
  * [0.3.2 - 28 Jan, 2016 (299df8ec)](#0.3.2)
@@ -11,7 +12,237 @@
11
12
  * [0.0.1 - 7 Oct, 2015 (d99251e6)](#0.0.1)
12
13
 
13
14
  ## Details
14
- ### <a name = "LATEST">LATEST - 31 Mar, 2016 (36291ea6)
15
+ ### <a name = "LATEST">LATEST - 11 May, 2016 (4a8ee90e)
16
+
17
+ * (GEM) update beaker-hostgenerator version to 0.6.0 (4a8ee90e)
18
+
19
+ * Merge pull request #29 from nwolfe/maint/master/prepare-for-release (7e0decc0)
20
+
21
+
22
+ ```
23
+ Merge pull request #29 from nwolfe/maint/master/prepare-for-release
24
+
25
+ (maint) Prepare for 0.6.0 release
26
+ ```
27
+ * (maint) Prepare for 0.6.0 release (c15c1bf6)
28
+
29
+ * Merge pull request #28 from nwolfe/qeng3276/none-hypervisor-and-host-settings (d105e4bd)
30
+
31
+
32
+ ```
33
+ Merge pull request #28 from nwolfe/qeng3276/none-hypervisor-and-host-settings
34
+
35
+ (QENG-3276) Add None hypervisor and per-host settings support
36
+ ```
37
+ * (QENG-3276) Minor refactorings; failing test fixture (b0926b22)
38
+
39
+
40
+ ```
41
+ (QENG-3276) Minor refactorings; failing test fixture
42
+
43
+ This commit includes the following minor refactorings based on feedback:
44
+ * Inline if block surrounding arbitrary_settings['hostname']
45
+ * Strip the `__` name prefix from `__generate_host_roles!` and make
46
+ private; adjust spec test accordingly
47
+ * Change test fixture `expected_exception` support to not use the
48
+ dangerous `eval`, and added `per-host-settings/malformed-input.yaml`
49
+ test fixture to exercise the support
50
+ ```
51
+ * (QENG-3276) Update CHANGELOG (0a170d42)
52
+
53
+
54
+ ```
55
+ (QENG-3276) Update CHANGELOG
56
+
57
+ This commit adds notes for the next release regarding the 'none'
58
+ hypervisor and arbitrary key-value host settings support.
59
+ ```
60
+ * (QENG-3276) Add more parser tests for failures (b80d94ab)
61
+
62
+
63
+ ```
64
+ (QENG-3276) Add more parser tests for failures
65
+
66
+ This commit adds tests that validate the proper exceptions are thrown
67
+ when invalid arbitrary host settings are provided.
68
+
69
+ This also expands host-setting support to include arbitrary whitespace
70
+ to allow for more human-readable input.
71
+ ```
72
+ * (MAINT) Wire up expected_excpetion test fitxure support (78cccb14)
73
+
74
+
75
+ ```
76
+ (MAINT) Wire up expected_excpetion test fitxure support
77
+
78
+ This commits finishes the work necessary to support expected exceptions
79
+ defined in the test fixture YAML files.
80
+ ```
81
+ * (QENG-3276) Move host role code into Roles module (78a2679e)
82
+
83
+
84
+ ```
85
+ (QENG-3276) Move host role code into Roles module
86
+
87
+ This commit moves the ROLES map and custom role config map out of the
88
+ Data and Generator classes and into the Roles class.
89
+ This also changes the implementation of custom role configuration from
90
+ being a meta-programming method call into a standard map index.
91
+ ```
92
+ * (QENG-3276) Extract code into new Parser module (9764fd7e)
93
+
94
+
95
+ ```
96
+ (QENG-3276) Extract code into new Parser module
97
+
98
+ This commit moves the NODE_REGEX constant and handful of methods tightly
99
+ coupled to it into a new module called Parser. This module is
100
+ responsible for dealing with the raw user input string and turning it
101
+ into data structures that the Generator and hypervisors can operate on.
102
+ ```
103
+ * (QENG-3276) Minor method refactoring (ce763dc0)
104
+
105
+
106
+ ```
107
+ (QENG-3276) Minor method refactoring
108
+
109
+ This commit renames a method, marks some methods as private, and
110
+ extracts some logic into its own method.
111
+ ```
112
+ * (QENG-3276) Update README (fd99cc9f)
113
+
114
+
115
+ ```
116
+ (QENG-3276) Update README
117
+
118
+ This commit updates the README to include an example of the new 'none'
119
+ hypervisor and per-host settings.
120
+
121
+ Also rename "Puppet Labs" references to just "Puppet".
122
+ ```
123
+ * (QENG-3276) Update CLI help/usage text (7d85dff4)
124
+
125
+
126
+ ```
127
+ (QENG-3276) Update CLI help/usage text
128
+
129
+ This commit updates the CLI help text to mention the new arbitrary host
130
+ settings support, and include the list of valid hypervisors when the
131
+ `--list` option is given.
132
+ ```
133
+ * (QENG-3276) Test fixtures for hypervisor and settings (34d4e649)
134
+
135
+
136
+ ```
137
+ (QENG-3276) Test fixtures for hypervisor and settings
138
+
139
+ This commit adds a couple hand-made test fixtures that exercise the new
140
+ "none" hypervisor and arbitrary host settings support.
141
+ ```
142
+ * Merge pull request #27 from nwolfe/maint/master/decouple-generator-and-hypervisors (52293374)
143
+
144
+
145
+ ```
146
+ Merge pull request #27 from nwolfe/maint/master/decouple-generator-and-hypervisors
147
+
148
+ (maint) Decouple hypervisors from generator
149
+ ```
150
+ * (QENG-3276) Add None hypervisor and per-host settings support (ab38abef)
151
+
152
+
153
+ ```
154
+ (QENG-3276) Add None hypervisor and per-host settings support
155
+
156
+ This commit adds a new "none" hypervisor to support non-provisioned
157
+ hosts. Non-provisioned hosts require a handful of other host settings to
158
+ be specified in order for Beaker to use it properly, so this commit also
159
+ adds support for arbitrary key-value host settings.
160
+
161
+ For example:
162
+
163
+ $ .. centos6-64m{hypervisor=none,hostname=my-host,vmhostname=othername}
164
+ ---
165
+ HOSTS:
166
+ my-host:
167
+ pe_dir:
168
+ pe_ver:
169
+ pe_upgrade_dir:
170
+ pe_upgrade_ver:
171
+ platform: el-6-x86_64
172
+ hypervisor: none
173
+ vmhostname: othername
174
+ roles:
175
+ - agent
176
+ - master
177
+ CONFIG:
178
+ nfs_server: none
179
+ consoleport: 443
180
+ ```
181
+ * (maint) Docstrings for new hypervisor architecture (9c35595f)
182
+
183
+
184
+ ```
185
+ (maint) Docstrings for new hypervisor architecture
186
+
187
+ This commit adds docstrings to modules and methods, specifically the
188
+ BeakerHostGenerator::Hypervisor and BeakerHostGenerator::Data modules.
189
+ ```
190
+ * (maint) Generate multi-platform test fixtures (996578cb)
191
+
192
+
193
+ ```
194
+ (maint) Generate multi-platform test fixtures
195
+
196
+ To help with test coverage, this adds a directory full of generated
197
+ test fixtures with multi-platform hosts in a form similar to
198
+ "centos6-64m-debian8-32-sles12-64a". Two of the three hosts have a
199
+ random role assigned.
200
+ ```
201
+ * (maint) New generated windows test fixtures (2591347e)
202
+
203
+
204
+ ```
205
+ (maint) New generated windows test fixtures
206
+
207
+ The rake task 'generate:fixtures' produced several new Windows fixtures.
208
+ Perhaps we had previously updated the code to add support for more
209
+ Windows platforms, but we forgot to re-generate the test fixtures?
210
+ ```
211
+ * (maint) Decouple hypervisors from generator (aa39202e)
212
+
213
+
214
+ ```
215
+ (maint) Decouple hypervisors from generator
216
+
217
+ This commit is a large refactor that teases apart the generate code from
218
+ the hypervisor code.
219
+
220
+ Previously the VMPooler hypervisor class was a subclass of the Generator
221
+ class, which was fine when there was only one hypervisor, but made it
222
+ difficult to add support for per-host/multiple hypervisors.
223
+
224
+ Now, there's a 1-to-many relationship between the Generator
225
+ (BeakerHostGenerator::Generator) and the
226
+ Hypervisors (BeakerHostGenerator::Hypervisor).
227
+
228
+ The giant map of OSINFO data that was previously in the
229
+ 'data/vmpooler.rb' has been promoted and moved into data.rb as the
230
+ `osinfo` module function. The parts specific to the VMPooler hypervisor
231
+ have been nested under submaps keyed by the name of the hypervisor,
232
+ `:vmpooler`.
233
+
234
+ Adding support for a new hypervisor now requires implementing
235
+ BeakerHostGenerator::Hypervisor::Interface, and adding any appropriate
236
+ platform data as a submap to the OSINFO map in data.rb, keyed under a
237
+ symbol named after the new hypervisor (e.g. `:my_hypervisor`).
238
+
239
+ The module function `BeakerHostGenerator::Data.get_platform_info` can
240
+ then be used when implementing the hypervisor to extract the relevant
241
+ platform data under the key `:my_hypervisor`.
242
+ ```
243
+ ### <a name = "0.5.0">0.5.0 - 31 Mar, 2016 (fa3ae0c8)
244
+
245
+ * (HISTORY) update beaker-hostgenerator history for gem release 0.5.0 (fa3ae0c8)
15
246
 
16
247
  * (GEM) update beaker-hostgenerator version to 0.5.0 (36291ea6)
17
248
 
data/README.md CHANGED
@@ -3,18 +3,19 @@
3
3
  `beaker-hostgenerator` is a command line utility designed to generate beaker
4
4
  host config files using a compact command line SUT specification.
5
5
 
6
- It currently only supports puppetlabs' internal [vmpooler][vmpooler] templates,
7
- but is designed in a way that makes it possible to easily add support for
8
- additional hypervisor templates (any hypervisor type supported by
9
- [beaker][beaker]).
6
+ It currently supports Puppets' internal [vmpooler][vmpooler] hypervisor and
7
+ static (non-provisioned) nodes, and is designed in a way that makes it possible
8
+ to easily add support for additional hypervisors (any hypervisor type supported
9
+ by [beaker][beaker]).
10
10
 
11
11
  <!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-generate-toc again -->
12
12
  **Table of Contents**
13
13
 
14
14
  - [Beaker Host Generator](#beaker-host-generator)
15
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)
16
+ - [Simple two-host layout](#simple-two-host-layout)
17
+ - [Single host with Arbitrary Roles](#single-host-with-arbitrary-roles)
18
+ - [Two hosts with multiple hypervisors and arbitrary host settings](#two-hosts-with-multiple-hypervisors-and-arbitrary-host-settings)
18
19
  - [Testing](#testing)
19
20
  - [Test Fixtures](#test-fixtures)
20
21
  - [Generated Fixtures](#generated-fixtures)
@@ -22,12 +23,12 @@ additional hypervisor templates (any hypervisor type supported by
22
23
  - [License](#license)
23
24
 
24
25
  <!-- markdown-toc end -->
25
-
26
+
26
27
  ## Usage
27
28
 
28
29
  Below are some example usages of `beaker-hostgenerator`.
29
30
 
30
- ### Simple two-host SUT layout
31
+ ### Simple two-host layout
31
32
 
32
33
  ```
33
34
  $ beaker-hostgenerator centos6-64mdca-32a
@@ -67,7 +68,7 @@ CONFIG:
67
68
  pooling_api: http://vmpooler.delivery.puppetlabs.net/
68
69
  ```
69
70
 
70
- ### Single-host SUT layout with Arbitrary Roles
71
+ ### Single host with Arbitrary Roles
71
72
 
72
73
  ```
73
74
  $ beaker-hostgenerator centos6-32compile_master,another_role.ma
@@ -101,12 +102,50 @@ CONFIG:
101
102
  pooling_api: http://vmpooler.delivery.puppetlabs.net/
102
103
  ```
103
104
 
105
+ ### Two hosts with multiple hypervisors and arbitrary host settings
106
+
107
+ ```
108
+ $ beaker-hostgenerator centos6-64m{hypervisor=none\,hostname=static-master}-redhat7-64a{somekey=some-value}
109
+ ```
110
+
111
+ Will generate
112
+
113
+ ```yaml
114
+ ---
115
+ HOSTS:
116
+ static-master:
117
+ pe_dir:
118
+ pe_ver:
119
+ pe_upgrade_dir:
120
+ pe_upgrade_ver:
121
+ platform: el-6-x86_64
122
+ hypervisor: none
123
+ roles:
124
+ - agent
125
+ - master
126
+ redhat7-64-1:
127
+ pe_dir:
128
+ pe_ver:
129
+ pe_upgrade_dir:
130
+ pe_upgrade_ver:
131
+ hypervisor: vmpooler
132
+ platform: el-7-x86_64
133
+ template: redhat-7-x86_64
134
+ somekey: some-value
135
+ roles:
136
+ - agent
137
+ CONFIG:
138
+ nfs_server: none
139
+ consoleport: 443
140
+ pooling_api: http://vmpooler.delivery.puppetlabs.net/
141
+ ```
142
+
104
143
  ## Testing
105
144
 
106
145
  Beaker Host Generator currently uses both rspec and minitest tests. To run both
107
146
  at the same time, run:
108
147
  ```bash
109
- bundle exec rake tests
148
+ bundle exec rake test
110
149
  ```
111
150
 
112
151
  ### Test Fixtures
@@ -179,7 +218,7 @@ There are a few circumstances when you should expect to run the
179
218
 
180
219
  ## Support
181
220
 
182
- Support offered by [Puppet Labs](https://puppetlabs.com) may not always be timely
221
+ Support offered by [Puppet](https://puppet.com) may not always be timely
183
222
  since it is maintained by a tooling support team that is primarily focused on
184
223
  improving tools, infrastructure, and automation for our Enterprise products.
185
224
 
@@ -5,8 +5,8 @@ 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.authors = ["Branan Purvine-Riley", "Wayne Warren"]
9
- s.email = ["qe-team@puppetlabs.com"]
8
+ s.authors = ["Branan Purvine-Riley", "Wayne Warren", "Nate Wolfe"]
9
+ s.email = ["qe-team@puppet.com"]
10
10
  s.homepage = "https://github.com/puppetlabs/beaker-hostgenerator"
11
11
  s.summary = "Beaker Host Generator Utility"
12
12
  s.description = <<-eos
@@ -3,6 +3,5 @@
3
3
  module BeakerHostGenerator
4
4
  require 'beaker-hostgenerator/cli'
5
5
  require 'beaker-hostgenerator/data'
6
- require 'beaker-hostgenerator/util'
7
6
  require 'beaker-hostgenerator/generator'
8
7
  end
@@ -1,4 +1,6 @@
1
1
  require 'beaker-hostgenerator/generator'
2
+ require 'beaker-hostgenerator/hypervisor'
3
+ require 'beaker-hostgenerator/roles'
2
4
  require 'optparse'
3
5
 
4
6
  module BeakerHostGenerator
@@ -23,7 +25,7 @@ module BeakerHostGenerator
23
25
  Usage: beaker-hostgenerator [options] <layout>
24
26
 
25
27
  where <layout> takes the following form:
26
- <platform>-<arch><roles>[[-<platform>]-<arch>[[<arbitrary-roles>,[...]].]<roles>[...]]
28
+ <platform>-<arch>[[<arbitrary-roles>,[...]].]<roles>[{<arbitrary-settings>,[...]}][-<arch>[[<arbitrary-roles>,[...]].]<roles>[{<arbitrary-settings>,[...]}]][-<layout>]
27
29
 
28
30
  examples:
29
31
  centos6-64mdca-32a
@@ -44,6 +46,11 @@ Usage: beaker-hostgenerator [options] <layout>
44
46
  centos6-32compile_master,another_role.ma
45
47
  1 CentOS 6 32 bit node with roles = master, agent, compile_master, another_role
46
48
 
49
+ example with arbitrary host settings:
50
+ centos6-64m{hypervisor=none\\,hostname=static1\\,my-key=my-value}-32a
51
+ 1 CentOS 6 64 bit node with roles = master, hypervisor = none, node name = static1, and my-key = my-value
52
+ 1 CentOS 6 32 bit node with roles = agent and the default hypervisor
53
+
47
54
  Generally, it is expected that beaker-hostgenerator output will be redirected to a file, for example:
48
55
  beaker-hostgenerator centos6-64ma > host.cfg
49
56
 
@@ -53,14 +60,14 @@ Usage: beaker-hostgenerator [options] <layout>
53
60
 
54
61
  opts.on('-l',
55
62
  '--list',
56
- 'List beaker-hostgenerator supported platforms and roles. ' <<
63
+ 'List beaker-hostgenerator supported platforms, roles, and hypervisors. ' <<
57
64
  'Does not produce host config.') do
58
- @options[:list_platforms_and_roles] = true
65
+ @options[:list_supported_values] = true
59
66
  end
60
67
 
61
68
  opts.on('-t',
62
69
  '--hypervisor HYPERVISOR',
63
- 'Set beaker-hostgenerator hypervisor. ') do |h|
70
+ 'Set beaker-hostgenerator default hypervisor. ') do |h|
64
71
  @options[:hypervisor] = h
65
72
  end
66
73
 
@@ -90,7 +97,7 @@ Usage: beaker-hostgenerator [options] <layout>
90
97
  end
91
98
 
92
99
  opts.on('--disable-default-role',
93
- "Do not include the default /'agent/' role.") do
100
+ "Do not include the default 'agent' role.") do
94
101
  @options[:disable_default_role] = true
95
102
  end
96
103
 
@@ -116,12 +123,11 @@ Usage: beaker-hostgenerator [options] <layout>
116
123
 
117
124
  optparse.parse!(argv)
118
125
 
119
- if @options[:list_platforms_and_roles]
120
- print_platforms_and_roles
126
+ if @options[:list_supported_values]
127
+ print_supported_values
121
128
  raise BeakerHostGenerator::Exceptions::SafeEarlyExit
122
129
  else
123
- # Tokenizing the config definition for great justice
124
- @tokens = argv[0].split('-')
130
+ @layout = argv[0]
125
131
 
126
132
  if @options[:osinfo_version] === 0
127
133
  warning = <<-eow
@@ -137,14 +143,24 @@ eow
137
143
  end
138
144
  end
139
145
 
140
- def print_platforms_and_roles
141
- puts "valid beaker-hostgenerator platforms: "
142
- osinfo = BeakerHostGenerator::Utils.get_platforms(@options[:hypervisor],
143
- @options[:osinfo_version])
144
- osinfo.each do |k,v|
146
+ def execute
147
+ BeakerHostGenerator::Generator.new.generate(@layout, @options)
148
+ end
149
+
150
+ def execute!
151
+ puts execute
152
+ end
153
+
154
+ private
155
+
156
+ # Prints to stdout a human-readable listing of all supported values for
157
+ # the following: platforms, architectures, roles, and hypervisors.
158
+ def print_supported_values
159
+ puts "valid beaker-hostgenerator platforms:"
160
+ platforms = get_platforms(@options[:osinfo_version])
161
+ platforms.each do |k|
145
162
  puts " #{k}"
146
163
  end
147
-
148
164
  puts "\n"
149
165
 
150
166
  puts "valid beaker-hostgenerator architectures:"
@@ -153,20 +169,16 @@ eow
153
169
  puts " 6432 => 64-bit OS with 32-bit Puppet (Windows Only)"
154
170
  puts "\n"
155
171
 
156
- roles = BeakerHostGenerator::Utils.get_roles
157
- puts "valid beaker-hostgenerator host roles: "
158
- roles.each do |k,v|
172
+ puts "valid beaker-hostgenerator host roles:"
173
+ BeakerHostGenerator::Roles::ROLES.each do |k,v|
159
174
  puts " #{k} => #{v}"
160
175
  end
161
- end
162
-
163
- def execute
164
- generator = BeakerHostGenerator::Generator.create @options
165
- generator.generate @tokens
166
- end
176
+ puts "\n"
167
177
 
168
- def execute!
169
- puts execute
178
+ puts "valid beaker-hostgenerator hypervisors:"
179
+ BeakerHostGenerator::Hypervisor.supported_hypervisors().keys.each do |k|
180
+ puts " #{k}"
181
+ end
170
182
  end
171
183
  end
172
184
  end