beaker-hostgenerator 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NmEyNzhhZWZjYzg5ZDYyN2QxNDkyZDFlMjNiYWU5Y2ZhYTQyNWQ5MA==
4
+ YTYwOGVlNTRhNmRiOWIwMjFhNTYzOTg0ZThkOGVlM2Y2ZWM5MjIxYQ==
5
5
  data.tar.gz: !binary |-
6
- MGRjOWVkMjk4YTRiMThmZDFhMDFhZWEyNjE4M2VmZmUyYjMwOTJjNw==
6
+ YjMyMmM4OTc5MWNjZDZlZmVlYzNhZmQ2MWI5OThiOTc3ZWZiMjg1MQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NjA4NWQ5NWU1NTk2YjMzYjJjZjE5ZTJkM2E3NGEyMmQxOGU3YmE2MzdiOGIy
10
- OWViM2RjM2I3NmNiYTNjYjMyNDY5NmEwNWNlNWRjMWUyMDNjYzc5NDdlOGVl
11
- N2Y2ZmFiOGU4ZjQyNDgzOGVmMzNkOTEwOThhOWVhZTA0OWIxMDU=
9
+ NDU3Y2U5MzVjODBlYzlmYjE4ZTcyYzE4YTQ5MDc4MGIyOTI1ZmFjZmI4Y2E0
10
+ MTNlMmQ2MWQwMjJkZWMwMjk2MmNmMGFlMDNlZjEzNDQ5YmYzNTk2YjViY2E5
11
+ MDIxNWRjOTM4NTRiZWY1YzFmYjBkNGViNTBjNzUwZjVmZWM5YTQ=
12
12
  data.tar.gz: !binary |-
13
- ODg5YThkMjRhZjIxZmM5YmVkYjYzYzNjNjI4YTg2Zjk5MThmM2YyZWZjOTdl
14
- YzZlZGY5ODA0NTU4OGFhNjQzNTU5MDg4Zjk0MzM2NzE5NzI2ZTcyNGEzODg5
15
- ODc0YWZlNTQyOGMzNTM1N2I4ZDc2MGY4MWVkZTRmY2QxYjBlMGY=
13
+ N2M1NTdiYjAxNzZmY2QyMjgyNDBlMDU4ZGRiZTBlYWVlYTNjNjZlOGQ4MTBl
14
+ NmIyYzI4ZTAxN2E2YWZkMDU2MDc4NTczZjIzNTIwNDA4YTYyNWNjZDE0NDY0
15
+ YmRiNmMzY2NjZjZmZjYxMDJjODUyODFhNzM4ZjFlYThiZWYxOTA=
@@ -4,6 +4,40 @@ All notable changes to this project will be documented in this file.
4
4
  This project makes a strong effort to adhere to [Semantic
5
5
  Versioning](http://semver.org).
6
6
 
7
+ ## [Unreleased][unreleased]
8
+ ### Changed
9
+ - Updated this changelog for recent beaker-hostgenerator releases.
10
+
11
+ ## [0.2.0] - 2015-12-22
12
+ - Add platforms:
13
+ - Cumulus 2.5 (x86_64)
14
+ - Cisco NXOS 5 (x86_64)
15
+ - Cisco eXR 7 (x86_64)
16
+ - Fix platforms:
17
+ - Arista 4 (i386); spec string previously did not include version number.
18
+
19
+ ## [0.1.0] - 2015-12-21
20
+ - Add platforms:
21
+ - Arista 4 (i386)
22
+ - windows 2012r2 (x86_64); 32 bit agent
23
+ - sets ruby_arch=x32
24
+ - windows 2008r2 (x86_64); 32 bit agent
25
+ - sets ruby_arch=x32
26
+ - windows 2008 (x86_64); 32 bit agent
27
+ - sets ruby_arch=x32
28
+ - windows 2003r2 (x86_64); 32 bit agent
29
+ - sets ruby_arch=x32
30
+ - Set ruby_arch=x64 on a bunch of 64 bit windows platforms.
31
+ - Allow beaker-hostgenerator to be called programmatically.
32
+ - Fix bug in module/class namespaces that prevented both `beaker` and
33
+ `beaker-hostgenerator` from being required.
34
+
35
+ ## [0.0.1] - 2015-10-07
36
+ Test beaker-hostgenerator release pipeline (not intended to be a functional
37
+ release)
38
+
39
+ # sqa-utils (old Gem)
40
+
7
41
  ## [Unreleased][unreleased]
8
42
  ### Changed
9
43
  - Updated this changelog for 0.13.3
data/HISTORY.md CHANGED
@@ -1,11 +1,63 @@
1
1
  # default - History
2
2
  ## Tags
3
- * [LATEST - 22 Dec, 2015 (1194df93)](#LATEST)
3
+ * [LATEST - 30 Dec, 2015 (5bc2d40b)](#LATEST)
4
+ * [0.2.0 - 22 Dec, 2015 (dfa33e5f)](#0.2.0)
4
5
  * [0.1.0 - 21 Dec, 2015 (474f4ccb)](#0.1.0)
5
6
  * [0.0.1 - 7 Oct, 2015 (d99251e6)](#0.0.1)
6
7
 
7
8
  ## Details
8
- ### <a name = "LATEST">LATEST - 22 Dec, 2015 (1194df93)
9
+ ### <a name = "LATEST">LATEST - 30 Dec, 2015 (5bc2d40b)
10
+
11
+ * (GEM) update beaker-hostgenerator version to 0.3.0 (5bc2d40b)
12
+
13
+ * Merge pull request #18 from puppetlabs/qeng-3335 (323ed794)
14
+
15
+
16
+ ```
17
+ Merge pull request #18 from puppetlabs/qeng-3335
18
+
19
+ (QENG-3335) Don't identify centos as el in 'platform'
20
+ ```
21
+ * (QENG-3335) Fix typo in osinfo version deprecation message. (b4903f78)
22
+
23
+ * (QENG-3335) Fix the OSINFO deprecation warning. (e364bd97)
24
+
25
+
26
+ ```
27
+ (QENG-3335) Fix the OSINFO deprecation warning.
28
+
29
+ Assignment to the "warning" variable was incorrect, also it appears that one
30
+ cannot print to STDERR within the OptionParser.new block...
31
+ ```
32
+ * (QENG-3335) Add OSINFO v0 deprecation warning. (4336126a)
33
+
34
+ * (QENG-3335) s/bgh/bhg/ s/BGH/BHG/ (bfb95f05)
35
+
36
+ * (QENG-3335) Cast osinfo-version to integer. (4e9d8088)
37
+
38
+ * (QENG-3335) Don't forget to use the bgh_version. (c9dec1b7)
39
+
40
+ * (QENG-3335) Actually, don't change the original datastructure name. (e1f4cd4a)
41
+
42
+ * (QENG-3335) Actually, use '--osinfo-version' flag instead. (391fdd68)
43
+
44
+ * (QENG-3335) Add 'enable-unambiguous-platform-names' flag. (888f8d40)
45
+
46
+ * (QENG-3335) Don't identify centos as el in 'platform' (520028e2)
47
+
48
+ * Merge pull request #17 from puppetlabs/maint (3fc629e4)
49
+
50
+
51
+ ```
52
+ Merge pull request #17 from puppetlabs/maint
53
+
54
+ (MAINT) Update Changelog for recent releases.
55
+ ```
56
+ * (MAINT) Update Changelog for recent releases. (2ae32038)
57
+
58
+ ### <a name = "0.2.0">0.2.0 - 22 Dec, 2015 (dfa33e5f)
59
+
60
+ * (HISTORY) update beaker-hostgenerator history for gem release 0.2.0 (dfa33e5f)
9
61
 
10
62
  * (GEM) update beaker-hostgenerator version to 0.2.0 (1194df93)
11
63
 
@@ -12,6 +12,7 @@ module BeakerHostGenerator
12
12
  list_platforms_and_roles: false,
13
13
  disable_default_role: false,
14
14
  disable_role_config: false,
15
+ osinfo_version: 0,
15
16
  hypervisor: 'vmpooler',
16
17
  }
17
18
 
@@ -73,6 +74,18 @@ Usage: beaker-hostgenerator [options] <layout>
73
74
  @options[:disable_default_role] = true
74
75
  end
75
76
 
77
+ opts.on('--osinfo-version MAJOR_VERSION',
78
+ "Use OSINFO for specified beaker-hostgenerator version. " <<
79
+ "Allows early access to future version of OSINFO data structure " <<
80
+ "used to generate host configs.") do |version|
81
+ version = version.to_i
82
+ if not [0, 1].include? version
83
+ raise "Invalid beaker-hostgenerator version: #{version}"
84
+ end
85
+
86
+ @options[:osinfo_version] = version
87
+ end
88
+
76
89
  opts.on('-h',
77
90
  '--help',
78
91
  'Display command help.') do
@@ -90,11 +103,24 @@ Usage: beaker-hostgenerator [options] <layout>
90
103
 
91
104
  # Tokenizing the config definition for great justice
92
105
  @tokens = argv[0].split('-')
106
+
107
+ if @options[:osinfo_version] === 0
108
+ warning = <<-eow
109
+ WARNING: Starting with beaker-hostgenerator 1.x platform strings for "el" hosts
110
+ will correspond to the actual linux distribution name. ie, the platform string
111
+ corresponding to a host specified as "centos4_64a" will be "centos-4-x86_64"
112
+ rather than "el-4-x86_64". It is recommended that you update your project's test
113
+ suites ASAP or be forced to do so when beaker-hostgenerator development moves on
114
+ to the 1.x series. We don't intend to backport features or platforms to 0.x.
115
+ eow
116
+ STDERR.puts(warning)
117
+ end
93
118
  end
94
119
 
95
120
  def print_platforms_and_roles
96
121
  puts "valid beaker-hostgenerator platforms: "
97
- osinfo = BeakerHostGenerator::Utils.get_platforms
122
+ osinfo = BeakerHostGenerator::Utils.get_platforms(@options[:hypervisor],
123
+ @options[:osinfo_version])
98
124
  osinfo.each do |k,v|
99
125
  puts " #{k}"
100
126
  end
@@ -397,6 +397,105 @@ module BeakerHostGenerator
397
397
  },
398
398
  }
399
399
 
400
+ OSINFO_BHGv1 = {
401
+ 'centos4-32' => {
402
+ 'platform' => 'centos-4-i386',
403
+ 'template' => 'centos-4-i386'
404
+ },
405
+ 'centos4-64' => {
406
+ 'platform' => 'centos-4-x86_64',
407
+ 'template' => 'centos-4-x86_64'
408
+ },
409
+ 'centos5-32' => {
410
+ 'platform' => 'centos-5-i386',
411
+ 'template' => 'centos-5-i386'
412
+ },
413
+ 'centos5-64' => {
414
+ 'platform' => 'centos-5-x86_64',
415
+ 'template' => 'centos-5-x86_64'
416
+ },
417
+ 'centos6-32' => {
418
+ 'platform' => 'centos-6-i386',
419
+ 'template' => 'centos-6-i386'
420
+ },
421
+ 'centos6-64' => {
422
+ 'platform' => 'centos-6-x86_64',
423
+ 'template' => 'centos-6-x86_64'
424
+ },
425
+ 'centos7-64' => {
426
+ 'platform' => 'centos-7-x86_64',
427
+ 'template' => 'centos-7-x86_64'
428
+ },
429
+ 'oracle5-32' => {
430
+ 'platform' => 'oracle-5-i386',
431
+ 'template' => 'oracle-5-i386'
432
+ },
433
+ 'oracle5-64' => {
434
+ 'platform' => 'oracle-5-x86_64',
435
+ 'template' => 'oracle-5-x86_64'
436
+ },
437
+ 'oracle6-32' => {
438
+ 'platform' => 'oracle-6-i386',
439
+ 'template' => 'oracle-6-i386'
440
+ },
441
+ 'oracle6-64' => {
442
+ 'platform' => 'oracle-6-x86_64',
443
+ 'template' => 'oracle-6-x86_64'
444
+ },
445
+ 'oracle7-64' => {
446
+ 'platform' => 'oracle-7-x86_64',
447
+ 'template' => 'oracle-7-x86_64'
448
+ },
449
+ 'redhat4-32' => {
450
+ 'platform' => 'redhat-4-i386',
451
+ 'template' => 'redhat-4-i386'
452
+ },
453
+ 'redhat4-64' => {
454
+ 'platform' => 'redhat-4-x86_64',
455
+ 'template' => 'redhat-4-x86_64'
456
+ },
457
+ 'redhat5-32' => {
458
+ 'platform' => 'redhat-5-i386',
459
+ 'template' => 'redhat-5-i386'
460
+ },
461
+ 'redhat5-64' => {
462
+ 'platform' => 'redhat-5-x86_64',
463
+ 'template' => 'redhat-5-x86_64'
464
+ },
465
+ 'redhat6-32' => {
466
+ 'platform' => 'redhat-6-i386',
467
+ 'template' => 'redhat-6-i386'
468
+ },
469
+ 'redhat6-64' => {
470
+ 'platform' => 'redhat-6-x86_64',
471
+ 'template' => 'redhat-6-x86_64'
472
+ },
473
+ 'redhat7-64' => {
474
+ 'platform' => 'redhat-7-x86_64',
475
+ 'template' => 'redhat-7-x86_64'
476
+ },
477
+ 'scientific5-32' => {
478
+ 'platform' => 'scientific-5-i386',
479
+ 'template' => 'scientific-5-i386'
480
+ },
481
+ 'scientific5-64' => {
482
+ 'platform' => 'scientific-5-x86_64',
483
+ 'template' => 'scientific-5-x86_64'
484
+ },
485
+ 'scientific6-32' => {
486
+ 'platform' => 'scientific-6-i386',
487
+ 'template' => 'scientific-6-i386'
488
+ },
489
+ 'scientific6-64' => {
490
+ 'platform' => 'scientific-6-x86_64',
491
+ 'template' => 'scientific-6-x86_64'
492
+ },
493
+ 'scientific7-64' => {
494
+ 'platform' => 'scientific-7-x86_64',
495
+ 'template' => 'scientific-7-x86_64'
496
+ },
497
+ }
498
+
400
499
  VMPOOLER_CONFIG = {
401
500
  'HOSTS' => {},
402
501
  'CONFIG' => {
@@ -404,6 +503,20 @@ module BeakerHostGenerator
404
503
  }
405
504
  }
406
505
 
506
+ def get_osinfo(bhg_version=0)
507
+ case bhg_version
508
+ when 0
509
+ osinfo = OSINFO
510
+ when 1
511
+ osinfo = OSINFO
512
+ osinfo.deep_merge! OSINFO_BHGv1
513
+ else
514
+ raise "Invalid beaker-hostgenerator version: #{bhg_version}"
515
+ end
516
+ return osinfo
517
+ end
518
+
519
+ module_function :get_osinfo
407
520
  end
408
521
  end
409
522
  end
@@ -43,7 +43,7 @@ module BeakerHostGenerator
43
43
  ostype = nil
44
44
 
45
45
  tokens.each do |token|
46
- if is_ostype_token?(token)
46
+ if is_ostype_token?(token, @options[:osinfo_version])
47
47
  if nodeid[ostype] == 1 and ostype != nil
48
48
  raise "Error: no nodes generated for #{ostype}"
49
49
  end
@@ -56,7 +56,8 @@ module BeakerHostGenerator
56
56
  node_info['ostype'] = ostype
57
57
  node_info['nodeid'] = nodeid[ostype]
58
58
 
59
- host_name, host_config = generate_node(node_info, BASE_HOST_CONFIG)
59
+ host_name, host_config = generate_node(
60
+ node_info, BASE_HOST_CONFIG, bhg_version=@options[:osinfo_version])
60
61
 
61
62
  if PE_USE_WIN32 && ostype =~ /windows/ && node_info['bits'] == "64"
62
63
  host_config['ruby_arch'] = 'x86'
@@ -15,7 +15,7 @@ module BeakerHostGenerator
15
15
  super(options)
16
16
  end
17
17
 
18
- def generate_node node_info, base_config
18
+ def generate_node node_info, base_config, bhg_version=0
19
19
  host_config = {}
20
20
  host_config.deep_merge! base_config
21
21
 
@@ -30,7 +30,8 @@ module BeakerHostGenerator
30
30
  platform = "#{ostype}-#{bits}"
31
31
  name = "#{platform}-#{nodeid}"
32
32
 
33
- host_config.deep_merge! OSINFO[platform]
33
+ osinfo = get_osinfo(bhg_version)
34
+ host_config.deep_merge! osinfo[platform]
34
35
 
35
36
  # Some vmpooler/vsphere platforms have special requirements. We munge the
36
37
  # node host_config here if that is necessary.
@@ -39,8 +40,9 @@ module BeakerHostGenerator
39
40
  return name, host_config
40
41
  end
41
42
 
42
- def is_ostype_token? token
43
- OSINFO.each do |key,value|
43
+ def is_ostype_token? token, bhg_version=0
44
+ osinfo = get_osinfo(bhg_version)
45
+ osinfo.each do |key,value|
44
46
 
45
47
  ostype = key.split('-')[0]
46
48
 
@@ -45,10 +45,10 @@ module BeakerHostGenerator
45
45
  end
46
46
  end
47
47
 
48
- def get_platforms(hypervisor_type='vmpooler')
48
+ def get_platforms(hypervisor_type='vmpooler', bhg_version=0)
49
49
  case hypervisor_type
50
50
  when /vmpooler/
51
- osinfo = BeakerHostGenerator::Data::Vmpooler::OSINFO
51
+ osinfo = BeakerHostGenerator::Data::Vmpooler.get_osinfo(bhg_version)
52
52
  else
53
53
  raise "Invalid hypervisor #{hypervisor_type}"
54
54
  end
@@ -1,5 +1,5 @@
1
1
  module BeakerHostGenerator
2
2
  module Version
3
- STRING = '0.2.0'
3
+ STRING = '0.3.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: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Branan Purvine-Riley