Module: BeakerHostGenerator::Data

Overview

Contains all the platform information that ends up in the generated hosts configuration. This includes the various OS-specific platform configuration, and PE-specific installation & upgrade configuration.

Any data used by any hypervisor or any other abstraction should be defined in this module, likely in the ‘osinfo` hash. The hypervisor implementation must then use the provided module functions (likely `get_platform_info`) to extract the relevant portions of the `osinfo` data.

This module is intended to be used by either directly accessing the static functions like ‘BeakerHostGenerator::Data.<function>()` or as a mixin via `include BeakerHostGenerator::Data` and then `<function>()`.

Constant Summary collapse

MAIN_PE_VERSION =
'2023.0'
PE_TARBALL_SERVER =
'https://artifactory.delivery.puppetlabs.net/artifactory/generic_enterprise__local'
PE_USE_WIN32 =
ENV.fetch('pe_use_win32', nil)
BASE_CONFIG =
{
  'HOSTS' => {},
  'CONFIG' => {},
}

Class Method Summary collapse

Class Method Details

.base_host_config(options) ⇒ Object



63
64
65
66
67
68
69
70
# File 'lib/beaker-hostgenerator/data.rb', line 63

def base_host_config(options)
  {
    'pe_dir' => options[:pe_dir] || pe_dir(pe_version),
    'pe_ver' => options[:pe_ver] || pe_version,
    'pe_upgrade_dir' => options[:pe_upgrade_dir] || pe_dir(pe_upgrade_version),
    'pe_upgrade_ver' => options[:pe_upgrade_ver] || pe_upgrade_version,
  }.reject { |_key, value| value.nil? }
end

.generate_osinfo {|%w[aix73-POWER aix-7.3-power]| ... } ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Yields:

  • (%w[aix73-POWER aix-7.3-power])


1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
# File 'lib/beaker-hostgenerator/data.rb', line 1085

def generate_osinfo
  # AIX
  yield %w[aix73-POWER aix-7.3-power]

  # Fedora
  (19..40).each do |release|
    # 32 bit support was dropped in Fedora 31
    yield ["fedora#{release}-32", "fedora-#{release}-i386"] if release < 31

    yield ["fedora#{release}-64", "fedora-#{release}-x86_64"]
  end

  # Ubuntu
  #
  # Generate LTS platforms
  (18..24).select(&:even?).each do |release|
    yield ["ubuntu#{release}04-64", "ubuntu-#{release}.04-amd64"]

    yield ["ubuntu#{release}04-POWER", "ubuntu-#{release}.04-ppc64el"]

    yield ["ubuntu#{release}04-AARCH64", "ubuntu-#{release}.04-aarch64"]
  end

  # Generate STS platforms
  [20, 21].each do |release|
    # Even years are LTS releases
    yield ["ubuntu#{release}04-64", "ubuntu-#{release}.04-amd64"] unless release.even?

    yield ["ubuntu#{release}10-64", "ubuntu-#{release}.10-amd64"]
  end

  # FreeBSD
  (12..13).each do |release|
    yield ["freebsd#{release}-64", "freebsd-#{release}-amd64"]
  end

  # Amazon Linux
  yield %w[amazon2023-64 amazon-2023-x86_64]
  yield %w[amazon2023-AARCH64 amazon-2023-aarch64]

  # AlmaLinux and Rocky
  %w[almalinux rocky].each do |os|
    (8..9).each do |release|
      yield ["#{os}#{release}-64", "el-#{release}-x86_64"]
    end
  end

  # Oracle / OracleLinux
  yield ['oracle6-32', 'el-6-i386']
  (6..9).each do |release|
    yield ["oracle#{release}-64", "el-#{release}-x86_64"]
  end

  # Scientific Linux
  yield ['scientific7-64', 'el-7-x86_64']

  # OpenSUSE
  [15, 42].each do |release|
    yield ["opensuse#{release}-32", "opensuse-#{release}-i386"]
    yield ["opensuse#{release}-64", "opensuse-#{release}-x86_64"]
  end

  # macOS
  yield %w[osx14-64 osx-14-x86_64]
  yield %w[osx14-ARM64 osx-14-arm64]
end

.get_osinfo(bhg_version) ⇒ Object

Returns the map of OS info for the given version of this library. The current version is always available as version 0 (zero). Throws an exception if the version number is unrecognized.

This is intended to be the primary access point for the OS info maps defined in ‘osinfo`, `osinfo_bhgv1`, etc.

See also ‘get_platforms`, `get_platform_info`, for common operations on this OS info map.



1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
# File 'lib/beaker-hostgenerator/data.rb', line 1030

def get_osinfo(bhg_version)
  case bhg_version
  when 0
    {}.deeper_merge!(osinfo)
  when 1
    {}.deeper_merge!(osinfo).deeper_merge!(osinfo_bhgv1)
  else
    raise "Invalid beaker-hostgenerator version: #{bhg_version}"
  end
end

.get_platform_info(bhg_version, platform, hypervisor) ⇒ Object

Returns the fully parsed map of information of the specified OS platform for the specified hypervisor. This map should be suitable for outputting to the user as it will have the intermediate organizational branches of the ‘get_osinfo` map removed.

This is intended to be the primary way to access OS info from hypervisor implementations when generating host definitions.

Examples:

Getting CentOS 6 64-bit information for the VMPooler hypervisor

Given the OS info map looks like:
    ...
    'centos9-64' => {
      :general => { 'platform' => 'el-9-x86_64' },
      :vmpooler => { 'template' => 'centos-9-x86_64' }
    }
    ...

Then get_platform_info(0, 'centos9-64', :vmpooler) returns:
    {
      'platform' => 'el-6-x86_64',
      'template' => 'centos-6-x86_64'
    }

Parameters:

  • bhg_version (Integer)

    The version of OS info to use.

  • platform (String)

    The OS platform to access from the OS info map.

  • hypervisor (Symbol)

    The symbol representing which hypervisor submap to extract from the general OS info map.



1077
1078
1079
1080
1081
1082
# File 'lib/beaker-hostgenerator/data.rb', line 1077

def get_platform_info(bhg_version, platform, hypervisor)
  info = get_osinfo(bhg_version)[platform]
  return {} unless info

  {}.deeper_merge!(info[:general]).deeper_merge!(info[hypervisor])
end

.get_platforms(bhg_version) ⇒ Object

Returns the list of platforms supported by the specified version of this library. This list should be equal to the keys of the ‘get_osinfo` map and is provided as a common convenience.



1044
1045
1046
# File 'lib/beaker-hostgenerator/data.rb', line 1044

def get_platforms(bhg_version)
  get_osinfo(bhg_version).keys
end

.osinfoObject

This is where all the information for all platforms lives, irrespective of the hypervisor(s). This hash contains every OS that BHG supports as keys, and the values are hashes that contain hypervisor-specific data about that OS. Every OS also has a special “general” section for data that should always be included regardless of the hypervisor. Hypervisor implementations will then grab specific bits of data out of this hash and combine them to produce the generated hosts output.



80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
# File 'lib/beaker-hostgenerator/data.rb', line 80

def osinfo
  result = {}

  generate_osinfo do |name, platform|
    result[name] = {
      general: {
        'platform' => platform,
      },
    }
  end

  result.merge!({
                  'aix71-POWER' => {
                    general: {
                      'platform' => 'aix-7.1-power',
                    },
                    abs: {
                      'template' => 'aix-7.1-power',
                    },
                  },
                  'aix72-POWER' => {
                    general: {
                      'platform' => 'aix-7.2-power',
                      'packaging_platform' => 'aix-7.1-power',
                    },
                    abs: {
                      'template' => 'aix-7.2-power',
                    },
                  },
                  'amazon6-64' => {
                    general: {
                      'platform' => 'el-6-x86_64',
                    },
                    abs: {
                      'template' => 'amazon-6-x86_64',
                    },
                  },
                  'amazon7-64' => {
                    general: {
                      'platform' => 'el-7-x86_64',
                    },
                    abs: {
                      'template' => 'amazon-7-x86_64',
                    },
                  },
                  'amazon7-ARM64' => {
                    general: {
                      'platform' => 'el-7-aarch64',
                    },
                    abs: {
                      'template' => 'amazon-7-arm64',
                    },
                  },
                  'archlinuxrolling-64' => {
                    general: {
                      'platform' => 'archlinux-rolling-x64',
                    },
                    vagrant: {
                      'box' => 'archlinux/archlinux',
                    },
                    docker: {
                      'image' => 'archlinux/archlinux',
                    },
                  },
                  'centos7-64' => {
                    general: {
                      'platform' => 'el-7-x86_64',
                    },
                  },
                  'centos8-64' => {
                    general: {
                      'platform' => 'el-8-x86_64',
                    },
                    vagrant: {
                      'box' => 'centos/stream8',
                      'box_url' => 'https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-Vagrant-8-20230501.0.x86_64.vagrant-libvirt.box',
                    },
                  },
                  'centos9-64' => {
                    general: {
                      'platform' => 'el-9-x86_64',
                    },
                    vagrant: {
                      'box' => 'centos/stream9',
                      'box_url' => 'https://cloud.centos.org/centos/9-stream/x86_64/images/CentOS-Stream-Vagrant-9-20230410.0.x86_64.vagrant-libvirt.box',
                    },
                  },
                  'debian10-64' => {
                    general: {
                      'platform' => 'debian-10-amd64',
                    },
                    vagrant: {
                      'box' => 'debian/buster64',
                    },
                  },
                  'debian10-32' => {
                    general: {
                      'platform' => 'debian-10-i386',
                    },
                  },
                  'debian11-64' => {
                    general: {
                      'platform' => 'debian-11-amd64',
                    },
                    vagrant: {
                      'box' => 'debian/bullseye64',
                    },
                  },
                  'debian11-AARCH64' => {
                    general: {
                      'platform' => 'debian-11-aarch64',
                    },
                  },
                  'debian12-64' => {
                    general: {
                      'platform' => 'debian-12-amd64',
                    },
                    vagrant: {
                      'box' => 'debian/bookworm64',
                    },
                  },
                  'debian12-AARCH64' => {
                    general: {
                      'platform' => 'debian-12-aarch64',
                    },
                  },
                  'panos61-64' => {
                    general: {
                      'platform' => 'palo-alto-6.1.0-x86_64',
                    },
                  },
                  'panos71-64' => {
                    general: {
                      'platform' => 'palo-alto-7.1.0-x86_64',
                    },
                  },
                  'panos81-64' => {
                    general: {
                      'platform' => 'palo-alto-8.1.0-x86_64',
                    },
                  },
                  'osx1015-64' => {
                    general: {
                      'platform' => 'osx-10.15-x86_64',
                    },
                    vmpooler: {
                      'template' => 'osx-1015-x86_64',
                    },
                  },
                  'osx11-64' => {
                    general: {
                      'platform' => 'osx-11-x86_64',
                    },
                    vmpooler: {
                      'template' => 'macos-112-x86_64',
                    },
                  },
                  'osx11-ARM64' => {
                    general: {
                      'platform' => 'osx-11-arm64',
                    },
                    vmpooler: {
                      'template' => 'macos-11-arm64',
                    },
                  },
                  'osx12-64' => {
                    general: {
                      'platform' => 'osx-12-x86_64',
                    },
                    vmpooler: {
                      'template' => 'macos-12-x86_64',
                    },
                  },
                  'osx12-ARM64' => {
                    general: {
                      'platform' => 'osx-12-arm64',
                    },
                    vmpooler: {
                      'template' => 'macos-12-arm64',
                    },
                  },
                  'osx13-64' => {
                    general: {
                      'platform' => 'osx-13-x86_64',
                    },
                    vmpooler: {
                      'template' => 'macos-13-x86_64',
                    },
                  },
                  'osx13-ARM64' => {
                    general: {
                      'platform' => 'osx-13-arm64',
                    },
                    vmpooler: {
                      'template' => 'macos-13-arm64',
                    },
                  },
                  'redhat6-32' => {
                    general: {
                      'platform' => 'el-6-i386',
                    },
                    vmpooler: {
                      'template' => 'redhat-6-i386',
                    },
                  },
                  'redhat6-64' => {
                    general: {
                      'platform' => 'el-6-x86_64',
                    },
                    vmpooler: {
                      'template' => 'redhat-6-x86_64',
                    },
                  },
                  'redhat6-S390X' => {
                    general: {
                      'platform' => 'el-6-s390x',
                    },
                  },
                  'redhat7-64' => {
                    general: {
                      'platform' => 'el-7-x86_64',
                    },
                  },
                  'redhatfips7-64' => {
                    general: {
                      'platform' => 'el-7-x86_64',
                      'packaging_platform' => 'redhatfips-7-x86_64',
                    },
                    vmpooler: {
                      'template' => 'redhat-fips-7-x86_64',
                    },
                  },
                  'redhat7-POWER' => {
                    general: {
                      'platform' => 'el-7-ppc64le',
                    },
                    abs: {
                      'template' => 'redhat-7.3-power8',
                    },
                  },
                  'redhat7-S390X' => {
                    general: {
                      'platform' => 'el-7-s390x',
                    },
                  },
                  'redhat7-AARCH64' => {
                    general: {
                      'platform' => 'el-7-aarch64',
                    },
                    abs: {
                      'template' => 'centos-7-arm64',
                    },
                    vmpooler: {
                      'template' => 'redhat-7-x86_64',
                    },
                  },
                  'redhat8-64' => {
                    general: {
                      'platform' => 'el-8-x86_64',
                    },
                  },
                  'redhatfips8-64' => {
                    general: {
                      'platform' => 'el-8-x86_64',
                      'packaging_platform' => 'redhatfips-8-x86_64',
                    },
                    vmpooler: {
                      'template' => 'redhat-fips-8-x86_64',
                    },
                  },
                  'redhat8-AARCH64' => {
                    general: {
                      'platform' => 'el-8-aarch64',
                    },
                    abs: {
                      'template' => 'redhat-8-arm64',
                    },
                    vmpooler: {
                      'template' => 'redhat-8-x86_64',
                    },
                  },
                  'redhat8-POWER' => {
                    general: {
                      'platform' => 'el-8-ppc64le',
                    },
                    abs: {
                      'template' => 'redhat-8-power8',
                    },
                  },
                  'redhat9-64' => {
                    general: {
                      'platform' => 'el-9-x86_64',
                    },
                  },
                  'redhatfips9-64' => {
                    general: {
                      'platform' => 'el-9-x86_64',
                      'packaging_platform' => 'redhatfips-9-x86_64',
                    },
                    vmpooler: {
                      'template' => 'redhat-fips-9-x86_64',
                    },
                  },
                  'redhat9-AARCH64' => {
                    general: {
                      'platform' => 'el-9-aarch64',
                    },
                    abs: {
                      'template' => 'redhat-9-arm64',
                    },
                    vmpooler: {
                      'template' => 'redhat-9-arm64',
                    },
                  },
                  'redhat9-POWER' => {
                    general: {
                      'platform' => 'el-9-ppc64le',
                    },
                    abs: {
                      'template' => 'redhat-9-power9',
                    },
                  },
                  'sles11-32' => {
                    general: {
                      'platform' => 'sles-11-i386',
                    },
                    vmpooler: {
                      'template' => 'sles-11-i386',
                    },
                  },
                  'sles11-64' => {
                    general: {
                      'platform' => 'sles-11-x86_64',
                    },
                    vmpooler: {
                      'template' => 'sles-11-x86_64',
                    },
                  },
                  'sles11-S390X' => {
                    general: {
                      'platform' => 'sles-11-s390x',
                    },
                  },
                  'sles12-64' => {
                    general: {
                      'platform' => 'sles-12-x86_64',
                    },
                    vmpooler: {
                      'template' => 'sles-12-x86_64',
                    },
                  },
                  'sles12-S390X' => {
                    general: {
                      'platform' => 'sles-12-s390x',
                    },
                  },
                  'sles12-POWER' => {
                    general: {
                      'platform' => 'sles-12-ppc64le',
                    },
                    abs: {
                      'template' => 'sles-12-power8',
                    },
                  },
                  'sles15-64' => {
                    general: {
                      'platform' => 'sles-15-x86_64',
                    },
                    vmpooler: {
                      'template' => 'sles-15-x86_64',
                    },
                  },
                  'solaris10-32' => {
                    general: {
                      'platform' => 'solaris-10-i386',
                    },
                    vmpooler: {
                      'template' => 'solaris-10-x86_64',
                    },
                  },
                  'solaris10-64' => {
                    general: {
                      'platform' => 'solaris-10-i386',
                    },
                    vmpooler: {
                      'template' => 'solaris-10-x86_64',
                    },
                  },
                  'solaris10-SPARC' => {
                    general: {
                      'platform' => 'solaris-10-sparc',
                    },
                    abs: {
                      'template' => 'solaris-10-sparc',
                    },
                  },
                  'solaris11-32' => {
                    general: {
                      'platform' => 'solaris-11-i386',
                    },
                    vmpooler: {
                      'template' => 'solaris-11-x86_64',
                    },
                  },
                  'solaris11-64' => {
                    general: {
                      'platform' => 'solaris-11-i386',
                    },
                    vmpooler: {
                      'template' => 'solaris-11-x86_64',
                    },
                  },
                  'solaris11-SPARC' => {
                    general: {
                      'platform' => 'solaris-11-sparc',
                    },
                    abs: {
                      'template' => 'solaris-11-sparc',
                    },
                  },
                  'solaris112-32' => {
                    general: {
                      'platform' => 'solaris-11.2-i386',
                      'packaging_platform' => 'solaris-11-i386',
                    },
                    vmpooler: {
                      'template' => 'solaris-112-x86_64',
                    },
                  },
                  'solaris112-64' => {
                    general: {
                      'platform' => 'solaris-11.2-i386',
                      'packaging_platform' => 'solaris-11-i386',
                    },
                    vmpooler: {
                      'template' => 'solaris-112-x86_64',
                    },
                  },
                  'solaris114-32' => {
                    general: {
                      'platform' => 'solaris-11.4-i386',
                      'packaging_platform' => 'solaris-11-i386',
                    },
                    vmpooler: {
                      'template' => 'solaris-114-x86_64',
                    },
                  },
                  'solaris114-64' => {
                    general: {
                      'platform' => 'solaris-11.4-i386',
                      'packaging_platform' => 'solaris-11-i386',
                    },
                    vmpooler: {
                      'template' => 'solaris-114-x86_64',
                    },
                  },
                  'vro6-64' => {
                    general: {
                      'platform' => 'sles-11-x86_64',
                    },
                    vmpooler: {
                      'template' => 'vro-6-x86_64',
                    },
                  },
                  'vro7-64' => {
                    general: {
                      'platform' => 'sles-11-x86_64',
                    },
                    vmpooler: {
                      'template' => 'vro-7-x86_64',
                    },
                  },
                  'vro71-64' => {
                    general: {
                      'platform' => 'sles-11-x86_64',
                    },
                    vmpooler: {
                      'template' => 'vro-71-x86_64',
                    },
                  },
                  'vro73-64' => {
                    general: {
                      'platform' => 'sles-11-x86_64',
                    },
                    vmpooler: {
                      'template' => 'vro-73-x86_64',
                    },
                  },
                  'vro74-64' => {
                    general: {
                      'platform' => 'sles-11-x86_64',
                    },
                    vmpooler: {
                      'template' => 'vro-74-x86_64',
                    },
                  },
                  'windows2008-64' => {
                    general: {
                      'platform' => 'windows-2008-64',
                      'packaging_platform' => 'windows-2012-x64',
                      'ruby_arch' => 'x64',
                    },
                    vmpooler: {
                      'template' => 'win-2008-x86_64',
                    },
                  },
                  'windows2008-6432' => {
                    general: {
                      'platform' => 'windows-2008-64',
                      'packaging_platform' => 'windows-2012-x64',
                      'ruby_arch' => 'x86',
                    },
                    vmpooler: {
                      'template' => 'win-2008-x86_64',
                    },
                  },
                  'windows2008r2-64' => {
                    general: {
                      'platform' => 'windows-2008r2-64',
                      'packaging_platform' => 'windows-2012-x64',
                      'ruby_arch' => 'x64',
                    },
                    vmpooler: {
                      'template' => 'win-2008r2-x86_64',
                    },
                  },
                  'windows2008r2-6432' => {
                    general: {
                      'platform' => 'windows-2008r2-64',
                      'packaging_platform' => 'windows-2012-x64',
                      'ruby_arch' => 'x86',
                    },
                    vmpooler: {
                      'template' => 'win-2008r2-x86_64',
                    },
                  },
                  'windows2012-64' => {
                    general: {
                      'platform' => 'windows-2012-64',
                      'packaging_platform' => 'windows-2012-x64',
                      'ruby_arch' => 'x64',
                    },
                    vmpooler: {
                      'template' => 'win-2012-x86_64',
                    },
                  },
                  'windows2012-6432' => {
                    general: {
                      'platform' => 'windows-2012-64',
                      'packaging_platform' => 'windows-2012-x64',
                      'ruby_arch' => 'x86',
                    },
                    vmpooler: {
                      'template' => 'win-2012-x86_64',
                    },
                  },
                  'windows2012r2-64' => {
                    general: {
                      'platform' => 'windows-2012r2-64',
                      'packaging_platform' => 'windows-2012-x64',
                      'ruby_arch' => 'x64',
                    },
                    vmpooler: {
                      'template' => 'win-2012r2-x86_64',
                    },
                  },
                  'windowsfips2012r2-64' => {
                    general: {
                      'platform' => 'windows-2012r2-64',
                      'packaging_platform' => 'windowsfips-2012-x64',
                      'ruby_arch' => 'x64',
                    },
                    vmpooler: {
                      'template' => 'win-2012r2-fips-x86_64',
                    },
                  },
                  'windowsfips2012r2-6432' => {
                    general: {
                      'platform' => 'windows-2012r2-64',
                      'packaging_platform' => 'windowsfips-2012-x64',
                      'ruby_arch' => 'x64',
                    },
                    vmpooler: {
                      'template' => 'win-2012r2-fips-x86_64',
                    },
                  },
                  'windows2012r2-6432' => {
                    general: {
                      'platform' => 'windows-2012r2-64',
                      'packaging_platform' => 'windows-2012-x64',
                      'ruby_arch' => 'x86',
                    },
                    vmpooler: {
                      'template' => 'win-2012r2-x86_64',
                    },
                  },
                  'windows2012r2_wmf5-64' => {
                    general: {
                      'platform' => 'windows-2012r2-64',
                      'packaging_platform' => 'windows-2012-x64',
                      'ruby_arch' => 'x64',
                    },
                    vmpooler: {
                      'template' => 'win-2012r2-wmf5-x86_64',
                    },
                  },
                  'windows2012r2_ja-64' => {
                    general: {
                      'platform' => 'windows-2012r2-64',
                      'packaging_platform' => 'windows-2012-x64',
                      'ruby_arch' => 'x64',
                    },
                    vmpooler: {
                      'template' => 'win-2012r2-ja-x86_64',
                      'locale' => 'ja',
                    },
                  },
                  'windows2012r2_ja-6432' => {
                    general: {
                      'platform' => 'windows-2012r2-64',
                      'packaging_platform' => 'windows-2012-x64',
                      'ruby_arch' => 'x86',
                    },
                    vmpooler: {
                      'template' => 'win-2012r2-ja-x86_64',
                      'locale' => 'ja',
                    },
                  },
                  'windows2012r2_fr-64' => {
                    general: {
                      'platform' => 'windows-2012r2-64',
                      'packaging_platform' => 'windows-2012-x64',
                      'ruby_arch' => 'x64',
                    },
                    vmpooler: {
                      'template' => 'win-2012r2-fr-x86_64',
                      'user' => 'Administrateur',
                      'locale' => 'fr',
                    },
                  },
                  'windows2012r2_fr-6432' => {
                    general: {
                      'platform' => 'windows-2012r2-64',
                      'packaging_platform' => 'windows-2012-x64',
                      'ruby_arch' => 'x86',
                    },
                    vmpooler: {
                      'template' => 'win-2012r2-fr-x86_64',
                      'user' => 'Administrateur',
                      'locale' => 'fr',
                    },
                  },
                  'windows2012r2_core-64' => {
                    general: {
                      'platform' => 'windows-2012r2-64',
                      'packaging_platform' => 'windows-2012-x64',
                      'ruby_arch' => 'x64',
                    },
                    vmpooler: {
                      'template' => 'win-2012r2-core-x86_64',
                    },
                  },
                  'windows2012r2_core-6432' => {
                    general: {
                      'platform' => 'windows-2012r2-64',
                      'packaging_platform' => 'windows-2012-x64',
                      'ruby_arch' => 'x86',
                    },
                    vmpooler: {
                      'template' => 'win-2012r2-core-x86_64',
                    },
                  },
                  'windows2016-64' => {
                    general: {
                      'platform' => 'windows-2016-64',
                      'packaging_platform' => 'windows-2012-x64',
                      'ruby_arch' => 'x64',
                    },
                    vmpooler: {
                      'template' => 'win-2016-x86_64',
                    },
                  },
                  'windows2016-6432' => {
                    general: {
                      'platform' => 'windows-2016-64',
                      'packaging_platform' => 'windows-2012-x64',
                      'ruby_arch' => 'x86',
                    },
                    vmpooler: {
                      'template' => 'win-2016-x86_64',
                    },
                  },
                  'windows2016_core-64' => {
                    general: {
                      'platform' => 'windows-2016-64',
                      'packaging_platform' => 'windows-2012-x64',
                      'ruby_arch' => 'x64',
                    },
                    vmpooler: {
                      'template' => 'win-2016-core-x86_64',
                    },
                  },
                  'windows2016_core-6432' => {
                    general: {
                      'platform' => 'windows-2016-64',
                      'packaging_platform' => 'windows-2012-x64',
                      'ruby_arch' => 'x86',
                    },
                    vmpooler: {
                      'template' => 'win-2016-core-x86_64',
                    },
                  },
                  'windows2016_fr-64' => {
                    general: {
                      'platform' => 'windows-2016-64',
                      'packaging_platform' => 'windows-2012-x64',
                      'ruby_arch' => 'x64',
                    },
                    vmpooler: {
                      'template' => 'win-2016-fr-x86_64',
                      'user' => 'Administrateur',
                      'locale' => 'fr',
                    },
                  },
                  'windows2016_fr-6432' => {
                    general: {
                      'platform' => 'windows-2016-64',
                      'packaging_platform' => 'windows-2012-x64',
                      'ruby_arch' => 'x86',
                    },
                    vmpooler: {
                      'template' => 'win-2016-fr-x86_64',
                      'user' => 'Administrateur',
                      'locale' => 'fr',
                    },
                  },
                  'windows2019-64' => {
                    general: {
                      'platform' => 'windows-2019-64',
                      'packaging_platform' => 'windows-2012-x64',
                      'ruby_arch' => 'x64',
                    },
                    vmpooler: {
                      'template' => 'win-2019-x86_64',
                    },
                  },
                  'windows2019-6432' => {
                    general: {
                      'platform' => 'windows-2019-64',
                      'packaging_platform' => 'windows-2012-x64',
                      'ruby_arch' => 'x86',
                    },
                    vmpooler: {
                      'template' => 'win-2019-x86_64',
                    },
                  },
                  'windows2019_ja-64' => {
                    general: {
                      'platform' => 'windows-2019-64',
                      'packaging_platform' => 'windows-2012-x64',
                      'ruby_arch' => 'x64',
                    },
                    vmpooler: {
                      'template' => 'win-2019-ja-x86_64',
                      'locale' => 'ja',
                    },
                  },
                  'windows2019_ja-6432' => {
                    general: {
                      'platform' => 'windows-2019-64',
                      'packaging_platform' => 'windows-2012-x64',
                      'ruby_arch' => 'x86',
                    },
                    vmpooler: {
                      'template' => 'win-2019-ja-x86_64',
                      'locale' => 'ja',
                    },
                  },
                  'windows2019_fr-64' => {
                    general: {
                      'platform' => 'windows-2019-64',
                      'packaging_platform' => 'windows-2012-x64',
                      'ruby_arch' => 'x64',
                    },
                    vmpooler: {
                      'template' => 'win-2019-fr-x86_64',
                      'user' => 'Administrateur',
                      'locale' => 'fr',
                    },
                  },
                  'windows2019_fr-6432' => {
                    general: {
                      'platform' => 'windows-2019-64',
                      'packaging_platform' => 'windows-2012-x64',
                      'ruby_arch' => 'x86',
                    },
                    vmpooler: {
                      'template' => 'win-2019-fr-x86_64',
                      'user' => 'Administrateur',
                      'locale' => 'fr',
                    },
                  },
                  'windows2019_core-64' => {
                    general: {
                      'platform' => 'windows-2019-64',
                      'packaging_platform' => 'windows-2012-x64',
                      'ruby_arch' => 'x64',
                    },
                    vmpooler: {
                      'template' => 'win-2019-core-x86_64',
                    },
                  },
                  'windows2019_core-6432' => {
                    general: {
                      'platform' => 'windows-2019-64',
                      'packaging_platform' => 'windows-2012-x64',
                      'ruby_arch' => 'x86',
                    },
                    vmpooler: {
                      'template' => 'win-2019-core-x86_64',
                    },
                  },
                  'windows2022-64' => {
                    general: {
                      'platform' => 'windows-2022-64',
                      'packaging_platform' => 'windows-2012-x64',
                      'ruby_arch' => 'x64',
                    },
                    vmpooler: {
                      'template' => 'win-2022-x86_64',
                    },
                  },
                  'windows10ent-32' => {
                    general: {
                      'platform' => 'windows-10ent-32',
                      'packaging_platform' => 'windows-2012-x86',
                      'ruby_arch' => 'x86',
                    },
                    vmpooler: {
                      'template' => 'win-10-ent-i386',
                    },
                  },
                  'windows10ent-64' => {
                    general: {
                      'platform' => 'windows-10ent-64',
                      'packaging_platform' => 'windows-2012-x64',
                      'ruby_arch' => 'x64',
                    },
                    vmpooler: {
                      'template' => 'win-10-ent-x86_64',
                    },
                  },
                  'windows10next-32' => {
                    general: {
                      'platform' => 'windows-10ent-32',
                      'packaging_platform' => 'windows-2012-x86',
                      'ruby_arch' => 'x86',
                    },
                    vmpooler: {
                      'template' => 'win-10-next-i386',
                    },
                  },
                  'windows10next-64' => {
                    general: {
                      'platform' => 'windows-10ent-64',
                      'packaging_platform' => 'windows-2012-x64',
                      'ruby_arch' => 'x64',
                    },
                    vmpooler: {
                      'template' => 'win-10-next-x86_64',
                    },
                  },
                  'windows10pro-64' => {
                    general: {
                      'platform' => 'windows-10pro-64',
                      'packaging_platform' => 'windows-2012-x64',
                      'ruby_arch' => 'x64',
                    },
                    vmpooler: {
                      'template' => 'win-10-pro-x86_64',
                    },
                  },
                  'windows10_1511-64' => {
                    general: {
                      'platform' => 'windows-10ent-64',
                      'packaging_platform' => 'windows-2012-x64',
                      'ruby_arch' => 'x64',
                    },
                    vmpooler: {
                      'template' => 'win-10-1511-x86_64',
                    },
                  },
                  'windows10_1607-64' => {
                    general: {
                      'platform' => 'windows-10ent-64',
                      'packaging_platform' => 'windows-2012-x64',
                      'ruby_arch' => 'x64',
                    },
                    vmpooler: {
                      'template' => 'win-10-1607-x86_64',
                    },
                  },
                  'windows10_1809-64' => {
                    general: {
                      'platform' => 'windows-10ent-64',
                      'packaging_platform' => 'windows-2012-x64',
                      'ruby_arch' => 'x64',
                    },
                    vmpooler: {
                      'template' => 'win-10-1809-x86_64',
                    },
                  },
                  'windows11ent-64' => {
                    general: {
                      'platform' => 'windows-11ent-64',
                      'packaging_platform' => 'windows-2012-x64',
                      'ruby_arch' => 'x64',
                    },
                    vmpooler: {
                      'template' => 'win-11-ent-x86_64',
                    },
                  },
                })

  result['archlinux-64'] = result['archlinuxrolling-64']
  result
end

.osinfo_bhgv1Object



1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
# File 'lib/beaker-hostgenerator/data.rb', line 1008

def osinfo_bhgv1
  {
    'centos7-64' => {
      general: {
        'platform' => 'centos-7-x86_64',
      },
      vmpooler: {
        'template' => 'centos-7-x86_64',
      },
    },
  }
end

.pe_dir(version) ⇒ Object



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/beaker-hostgenerator/data.rb', line 28

def pe_dir(version)
  return if version.nil? || version.empty?

  base_regex = '(\A\d+\.\d+)\.\d+'
  source = case version
           when /#{base_regex}\Z/
             "#{PE_TARBALL_SERVER}/archives/releases/#{version}/"
           when /#{base_regex}-rc\d+\Z/
             "#{PE_TARBALL_SERVER}/archives/internal/%s/"
           when /#{base_regex}-.*(PEZ|pez)_.*/
             "#{PE_TARBALL_SERVER}/%s/feature/ci-ready"
           when /#{base_regex}-.*/
             "#{PE_TARBALL_SERVER}/%s/ci-ready"
           else
             ''
           end

  pe_family = ::Regexp.last_match(1)
  gem_version = Gem::Version.new(pe_family)
  pe_branch = if gem_version < Gem::Version.new("#{MAIN_PE_VERSION}") || version =~ /#{base_regex}-rc\d+\Z/
                pe_family
              else
                'main'
              end

  format(source, ("#{pe_branch}" || ''))
end

.pe_upgrade_versionObject



24
25
26
# File 'lib/beaker-hostgenerator/data.rb', line 24

def pe_upgrade_version
  ENV.fetch('pe_upgrade_version', nil)
end

.pe_versionObject



20
21
22
# File 'lib/beaker-hostgenerator/data.rb', line 20

def pe_version
  ENV.fetch('pe_version', nil)
end