-
Notifications
You must be signed in to change notification settings - Fork 1
/
vercheck.py
executable file
·2070 lines (1816 loc) · 128 KB
/
vercheck.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
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
#!/usr/bin/python3
import re
import sys
import os
import time
import subprocess
import signal
import getopt
import pdb
import weakref
import warnings
import json
import urllib
from datetime import datetime
from threading import Thread, Lock, active_count
from contextlib import contextmanager
from distutils.version import LooseVersion
# external libraries
try:
import urllib3
import yaml
except ImportError as e:
print(f"Please verify that you have the required Python library installed: {e}")
exit(1)
# main class that deals with command lines, reports and everything else
class SCCVersion():
version = '2.3'
build = '20240718'
# static product list (taken from RMT and other sources)
# rmt-cli products list --name "SUSE Linux Enterprise Server" --all
# rmt-cli products list --name "SUSE Linux Enterprise Desktop" --all
# rmt-cli products list --name "openSUSE" --all
product_list = {
1115: {'name': 'SUSE Linux Enterprise Server 12 s390x', 'arch': 's390x', 'identifier': 'cpe:/o:suse:sles:12'},
1116: {'name': 'SUSE Linux Enterprise Server 12 ppc64le', 'arch': 'ppc64le', 'identifier': 'cpe:/o:suse:sles:12'},
1117: {'name': 'SUSE Linux Enterprise Server 12 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sles:12'},
1118: {'name': 'SUSE Linux Enterprise Desktop 12 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sled:12'},
1322: {'name': 'SUSE Linux Enterprise Server 12 SP1 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sles:12:sp1'},
1333: {'name': 'SUSE Linux Enterprise Desktop 12 SP1 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sled:12:sp1'},
1334: {'name': 'SUSE Linux Enterprise Server 12 SP1 ppc64le', 'arch': 'ppc64le', 'identifier': 'cpe:/o:suse:sles:12:sp1'},
1335: {'name': 'SUSE Linux Enterprise Server 12 SP1 s390x', 'arch': 's390x', 'identifier': 'cpe:/o:suse:sles:12:sp1'},
1355: {'name': 'SUSE Linux Enterprise Server 12 SP2 ppc64le', 'arch': 'ppc64le', 'identifier': 'cpe:/o:suse:sles:12:sp2'},
1356: {'name': 'SUSE Linux Enterprise Server 12 SP2 s390x', 'arch': 's390x', 'identifier': 'cpe:/o:suse:sles:12:sp2'},
1357: {'name': 'SUSE Linux Enterprise Server 12 SP2 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sles:12:sp2'},
1375: {'name': 'SUSE Linux Enterprise Server 12 SP2 aarch64', 'arch': 'aarch64', 'identifier': 'cpe:/o:suse:sles:12:sp2'},
1358: {'name': 'SUSE Linux Enterprise Desktop 12 SP2 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sled:12:sp2'},
1421: {'name': 'SUSE Linux Enterprise Server 12 SP3 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sles:12:sp3'},
1422: {'name': 'SUSE Linux Enterprise Server 12 SP3 ppc64le', 'arch': 'ppc64le', 'identifier': 'cpe:/o:suse:sles:12:sp3'},
1423: {'name': 'SUSE Linux Enterprise Server 12 SP3 s390x', 'arch': 's390x', 'identifier': 'cpe:/o:suse:sles:12:sp3'},
1424: {'name': 'SUSE Linux Enterprise Server 12 SP3 aarch64', 'arch': 'aarch64', 'identifier': 'cpe:/o:suse:sles:12:sp3'},
1425: {'name': 'SUSE Linux Enterprise Desktop 12 SP3 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sled:12:sp3'},
1625: {'name': 'SUSE Linux Enterprise Server 12 SP4 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sles:12:sp4'},
1626: {'name': 'SUSE Linux Enterprise Server 12 SP4 ppc64le', 'arch': 'ppc64le', 'identifier': 'cpe:/o:suse:sles:12:sp4'},
1627: {'name': 'SUSE Linux Enterprise Server 12 SP4 s390x', 'arch': 's390x', 'identifier': 'cpe:/o:suse:sles:12:sp4'},
1628: {'name': 'SUSE Linux Enterprise Server 12 SP4 aarch64', 'arch': 'aarch64', 'identifier': 'cpe:/o:suse:sles:12:sp4'},
1629: {'name': 'SUSE Linux Enterprise Desktop 12 SP4 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sled:12:sp4'},
1875: {'name': 'SUSE Linux Enterprise Server 12 SP5 aarch64', 'arch': 'aarch64', 'identifier': 'cpe:/o:suse:sles:12:sp5'},
1876: {'name': 'SUSE Linux Enterprise Server 12 SP5 ppc64le', 'arch': 'ppc64le', 'identifier': 'cpe:/o:suse:sles:12:sp5'},
1877: {'name': 'SUSE Linux Enterprise Server 12 SP5 s390x', 'arch': 's390x', 'identifier': 'cpe:/o:suse:sles:12:sp5'},
1878: {'name': 'SUSE Linux Enterprise Server 12 SP5 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sles:12:sp5'},
1319: {'name': 'SUSE Linux Enterprise Server for SAP Applications 12 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sles_sap:12'},
1346: {'name': 'SUSE Linux Enterprise Server for SAP Applications 12 SP1 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sles_sap:12:sp1'},
1414: {'name': 'SUSE Linux Enterprise Server for SAP Applications 12 SP2 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sles_sap:12:sp2'},
1426: {'name': 'SUSE Linux Enterprise Server for SAP Applications 12 SP3 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sles_sap:12:sp3'},
1437: {'name': 'SUSE Linux Enterprise Server for SAP Applications 12 SP1 ppc64le', 'arch': 'ppc64le', 'identifier': 'cpe:/o:suse:sles_sap:12:sp1'},
1521: {'name': 'SUSE Linux Enterprise Server for SAP Applications 12 SP2 ppc64le', 'arch': 'ppc64le', 'identifier': 'cpe:/o:suse:sles_sap:12:sp2'},
1572: {'name': 'SUSE Linux Enterprise Server for SAP Applications 12 SP3 ppc64le', 'arch': 'ppc64le', 'identifier': 'cpe:/o:suse:sles_sap:12:sp3'},
1754: {'name': 'SUSE Linux Enterprise Server for SAP Applications 12 SP4 ppc64le', 'arch': 'ppc64le', 'identifier': 'cpe:/o:suse:sles_sap:12:sp4'},
1755: {'name': 'SUSE Linux Enterprise Server for SAP Applications 12 SP4 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sles_sap:12:sp4'},
1879: {'name': 'SUSE Linux Enterprise Server for SAP Applications 12 SP5 ppc64le', 'arch': 'ppc64le', 'identifier': 'cpe:/o:suse:sles_sap:12:sp5'},
1880: {'name': 'SUSE Linux Enterprise Server for SAP Applications 12 SP5 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sles_sap:12:sp5'},
1612: {'name': 'SUSE Linux Enterprise Server for SAP Applications 15 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sles_sap:15'},
1613: {'name': 'SUSE Linux Enterprise Server for SAP Applications 15 ppc64le', 'arch': 'ppc64le', 'identifier': 'cpe:/o:suse:sles_sap:15'},
1765: {'name': 'SUSE Linux Enterprise Server for SAP Applications 15 SP1 ppc64le', 'arch': 'ppc64le', 'identifier': 'cpe:/o:suse:sles_sap:15:sp1'},
1766: {'name': 'SUSE Linux Enterprise Server for SAP Applications 15 SP1 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sles_sap:15:sp1'},
1940: {'name': 'SUSE Linux Enterprise Server for SAP Applications 15 SP2 ppc64le', 'arch': 'ppc64le', 'identifier': 'cpe:/o:suse:sles_sap:15:sp2'},
1941: {'name': 'SUSE Linux Enterprise Server for SAP Applications 15 SP2 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sles_sap:15:sp2'},
2135: {'name': 'SUSE Linux Enterprise Server for SAP Applications 15 SP3 ppc64le', 'arch': 'ppc64le', 'identifier': 'cpe:/o:suse:sles_sap:15:sp3'},
2136: {'name': 'SUSE Linux Enterprise Server for SAP Applications 15 SP3 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sles_sap:15:sp3'},
2293: {'name': 'SUSE Linux Enterprise Server for SAP Applications 15 SP4 ppc64le', 'arch': 'ppc64le', 'identifier': 'cpe:/o:suse:sles_sap:15:sp4'},
2294: {'name': 'SUSE Linux Enterprise Server for SAP Applications 15 SP4 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sles_sap:15:sp4'},
2467: {'name': 'SUSE Linux Enterprise Server for SAP Applications 15 SP5 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sles_sap:15:sp5'},
2611: {'name': 'SUSE Linux Enterprise Server for SAP Applications 15 SP6 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sles_sap:15:sp6'},
1575: {'name': 'SUSE Linux Enterprise Server 15 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sles:15'},
1584: {'name': 'SUSE Linux Enterprise Server 15 s390x', 'arch': 's390x', 'identifier': 'cpe:/o:suse:sles:15'},
1585: {'name': 'SUSE Linux Enterprise Server 15 ppc64le', 'arch': 'ppc64le', 'identifier': 'cpe:/o:suse:sles:15'},
1586: {'name': 'SUSE Linux Enterprise Server 15 aarch64', 'arch': 'aarch64', 'identifier': 'cpe:/o:suse:sles:15'},
1609: {'name': 'SUSE Linux Enterprise Desktop 15 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sled:15'},
1760: {'name': 'SUSE Linux Enterprise Server 15 SP1 aarch64', 'arch': 'aarch64', 'identifier': 'cpe:/o:suse:sles:15:sp1'},
1761: {'name': 'SUSE Linux Enterprise Server 15 SP1 ppc64le', 'arch': 'ppc64le', 'identifier': 'cpe:/o:suse:sles:15:sp1'},
1762: {'name': 'SUSE Linux Enterprise Server 15 SP1 s390x', 'arch': 's390x', 'identifier': 'cpe:/o:suse:sles:15:sp1'},
1763: {'name': 'SUSE Linux Enterprise Server 15 SP1 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sles:15:sp1'},
1764: {'name': 'SUSE Linux Enterprise Desktop 15 SP1 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sled:15:sp1'},
1936: {'name': 'SUSE Linux Enterprise Server 15 SP2 aarch64', 'arch': 'aarch64', 'identifier': 'cpe:/o:suse:sles:15:sp2'},
1937: {'name': 'SUSE Linux Enterprise Server 15 SP2 ppc64le', 'arch': 'ppc64le', 'identifier': 'cpe:/o:suse:sles:15:sp2'},
1938: {'name': 'SUSE Linux Enterprise Server 15 SP2 s390x', 'arch': 's390x', 'identifier': 'cpe:/o:suse:sles:15:sp2'},
1939: {'name': 'SUSE Linux Enterprise Server 15 SP2 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sles:15:sp2'},
1935: {'name': 'SUSE Linux Enterprise Desktop 15 SP2 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sled:15:sp2'},
2137: {'name': 'SUSE Linux Enterprise Server 15 SP3 aarch64', 'arch': 'aarch64', 'identifier': 'cpe:/o:suse:sles:15:sp3'},
2138: {'name': 'SUSE Linux Enterprise Server 15 SP3 ppc64le', 'arch': 'ppc64le', 'identifier': 'cpe:/o:suse:sles:15:sp3'},
2139: {'name': 'SUSE Linux Enterprise Server 15 SP3 s390x', 'arch': 's390x', 'identifier': 'cpe:/o:suse:sles:15:sp3'},
2140: {'name': 'SUSE Linux Enterprise Server 15 SP3 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sles:15:sp3'},
2134: {'name': 'SUSE Linux Enterprise Desktop 15 SP3 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sled:15:sp3'},
2289: {'name': 'SUSE Linux Enterprise Server 15 SP4 aarch64', 'arch': 'aarch64', 'identifier': 'cpe:/o:suse:sles:15:sp4'},
2290: {'name': 'SUSE Linux Enterprise Server 15 SP4 ppc64le', 'arch': 'ppc64le', 'identifier': 'cpe:/o:suse:sles:15:sp4'},
2291: {'name': 'SUSE Linux Enterprise Server 15 SP4 s390x', 'arch': 's390x', 'identifier': 'cpe:/o:suse:sles:15:sp4'},
2292: {'name': 'SUSE Linux Enterprise Server 15 SP4 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sles:15:sp4'},
2295: {'name': 'SUSE Linux Enterprise Desktop 15 SP4 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sled:15:sp4'},
2462: {'name': 'SUSE Linux Enterprise Server 15 SP5 aarch64', 'arch': 'aarch64', 'identifier': 'cpe:/o:suse:sles:15:sp5'},
2463: {'name': 'SUSE Linux Enterprise Server 15 SP5 ppc64le', 'arch': 'ppc64le', 'identifier': 'cpe:/o:suse:sles:15:sp5'},
2464: {'name': 'SUSE Linux Enterprise Server 15 SP5 s390x', 'arch': 's390x', 'identifier': 'cpe:/o:suse:sles:15:sp5'},
2465: {'name': 'SUSE Linux Enterprise Server 15 SP5 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sles:15:sp5'},
2468: {'name': 'SUSE Linux Enterprise Desktop 15 SP5 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sled:15:sp5'},
2606: {'name': 'SUSE Linux Enterprise Server 15 SP6 aarch64', 'arch': 'aarch64', 'identifier': 'cpe:/o:suse:sles:15:sp6'},
2607: {'name': 'SUSE Linux Enterprise Server 15 SP6 ppc64le', 'arch': 'ppc64le', 'identifier': 'cpe:/o:suse:sles:15:sp6'},
2608: {'name': 'SUSE Linux Enterprise Server 15 SP6 s390x', 'arch': 's390x', 'identifier': 'cpe:/o:suse:sles:15:sp6'},
2609: {'name': 'SUSE Linux Enterprise Server 15 SP6 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sles:15:sp6'},
2202: {'name': 'SUSE Linux Enterprise Micro 5.0 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sle-micro:5.0'},
2283: {'name': 'SUSE Linux Enterprise Micro 5.1 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sle-micro:5.1'},
2287: {'name': 'SUSE Linux Enterprise Micro 5.1 s390x', 'arch': 's390x', 'identifier': 'cpe:/o:suse:sle-micro:5.1'},
2400: {'name': 'SUSE Linux Enterprise Micro 5.2 s390x', 'arch': 's390x', 'identifier': 'cpe:/o:suse:sle-micro:5.2'},
2401: {'name': 'SUSE Linux Enterprise Micro 5.2 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sle-micro:5.2'},
2427: {'name': 'SUSE Linux Enterprise Micro 5.3 s390x', 'arch': 's390x', 'identifier': 'cpe:/o:suse:sle-micro:5.3'},
2428: {'name': 'SUSE Linux Enterprise Micro 5.3 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sle-micro:5.3'},
2573: {'name': 'SUSE Linux Enterprise Micro 5.4 s390x', 'arch': 's390x', 'identifier': 'cpe:/o:suse:sle-micro:5.4'},
2574: {'name': 'SUSE Linux Enterprise Micro 5.4 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sle-micro:5.4'},
2605: {'name': 'SUSE Linux Enterprise Micro 5.5 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sle-micro:5.5'},
2699: {'name': 'SUSE Linux Micro 6.0 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:suse:sle-micro:6.0'},
1929: {'name': 'openSUSE Leap 15.1 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:opensuse:leap:15.1'},
2001: {'name': 'openSUSE Leap 15.2 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:opensuse:leap:15.2'},
2233: {'name': 'openSUSE Leap 15.3 aarch64', 'arch': 'aarch64', 'identifier': 'cpe:/o:opensuse:leap:15.3'},
2234: {'name': 'openSUSE Leap 15.3 ppc64le', 'arch': 'ppc64le', 'identifier': 'cpe:/o:opensuse:leap:15.3'},
2235: {'name': 'openSUSE Leap 15.3 s390x', 'arch': 's390x', 'identifier': 'cpe:/o:opensuse:leap:15.3'},
2236: {'name': 'openSUSE Leap 15.3 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:opensuse:leap:15.3'},
2406: {'name': 'openSUSE Leap 15.4 aarch64', 'arch': 'aarch64', 'identifier': 'cpe:/o:opensuse:leap:15.4'},
2407: {'name': 'openSUSE Leap 15.4 ppc64le', 'arch': 'ppc64le', 'identifier': 'cpe:/o:opensuse:leap:15.4'},
2408: {'name': 'openSUSE Leap 15.4 s390x', 'arch': 's390x', 'identifier': 'cpe:/o:opensuse:leap:15.4'},
2409: {'name': 'openSUSE Leap 15.4 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:opensuse:leap:15.4'},
2585: {'name': 'openSUSE Leap 15.5 aarch64', 'arch': 'aarch64', 'identifier': 'cpe:/o:opensuse:leap:15.5'},
2586: {'name': 'openSUSE Leap 15.5 ppc64le', 'arch': 'ppc64le', 'identifier': 'cpe:/o:opensuse:leap:15.5'},
2587: {'name': 'openSUSE Leap 15.5 s390x', 'arch': 's390x', 'identifier': 'cpe:/o:opensuse:leap:15.5'},
2588: {'name': 'openSUSE Leap 15.5 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:opensuse:leap:15.5'},
2731: {'name': 'openSUSE Leap 15.6 aarch64', 'arch': 'aarch64', 'identifier': 'cpe:/o:opensuse:leap:15.6'},
2732: {'name': 'openSUSE Leap 15.6 ppc64le', 'arch': 'ppc64le', 'identifier': 'cpe:/o:opensuse:leap:15.6'},
2733: {'name': 'openSUSE Leap 15.6 s390x', 'arch': 's390x', 'identifier': 'cpe:/o:opensuse:leap:15.6'},
2734: {'name': 'openSUSE Leap 15.6 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:opensuse:leap:15.6'},
2520: {'name': 'openSUSE Leap Micro 5.2 aarch64', 'arch': 'aarch64', 'identifier': 'cpe:/o:opensuse:leap-micro:5.2'},
2521: {'name': 'openSUSE Leap Micro 5.2 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:opensuse:leap-micro:5.2'},
2563: {'name': 'openSUSE Leap Micro 5.3 aarch64', 'arch': 'aarch64', 'identifier': 'cpe:/o:opensuse:leap-micro:5.3'},
2564: {'name': 'openSUSE Leap Micro 5.3 x86_64', 'arch': 'x86_64', 'identifier': 'cpe:/o:opensuse:leap-micro:5.3'},
}
# all known module IDs, and corresponding product IDs (from RMT)
# modules: rmt-cli products list --all --csv | grep '15 SPx' | grep x86_64 | egrep -v 'Debuginfo|Sources' | egrep -i 'Module|PackageHub'
# related products: rmt-cli products list --all --csv | grep '15 SPx' | grep x86_64 | egrep -v 'Debuginfo|Sources' | egrep -iv 'Module|PackageHub'
sle_modules_by_product_list = {
1522: {'name': 'HPC Module 12 aarch64', 'edition': '12', 'architecture': 'aarch64', 'products': [1375, 1424, 1628, 1875]},
1539: {'name': 'Web and Scripting Module 12 aarch64', 'edition': '12', 'architecture': 'aarch64', 'products': [1375, 1424, 1628, 1875]},
1528: {'name': 'Public Cloud Module 12 aarch64', 'edition': '12', 'architecture': 'aarch64', 'products': [1375, 1424, 1628, 1875]},
1376: {'name': 'Toolchain Module 12 aarch64', 'edition': '12', 'architecture': 'aarch64', 'products': [1375, 1424, 1628, 1875]},
1148: {'name': 'Legacy Module 12 ppc64le', 'edition': '12', 'architecture': 'ppc64le', 'products': [1116]},
1151: {'name': 'Web and Scripting Module 12 ppc64le', 'edition': '12', 'architecture': 'ppc64le', 'products': [1116]},
1218: {'name': 'Public Cloud Module 12 ppc64le', 'edition': '12', 'architecture': 'ppc64le', 'products': [1116]},
1294: {'name': 'Advanced Systems Management Module 12 ppc64le', 'edition': '12', 'architecture': 'ppc64le', 'products': [1116]},
1339: {'name': 'Toolchain Module 12 ppc64le', 'edition': '12', 'architecture': 'ppc64le', 'products': [1116]},
1353: {'name': 'Containers Module 12 ppc64le', 'edition': '12', 'architecture': 'ppc64le', 'products': [1116]},
1367: {'name': 'Certifications Module 12 ppc64le', 'edition': '12', 'architecture': 'ppc64le', 'products': [1116]},
1149: {'name': 'Legacy Module 12 s390x', 'edition': '12', 'architecture': 's390x', 'products': [1115]},
1152: {'name': 'Web and Scripting Module 12 s390x', 'edition': '12', 'architecture': 's390x', 'products': [1115]},
1295: {'name': 'Advanced Systems Management Module 12 s390x', 'edition': '12', 'architecture': 's390x', 'products': [1115]},
1340: {'name': 'Toolchain Module 12 s390x', 'edition': '12', 'architecture': 's390x', 'products': [1115]},
1354: {'name': 'Containers Module 12 s390x', 'edition': '12', 'architecture': 's390x', 'products': [1115]},
1367: {'name': 'Certifications Module 12 s390x', 'edition': '12', 'architecture': 's390x', 'products': [1115]},
1474: {'name': 'SUSE Package Hub 12 s390x', 'edition': '12', 'architecture': 's390x', 'products': [1115]},
1477: {'name': 'SUSE Package Hub 12 SP1 s390x', 'edition': '12 SP1', 'architecture': 's390x', 'products': [1335]},
1480: {'name': 'SUSE Package Hub 12 SP2 s390x', 'edition': '12 SP2', 'architecture': 's390x', 'products': [1356]},
1530: {'name': 'SUSE Package Hub 12 SP3 s390x', 'edition': '12 SP3', 'architecture': 's390x', 'products': [1423]},
1812: {'name': 'SUSE Package Hub 12 SP4 s390x', 'edition': '12 SP4', 'architecture': 's390x', 'products': [1627]},
1914: {'name': 'SUSE Package Hub 12 SP5 s390x', 'edition': '12 SP5', 'architecture': 's390x', 'products': [1877]},
1150: {'name': 'Legacy Module 12 x86_64', 'edition': '12', 'architecture': 'x86_64', 'products': [1117, 1118, 1319]},
1153: {'name': 'Web and Scripting Module 12 x86_64', 'edition': '12', 'architecture': 'x86_64', 'products': [1117, 1118, 1319]},
1212: {'name': 'Advanced Systems Management Module 12 x86_64', 'edition': '12', 'architecture': 'x86_64', 'products': [1117, 1118, 1319]},
1220: {'name': 'Public Cloud Module 12 x86_64', 'edition': '12', 'architecture': 'x86_64', 'products': [1117, 1118, 1319]},
1332: {'name': 'Containers Module 12 x86_64', 'edition': '12', 'architecture': 'x86_64', 'products': [1117, 1118, 1319]},
1341: {'name': 'Toolchain Module 12 x86_64', 'edition': '12', 'architecture': 'x86_64', 'products': [1117, 1118, 1319]},
1368: {'name': 'Certifications Module 12 x86_64', 'edition': '12', 'architecture': 'x86_64', 'products': [1117, 1118, 1319]},
1440: {'name': 'HPC Module 12 x86_64', 'edition': '12', 'architecture': 'x86_64', 'products': [1117, 1118, 1319]},
1473: {'name': 'SUSE Package Hub 12 x86_64', 'edition': '12', 'architecture': 'x86_64', 'products': [1117, 1118, 1319]},
1476: {'name': 'SUSE Package Hub 12 SP1 x86_64', 'edition': '12 SP1', 'architecture': 'x86_64', 'products': [1333, 1322, 1346]},
1479: {'name': 'SUSE Package Hub 12 SP2 x86_64', 'edition': '12 SP2', 'architecture': 'x86_64', 'products': [1358, 1749, 1438, 1357]},
1529: {'name': 'SUSE Package Hub 12 SP3 x86_64', 'edition': '12 SP3', 'architecture': 'x86_64', 'products': [1425, 1751, 1619, 1421, 1426]},
1813: {'name': 'SUSE Package Hub 12 SP4 x86_64', 'edition': '12 SP4', 'architecture': 'x86_64', 'products': [1629, 1759, 1924, 1625, 1755, 2117]},
1915: {'name': 'SUSE Package Hub 12 SP5 x86_64', 'edition': '12 SP5', 'architecture': 'x86_64', 'products': [2020, 1873, 2006, 1878, 1880]},
1587: {'name': 'Basesystem Module 15 s390x', 'edition': '15', 'architecture': 's390x', 'products': [1584]},
1593: {'name': 'Desktop Applications Module 15 s390x', 'edition': '15', 'architecture': 's390x', 'products': [1584]},
1596: {'name': 'Development Tools Module 15 s390x', 'edition': '15', 'architecture': 's390x', 'products': [1584]},
1599: {'name': 'Server Applications Module 15 s390x', 'edition': '15', 'architecture': 's390x', 'products': [1584]},
1602: {'name': 'Legacy Module 15 s390x', 'edition': '15', 'architecture': 's390x', 'products': [1584]},
1641: {'name': 'Containers Module 15 s390x', 'edition': '15', 'architecture': 's390x', 'products': [1584]},
1646: {'name': 'Public Cloud Module 15 s390x', 'edition': '15', 'architecture': 's390x', 'products': [1584]},
1720: {'name': 'Web and Scripting Module 15 s390x', 'edition': '15', 'architecture': 's390x', 'products': [1584]},
1742: {'name': 'SUSE Package Hub 15 s390x', 'edition': '15', 'architecture': 's390x', 'products': [1584]},
1589: {'name': 'Basesystem Module 15 aarch64', 'edition': '15', 'architecture': 'aarch64', 'products': [1586]},
1595: {'name': 'Desktop Applications Module 15 aarch64', 'edition': '15', 'architecture': 'aarch64', 'products': [1586]},
1598: {'name': 'Development Tools Module 15 aarch64', 'edition': '15', 'architecture': 'aarch64', 'products': [1586]},
1601: {'name': 'Server Applications Module 15 aarch64', 'edition': '15', 'architecture': 'aarch64', 'products': [1586]},
1604: {'name': 'Legacy Module 15 aarch64', 'edition': '15', 'architecture': 'aarch64', 'products': [1586]},
1645: {'name': 'Public Cloud Module 15 aarch64', 'edition': '15', 'architecture': 'aarch64', 'products': [1586]},
1718: {'name': 'Web and Scripting Module 15 aarch64', 'edition': '15', 'architecture': 'aarch64', 'products': [1586]},
1733: {'name': 'HPC Module 15 aarch64', 'edition': '15', 'architecture': 'aarch64', 'products': [1586]},
1740: {'name': 'SUSE Package Hub 15 aarch64', 'edition': '15', 'architecture': 'aarch64', 'products': [1586]},
1576: {'name': 'Basesystem Module 15 x86_64', 'edition': '15', 'architecture': 'x86_64', 'products': [1612, 1575, 1609, 1732, 2056]},
1578: {'name': 'Desktop Applications Module 15 x86_64', 'edition': '15', 'architecture': 'x86_64', 'products': [1612, 1575, 1609, 1732, 2056]},
1579: {'name': 'Development Tools Module 15 x86_64', 'edition': '15', 'architecture': 'x86_64', 'products': [1612, 1575, 1609, 1732, 2056]},
1580: {'name': 'Server Applications Module 15 x86_64', 'edition': '15', 'architecture': 'x86_64', 'products': [1612, 1575, 1609, 1732, 2056]},
1581: {'name': 'Legacy Module 15 x86_64', 'edition': '15', 'architecture': 'x86_64', 'products': [1612, 1575, 1609, 1732, 2056]},
1611: {'name': 'Public Cloud Module 15 x86_64', 'edition': '15', 'architecture': 'x86_64', 'products': [1612, 1575, 1609, 1732, 2056]},
1642: {'name': 'Containers Module 15 x86_64', 'edition': '15', 'architecture': 'x86_64', 'products': [1612, 1575, 1609, 1732, 2056]},
1721: {'name': 'Web and Scripting Module 15 x86_64', 'edition': '15', 'architecture': 'x86_64', 'products': [1612, 1575, 1609, 1732, 2056]},
1734: {'name': 'HPC Module 15 x86_64', 'edition': '15', 'architecture': 'x86_64', 'products': [1612, 1575, 1609, 1732, 2056]},
2131: {'name': 'NVIDIA Compute Module 15 x86_64', 'edition': '15', 'architecture': 'x86_64', 'products': [1612, 1575, 1609, 1732, 2056]},
1727: {'name': 'SAP Applications Module 15 x86_64', 'edition': '15', 'architecture': 'x86_64', 'products': [1612, 1575, 1609, 1732, 2056]},
1728: {'name': 'SUSE Cloud Application Platform Tools Module 15 x86_64', 'edition': '15', 'architecture': 'x86_64', 'products': [1612, 1575, 1609, 1732, 2056]},
1743: {'name': 'SUSE Package Hub 15 x86_64', 'edition': '15', 'architecture': 'x86_64', 'products': [1612, 1575, 1609, 1732, 2056]},
1771: {'name': 'Basesystem Module 15 SP1 s390x', 'edition': '15 SP1', 'architecture': 's390x', 'products': [1762]},
1775: {'name': 'Desktop Applications Module 15 SP1 s390x', 'edition': '15 SP1', 'architecture': 's390x', 'products': [1762]},
1779: {'name': 'Server Applications Module 15 SP1 s390x', 'edition': '15 SP1', 'architecture': 's390x', 'products': [1762]},
1789: {'name': 'Containers Module 15 SP1 s390x', 'edition': '15 SP1', 'architecture': 's390x', 'products': [1762]},
1793: {'name': 'Development Tools Module 15 SP1 s390x', 'edition': '15 SP1', 'architecture': 's390x', 'products': [1762]},
1797: {'name': 'Web and Scripting Module 15 SP1 s390x', 'edition': '15 SP1', 'architecture': 's390x', 'products': [1762]},
1803: {'name': 'Legacy Module 15 SP1 s390x', 'edition': '15 SP1', 'architecture': 's390x', 'products': [1762]},
1807: {'name': 'Public Cloud Module 15 SP1 s390x', 'edition': '15 SP1', 'architecture': 's390x', 'products': [1762]},
1824: {'name': 'Transactional Server Module 15 SP1 s390x', 'edition': '15 SP1', 'architecture': 's390x', 'products': [1762]},
1866: {'name': 'Python 2 Module 15 SP1 s390x', 'edition': '15 SP1', 'architecture': 's390x', 'products': [1762]},
1870: {'name': 'SUSE Package Hub 15 SP1 s390x', 'edition': '15 SP1', 'architecture': 's390x', 'products': [1762]},
1769: {'name': 'Basesystem Module 15 SP1 aarch64', 'edition': '15 SP1', 'architecture': 'aarch64', 'products': [1760]},
1773: {'name': 'Desktop Applications Module 15 SP1 aarch64', 'edition': '15 SP1', 'architecture': 'aarch64', 'products': [1760]},
1777: {'name': 'Server Applications Module 15 SP1 aarch64', 'edition': '15 SP1', 'architecture': 'aarch64', 'products': [1760]},
1920: {'name': 'Containers Module 15 SP1 aarch64', 'edition': '15 SP1', 'architecture': 'aarch64', 'products': [1760]},
1791: {'name': 'Development Tools Module 15 SP1 aarch64', 'edition': '15 SP1', 'architecture': 'aarch64', 'products': [1760]},
1795: {'name': 'Web and Scripting Module 15 SP1 aarch64', 'edition': '15 SP1', 'architecture': 'aarch64', 'products': [1760]},
1801: {'name': 'Legacy Module 15 SP1 aarch64', 'edition': '15 SP1', 'architecture': 'aarch64', 'products': [1760]},
1805: {'name': 'Public Cloud Module 15 SP1 aarch64', 'edition': '15 SP1', 'architecture': 'aarch64', 'products': [1760]},
1822: {'name': 'Transactional Server Module 15 SP1 aarch64', 'edition': '15 SP1', 'architecture': 'aarch64', 'products': [1760]},
1864: {'name': 'Python 2 Module 15 SP1 aarch64', 'edition': '15 SP1', 'architecture': 'aarch64', 'products': [1760]},
1799: {'name': 'HPC Module 15 SP1 aarch64', 'edition': '15 SP1', 'architecture': 'aarch64', 'products': [1760]},
1868: {'name': 'SUSE Package Hub 15 SP1 aarch64', 'edition': '15 SP1', 'architecture': 'aarch64', 'products': [1760]},
1772: {'name': 'Basesystem Module 15 SP1 x86_64', 'edition': '15 SP1', 'architecture': 'x86_64', 'products': [1766, 1763, 1764, 1768, 1861]},
1776: {'name': 'Desktop Applications Module 15 SP1 x86_64', 'edition': '15 SP1', 'architecture': 'x86_64', 'products': [1766, 1763, 1764, 1768, 1861]},
1790: {'name': 'Containers Module 15 SP1 x86_64', 'edition': '15 SP1', 'architecture': 'x86_64', 'products': [1766, 1763, 1764, 1768, 1861]},
1794: {'name': 'Development Tools Module 15 SP1 x86_64', 'edition': '15 SP1', 'architecture': 'x86_64', 'products': [1766, 1763, 1764, 1768, 1861]},
1780: {'name': 'Server Applications Module 15 SP1 x86_64', 'edition': '15 SP1', 'architecture': 'x86_64', 'products': [1766, 1763, 1764, 1768, 1861]},
1798: {'name': 'Web and Scripting Module 15 SP1 x86_64', 'edition': '15 SP1', 'architecture': 'x86_64', 'products': [1766, 1763, 1764, 1768, 1861]},
1800: {'name': 'HPC Module 15 SP1 x86_64', 'edition': '15 SP1', 'architecture': 'x86_64', 'products': [1766, 1763, 1764, 1768, 1861]},
1804: {'name': 'Legacy Module 15 SP1 x86_64', 'edition': '15 SP1', 'architecture': 'x86_64', 'products': [1766, 1763, 1764, 1768, 1861]},
1808: {'name': 'Public Cloud Module 15 SP1 x86_64', 'edition': '15 SP1', 'architecture': 'x86_64', 'products': [1766, 1763, 1764, 1768, 1861]},
1809: {'name': 'SUSE Cloud Application Platform Tools Module 15 SP1 x86_64', 'edition': '15 SP1', 'architecture': 'x86_64', 'products': [1766, 1763, 1764, 1768, 1861]},
1825: {'name': 'Transactional Server Module 15 SP1 x86_64', 'edition': '15 SP1', 'architecture': 'x86_64', 'products': [1766, 1763, 1764, 1768, 1861]},
1867: {'name': 'Python 2 Module 15 SP1 x86_64', 'edition': '15 SP1', 'architecture': 'x86_64', 'products': [1766, 1763, 1764, 1768, 1861]},
1787: {'name': 'SAP Applications Module 15 SP1 x86_64', 'edition': '15 SP1', 'architecture': 'x86_64', 'products': [1766, 1763, 1764, 1768, 1861]},
1862: {'name': 'SUSE Real Time Module 15 SP1 x86_64', 'edition': '15 SP1', 'architecture': 'x86_64', 'products': [1766, 1763, 1764, 1768, 1861]},
1871: {'name': 'SUSE Package Hub 15 SP1 x86_64', 'edition': '15 SP1', 'architecture': 'x86_64', 'products': [1766, 1763, 1764, 1768, 1861]},
1945: {'name': 'Basesystem Module 15 SP2 s390x', 'edition': '15 SP2', 'architecture': 's390x', 'products': [1938]},
1962: {'name': 'Containers Module 15 SP2 s390x', 'edition': '15 SP2', 'architecture': 's390x', 'products': [1938]},
1966: {'name': 'Desktop Applications Module 15 SP2 s390x', 'edition': '15 SP2', 'architecture': 's390x', 'products': [1938]},
1970: {'name': 'Development Tools Module 15 SP2 s390x', 'edition': '15 SP2', 'architecture': 's390x', 'products': [1938]},
1981: {'name': 'Legacy Module 15 SP2 s390x', 'edition': '15 SP2', 'architecture': 's390x', 'products': [1938]},
1987: {'name': 'Public Cloud Module 15 SP2 s390x', 'edition': '15 SP2', 'architecture': 's390x', 'products': [1938]},
1991: {'name': 'Python 2 Module 15 SP2 s390x', 'edition': '15 SP2', 'architecture': 's390x', 'products': [1938]},
1954: {'name': 'Server Applications Module 15 SP2 s390x', 'edition': '15 SP2', 'architecture': 's390x', 'products': [1938]},
1975: {'name': 'Web and Scripting Module 15 SP2 s390x', 'edition': '15 SP2', 'architecture': 's390x', 'products': [1938]},
1997: {'name': 'Transactional Server Module 15 SP2 s390x', 'edition': '15 SP2', 'architecture': 's390x', 'products': [1938]},
1949: {'name': 'SUSE Package Hub 15 SP2 s390x', 'edition': '15 SP2', 'architecture': 's390x', 'products': [1938]},
1943: {'name': 'Basesystem Module 15 SP2 aarch64', 'edition': '15 SP2', 'architecture': 'aarch64', 'products': [1936]},
1964: {'name': 'Desktop Applications Module 15 SP2 aarch64', 'edition': '15 SP2', 'architecture': 'aarch64', 'products': [1936]},
1952: {'name': 'Server Applications Module 15 SP2 aarch64', 'edition': '15 SP2', 'architecture': 'aarch64', 'products': [1936]},
1960: {'name': 'Containers Module 15 SP2 aarch64', 'edition': '15 SP2', 'architecture': 'aarch64', 'products': [1936]},
1968: {'name': 'Development Tools Module 15 SP2 aarch64', 'edition': '15 SP2', 'architecture': 'aarch64', 'products': [1936]},
1973: {'name': 'Web and Scripting Module 15 SP2 aarch64', 'edition': '15 SP2', 'architecture': 'aarch64', 'products': [1936]},
1979: {'name': 'Legacy Module 15 SP2 aarch64', 'edition': '15 SP2', 'architecture': 'aarch64', 'products': [1936]},
1985: {'name': 'Public Cloud Module 15 SP2 aarch64', 'edition': '15 SP2', 'architecture': 'aarch64', 'products': [1936]},
1995: {'name': 'Transactional Server Module 15 SP2 aarch64', 'edition': '15 SP2', 'architecture': 'aarch64', 'products': [1936]},
1989: {'name': 'Python 2 Module 15 SP2 aarch64', 'edition': '15 SP2', 'architecture': 'aarch64', 'products': [1936]},
1933: {'name': 'HPC Module 15 SP2 aarch64', 'edition': '15 SP2', 'architecture': 'aarch64', 'products': [1936]},
1947: {'name': 'SUSE Package Hub 15 SP2 aarch64', 'edition': '15 SP2', 'architecture': 'aarch64', 'products': [1936]},
1946: {'name': 'Basesystem Module 15 SP2 x86_64', 'edition': '15 SP2', 'architecture': 'x86_64', 'products': [1941, 1939, 1935, 1934, 2003]},
1955: {'name': 'Server Applications Module 15 SP2 x86_64', 'edition': '15 SP2', 'architecture': 'x86_64', 'products': [1941, 1939, 1935, 1934, 2003]},
1963: {'name': 'Containers Module 15 SP2 x86_64', 'edition': '15 SP2', 'architecture': 'x86_64', 'products': [1941, 1939, 1935, 1934, 2003]},
1967: {'name': 'Desktop Applications Module 15 SP2 x86_64', 'edition': '15 SP2', 'architecture': 'x86_64', 'products': [1941, 1939, 1935, 1934, 2003]},
1971: {'name': 'Development Tools Module 15 SP2 x86_64', 'edition': '15 SP2', 'architecture': 'x86_64', 'products': [1941, 1939, 1935, 1934, 2003]},
1976: {'name': 'Web and Scripting Module 15 SP2 x86_64', 'edition': '15 SP2', 'architecture': 'x86_64', 'products': [1941, 1939, 1935, 1934, 2003]},
1978: {'name': 'HPC Module 15 SP2 x86_64', 'edition': '15 SP2', 'architecture': 'x86_64', 'products': [1941, 1939, 1935, 1934, 2003]},
1982: {'name': 'Legacy Module 15 SP2 x86_64', 'edition': '15 SP2', 'architecture': 'x86_64', 'products': [1941, 1939, 1935, 1934, 2003]},
1988: {'name': 'Public Cloud Module 15 SP2 x86_64', 'edition': '15 SP2', 'architecture': 'x86_64', 'products': [1941, 1939, 1935, 1934, 2003]},
1992: {'name': 'Python 2 Module 15 SP2 x86_64', 'edition': '15 SP2', 'architecture': 'x86_64', 'products': [1941, 1939, 1935, 1934, 2003]},
1998: {'name': 'Transactional Server Module 15 SP2 x86_64', 'edition': '15 SP2', 'architecture': 'x86_64', 'products': [1941, 1939, 1935, 1934, 2003]},
2075: {'name': 'SUSE Cloud Application Platform Tools Module 15 SP2 x86_64', 'edition': '15 SP2', 'architecture': 'x86_64', 'products': [1941, 1939, 1935, 1934, 2003]},
1994: {'name': 'SAP Applications Module 15 SP2 x86_64', 'edition': '15 SP2', 'architecture': 'x86_64', 'products': [1941, 1939, 1935, 1934, 2003]},
2005: {'name': 'SUSE Real Time Module 15 SP2 x86_64', 'edition': '15 SP2', 'architecture': 'x86_64', 'products': [1941, 1939, 1935, 1934, 2003]},
1950: {'name': 'SUSE Package Hub 15 SP2 x86_64', 'edition': '15 SP2', 'architecture': 'x86_64', 'products': [1941, 1939, 1935, 1934, 2003]},
2144: {'name': 'Basesystem Module 15 SP3 s390x', 'edition': '15 SP3', 'architecture': 's390x', 'products': [2139]},
2148: {'name': 'Desktop Applications Module 15 SP3 s390x', 'edition': '15 SP3', 'architecture': 's390x', 'products': [2139]},
2152: {'name': 'Server Applications Module 15 SP3 s390x', 'edition': '15 SP3', 'architecture': 's390x', 'products': [2139]},
2156: {'name': 'Containers Module 15 SP3 s390x', 'edition': '15 SP3', 'architecture': 's390x', 'products': [2139]},
2388: {'name': 'Certifications Module 15 SP3 s390x', 'edition': '15 SP3', 'architecture': 's390x', 'products': [2139]},
2160: {'name': 'Development Tools Module 15 SP3 s390x', 'edition': '15 SP3', 'architecture': 's390x', 'products': [2139]},
2164: {'name': 'Web and Scripting Module 15 SP3 s390x', 'edition': '15 SP3', 'architecture': 's390x', 'products': [2139]},
2170: {'name': 'Legacy Module 15 SP3 s390x', 'edition': '15 SP3', 'architecture': 's390x', 'products': [2139]},
2174: {'name': 'Public Cloud Module 15 SP3 s390x', 'edition': '15 SP3', 'architecture': 's390x', 'products': [2139]},
2179: {'name': 'Transactional Server Module 15 SP3 s390x', 'edition': '15 SP3', 'architecture': 's390x', 'products': [2139]},
2183: {'name': 'Python 2 Module 15 SP3 s390x', 'edition': '15 SP3', 'architecture': 's390x', 'products': [2139]},
2190: {'name': 'SUSE Package Hub 15 SP3 s390x', 'edition': '15 SP3', 'architecture': 's390x', 'products': [2139]},
2142: {'name': 'Basesystem Module 15 SP3 aarch64', 'edition': '15 SP3', 'architecture': 'aarch64', 'products': [2137]},
2146: {'name': 'Desktop Applications Module 15 SP3 aarch64', 'edition': '15 SP3', 'architecture': 'aarch64', 'products': [2137]},
2150: {'name': 'Server Applications Module 15 SP3 aarch64', 'edition': '15 SP3', 'architecture': 'aarch64', 'products': [2137]},
2154: {'name': 'Containers Module 15 SP3 aarch64', 'edition': '15 SP3', 'architecture': 'aarch64', 'products': [2137]},
2158: {'name': 'Development Tools Module 15 SP3 aarch64', 'edition': '15 SP3', 'architecture': 'aarch64', 'products': [2137]},
2164: {'name': 'Web and Scripting Module 15 SP3 aarch64', 'edition': '15 SP3', 'architecture': 'aarch64', 'products': [2137]},
2168: {'name': 'Legacy Module 15 SP3 aarch64', 'edition': '15 SP3', 'architecture': 'aarch64', 'products': [2137]},
2172: {'name': 'Public Cloud Module 15 SP3 aarch64', 'edition': '15 SP3', 'architecture': 'aarch64', 'products': [2137]},
2177: {'name': 'Transactional Server Module 15 SP3 aarch64', 'edition': '15 SP3', 'architecture': 'aarch64', 'products': [2137]},
2181: {'name': 'Python 2 Module 15 SP3 aarch64', 'edition': '15 SP3', 'architecture': 'aarch64', 'products': [2137]},
2166: {'name': 'HPC Module 15 SP3 aarch64', 'edition': '15 SP3', 'architecture': 'aarch64', 'products': [2137]},
2386: {'name': 'Certifications Module 15 SP3 aarch64', 'edition': '15 SP3', 'architecture': 'aarch64', 'products': [2137]},
2188: {'name': 'SUSE Package Hub 15 SP3 aarch64', 'edition': '15 SP3', 'architecture': 'aarch64', 'products': [2137]},
2143: {'name': 'Basesystem Module 15 SP3 ppc64le', 'edition': '15 SP3', 'architecture': 'ppc64le', 'products': [2138]},
2147: {'name': 'Desktop Applications Module 15 SP3 ppc64le', 'edition': '15 SP3', 'architecture': 'ppc64le', 'products': [2138]},
2151: {'name': 'Server Applications Module 15 SP3 ppc64le', 'edition': '15 SP3', 'architecture': 'ppc64le', 'products': [2138]},
2155: {'name': 'Containers Module 15 SP3 ppc64le', 'edition': '15 SP3', 'architecture': 'ppc64le', 'products': [2138]},
2159: {'name': 'Development Tools Module 15 SP3 ppc64le', 'edition': '15 SP3', 'architecture': 'ppc64le', 'products': [2138]},
2163: {'name': 'Web and Scripting Module 15 SP3 ppc64le', 'edition': '15 SP3', 'architecture': 'ppc64le', 'products': [2138]},
2169: {'name': 'Legacy Module 15 SP3 ppc64le', 'edition': '15 SP3', 'architecture': 'ppc64le', 'products': [2138]},
2173: {'name': 'Public Cloud Module 15 SP3 ppc64le', 'edition': '15 SP3', 'architecture': 'ppc64le', 'products': [2138]},
2178: {'name': 'Transactional Server Module 15 SP3 ppc64le', 'edition': '15 SP3', 'architecture': 'ppc64le', 'products': [2138]},
2182: {'name': 'Python 2 Module 15 SP3 ppc64le', 'edition': '15 SP3', 'architecture': 'ppc64le', 'products': [2138]},
2387: {'name': 'Certifications Module 15 SP3 ppc64le', 'edition': '15 SP3', 'architecture': 'ppc64le', 'products': [2138]},
2189: {'name': 'SUSE Package Hub 15 SP3 ppc64le', 'edition': '15 SP3', 'architecture': 'ppc64le', 'products': [2138]},
2145: {'name': 'Basesystem Module 15 SP3 x86_64', 'edition': '15 SP3', 'architecture': 'x86_64', 'products': [2136, 2140, 2134, 2133, 2285]},
2389: {'name': 'Certifications Module 15 SP3 x86_64', 'edition': '15 SP3', 'architecture': 'x86_64', 'products': [2136, 2140, 2134, 2285]},
2149: {'name': 'Desktop Applications Module 15 SP3 x86_64', 'edition': '15 SP3', 'architecture': 'x86_64', 'products': [2136, 2140, 2134, 2285]},
2153: {'name': 'Server Applications Module 15 SP3 x86_64', 'edition': '15 SP3', 'architecture': 'x86_64', 'products': [2136, 2140, 2134, 2285]},
2157: {'name': 'Containers Module 15 SP3 x86_64', 'edition': '15 SP3', 'architecture': 'x86_64', 'products': [2136, 2140, 2134, 2285]},
2161: {'name': 'Development Tools Module 15 SP3 x86_64', 'edition': '15 SP3', 'architecture': 'x86_64', 'products': [2136, 2140, 2134, 2285]},
2165: {'name': 'Web and Scripting Module 15 SP3 x86_64', 'edition': '15 SP3', 'architecture': 'x86_64', 'products': [2136, 2140, 2134, 2285]},
2167: {'name': 'HPC Module 15 SP3 x86_64', 'edition': '15 SP3', 'architecture': 'x86_64', 'products': [2136, 2140, 2134, 2285]},
2171: {'name': 'Legacy Module 15 SP3 x86_64', 'edition': '15 SP3', 'architecture': 'x86_64', 'products': [2136, 2140, 2134, 2285]},
2175: {'name': 'Public Cloud Module 15 SP3 x86_64', 'edition': '15 SP3', 'architecture': 'x86_64', 'products': [2136, 2140, 2134, 2285]},
2180: {'name': 'Transactional Server Module 15 SP3 x86_64', 'edition': '15 SP3', 'architecture': 'x86_64', 'products': [2136, 2140, 2134, 2285]},
2184: {'name': 'Python 2 Module 15 SP3 x86_64', 'edition': '15 SP3', 'architecture': 'x86_64', 'products': [2136, 2140, 2134, 2285]},
2198: {'name': 'SAP Applications Module 15 SP3 x86_64', 'edition': '15 SP3', 'architecture': 'x86_64', 'products': [2136, 2140, 2134, 2285]},
2176: {'name': 'SUSE Cloud Application Platform Tools Module 15 SP3 x86_64', 'edition': '15 SP3', 'architecture': 'x86_64', 'products': [2136, 2140, 2134, 2285]},
2286: {'name': 'SUSE Real Time Module 15 SP3 x86_64', 'edition': '15 SP3', 'architecture': 'x86_64', 'products': [2136, 2140, 2134, 2285]},
2191: {'name': 'SUSE Package Hub 15 SP3 x86_64', 'edition': '15 SP3', 'architecture': 'x86_64', 'products': [2136, 2140, 2134, 2285]},
2297: {'name': 'Basesystem Module 15 SP4 ppc64le', 'edition': '15 SP4', 'architecture': 'ppc64le', 'products': [2290]},
2301: {'name': 'Desktop Applications Module 15 SP4 ppc64le', 'edition': '15 SP4', 'architecture': 'ppc64le', 'products': [2290]},
2305: {'name': 'Server Applications Module 15 SP4 ppc64le', 'edition': '15 SP4', 'architecture': 'ppc64le', 'products': [2290]},
2309: {'name': 'Containers Module 15 SP4 ppc64le', 'edition': '15 SP4', 'architecture': 'ppc64le', 'products': [2290]},
2313: {'name': 'Development Tools Module 15 SP4 ppc64le', 'edition': '15 SP4', 'architecture': 'ppc64le', 'products': [2290]},
2317: {'name': 'Web and Scripting Module 15 SP4 ppc64le', 'edition': '15 SP4', 'architecture': 'ppc64le', 'products': [2290]},
2321: {'name': 'Legacy Module 15 SP4 ppc64le', 'edition': '15 SP4', 'architecture': 'ppc64le', 'products': [2290]},
2325: {'name': 'Public Cloud Module 15 SP4 ppc64le', 'edition': '15 SP4', 'architecture': 'ppc64le', 'products': [2290]},
2329: {'name': 'Transactional Server Module 15 SP4 ppc64le', 'edition': '15 SP4', 'architecture': 'ppc64le', 'products': [2290]},
2403: {'name': 'Python 3 Module 15 SP4 ppc64le', 'edition': '15 SP4', 'architecture': 'ppc64le', 'products': [2290]},
2391: {'name': 'Certifications Module 15 SP4 ppc64le', 'edition': '15 SP4', 'architecture': 'ppc64le', 'products': [2290]},
2345: {'name': 'SUSE Package Hub 15 SP4 ppc64le', 'edition': '15 SP4', 'architecture': 'ppc64le', 'products': [2290]},
2296: {'name': 'Basesystem Module 15 SP4 aarch64', 'edition': '15 SP4', 'architecture': 'aarch64', 'products': [2289, 2353]},
2300: {'name': 'Desktop Applications Module 15 SP4 aarch64', 'edition': '15 SP4', 'architecture': 'aarch64', 'products': [2289, 2353]},
2304: {'name': 'Server Applications Module 15 SP4 aarch64', 'edition': '15 SP4', 'architecture': 'aarch64', 'products': [2289, 2353]},
2308: {'name': 'Containers Module 15 SP4 aarch64', 'edition': '15 SP4', 'architecture': 'aarch64', 'products': [2289, 2353]},
2312: {'name': 'Development Tools Module 15 SP4 aarch64', 'edition': '15 SP4', 'architecture': 'aarch64', 'products': [2289, 2353]},
2316: {'name': 'Web and Scripting Module 15 SP4 aarch64', 'edition': '15 SP4', 'architecture': 'aarch64', 'products': [2289, 2353]},
2320: {'name': 'Legacy Module 15 SP4 aarch64', 'edition': '15 SP4', 'architecture': 'aarch64', 'products': [2289, 2353]},
2324: {'name': 'Public Cloud Module 15 SP4 aarch64', 'edition': '15 SP4', 'architecture': 'aarch64', 'products': [2289, 2353]},
2328: {'name': 'Transactional Server Module 15 SP4 aarch64', 'edition': '15 SP4', 'architecture': 'aarch64', 'products': [2289, 2353]},
2402: {'name': 'Python 3 Module 15 SP4 aarch64', 'edition': '15 SP4', 'architecture': 'aarch64', 'products': [2289, 2353]},
2390: {'name': 'Certifications Module 15 SP4 aarch64', 'edition': '15 SP4', 'architecture': 'aarch64', 'products': [2289, 2353]},
2355: {'name': 'HPC Module 15 SP4 aarch64', 'edition': '15 SP4', 'architecture': 'aarch64', 'products': [2289, 2353]},
2345: {'name': 'SUSE Package Hub 15 SP4 aarch64', 'edition': '15 SP4', 'architecture': 'aarch64', 'products': [2289, 2353]},
2298: {'name': 'Basesystem Module 15 SP4 s390x', 'edition': '15 SP4', 'architecture': 's390x', 'products': [2291]},
2302: {'name': 'Desktop Applications Module 15 SP4 s390x', 'edition': '15 SP4', 'architecture': 's390x', 'products': [2291]},
2306: {'name': 'Server Applications Module 15 SP4 s390x', 'edition': '15 SP4', 'architecture': 's390x', 'products': [2291]},
2310: {'name': 'Containers Module 15 SP4 s390x', 'edition': '15 SP4', 'architecture': 's390x', 'products': [2291]},
2314: {'name': 'Development Tools Module 15 SP4 s390x', 'edition': '15 SP4', 'architecture': 's390x', 'products': [2291]},
2318: {'name': 'Web and Scripting Module 15 SP4 s390x', 'edition': '15 SP4', 'architecture': 's390x', 'products': [2291]},
2322: {'name': 'Legacy Module 15 SP4 s390x', 'edition': '15 SP4', 'architecture': 's390x', 'products': [2291]},
2326: {'name': 'Public Cloud Module 15 SP4 s390x', 'edition': '15 SP4', 'architecture': 's390x', 'products': [2291]},
2330: {'name': 'Transactional Server Module 15 SP4 s390x', 'edition': '15 SP4', 'architecture': 's390x', 'products': [2291]},
2404: {'name': 'Python 3 Module 15 SP4 s390x', 'edition': '15 SP4', 'architecture': 's390x', 'products': [2291]},
2392: {'name': 'Certifications Module 15 SP4 s390x', 'edition': '15 SP4', 'architecture': 's390x', 'products': [2291]},
2355: {'name': 'HPC Module 15 SP4 s390x', 'edition': '15 SP4', 'architecture': 's390x', 'products': [2291]},
2346: {'name': 'SUSE Package Hub 15 SP4 s390x', 'edition': '15 SP4', 'architecture': 's390x', 'products': [2291]},
2299: {'name': 'Basesystem Module 15 SP4 x86_64', 'edition': '15 SP4', 'architecture': 'x86_64', 'products': [2295, 2340, 2354, 2421, 2292, 2294, 2343]},
2393: {'name': 'Certifications Module 15 SP4 x86_64', 'edition': '15 SP4', 'architecture': 'x86_64', 'products': [2295, 2340, 2354, 2421, 2292, 2294, 2343]},
2311: {'name': 'Containers Module 15 SP4 x86_64', 'edition': '15 SP4', 'architecture': 'x86_64', 'products': [2295, 2340, 2354, 2421, 2292, 2294, 2343]},
2303: {'name': 'Desktop Applications Module 15 SP4 x86_64', 'edition': '15 SP4', 'architecture': 'x86_64', 'products': [2295, 2340, 2354, 2421, 2292, 2294, 2343]},
2315: {'name': 'Development Tools Module 15 SP4 x86_64', 'edition': '15 SP4', 'architecture': 'x86_64', 'products': [2295, 2340, 2354, 2421, 2292, 2294, 2343]},
2356: {'name': 'HPC Module 15 SP4 x86_64', 'edition': '15 SP4', 'architecture': 'x86_64', 'products': [2295, 2340, 2354, 2421, 2292, 2294, 2343]},
2323: {'name': 'Legacy Module 15 SP4 x86_64', 'edition': '15 SP4', 'architecture': 'x86_64', 'products': [2295, 2340, 2354, 2421, 2292, 2294, 2343]},
2327: {'name': 'Public Cloud Module 15 SP4 x86_64', 'edition': '15 SP4', 'architecture': 'x86_64', 'products': [2295, 2340, 2354, 2421, 2292, 2294, 2343]},
2405: {'name': 'Python 3 Module 15 SP4 x86_64', 'edition': '15 SP4', 'architecture': 'x86_64', 'products': [2295, 2340, 2354, 2421, 2292, 2294, 2343]},
2342: {'name': 'SAP Applications Module 15 SP4 x86_64', 'edition': '15 SP4', 'architecture': 'x86_64', 'products': [2295, 2340, 2354, 2421, 2292, 2294, 2343]},
2600: {'name': 'SAP Business One Module 15 SP4 x86_64', 'edition': '15 SP4', 'architecture': 'x86_64', 'products': [2295, 2340, 2354, 2421, 2292, 2294, 2343]},
2307: {'name': 'Server Applications Module 15 SP4 x86_64', 'edition': '15 SP4', 'architecture': 'x86_64', 'products': [2295, 2340, 2354, 2421, 2292, 2294, 2343]},
2334: {'name': 'Live Patching 15 SP4 x86_64', 'edition': '15 SP4', 'architecture': 'x86_64', 'products': [2295, 2340, 2354, 2421, 2292, 2294, 2343]},
2347: {'name': 'SUSE Package Hub 15 SP4 x86_64', 'edition': '15 SP4', 'architecture': 'x86_64', 'products': [2295, 2340, 2354, 2421, 2292, 2294, 2343]},
2422: {'name': 'SUSE Real Time Module 15 SP4 x86_64', 'edition': '15 SP4', 'architecture': 'x86_64', 'products': [2295, 2340, 2354, 2421, 2292, 2294, 2343]},
2331: {'name': 'Transactional Server Module 15 SP4 x86_64', 'edition': '15 SP4', 'architecture': 'x86_64', 'products': [2295, 2340, 2354, 2421, 2292, 2294, 2343]},
2319: {'name': 'Web and Scripting Module 15 SP4 x86_64', 'edition': '15 SP4', 'architecture': 'x86_64', 'products': [2295, 2340, 2354, 2421, 2292, 2294, 2343]},
2471: {'name': 'Basesystem Module 15 SP5 aarch64', 'edition': '15 SP5', 'architecture': 'aarch64', 'products': [2462, 2469]},
2555: {'name': 'Certifications Module 15 SP5 aarch64', 'edition': '15 SP5', 'architecture': 'aarch64', 'products': [2462, 2469]},
2483: {'name': 'Containers Module 15 SP5 aarch64', 'edition': '15 SP5', 'architecture': 'aarch64', 'products': [2462, 2469]},
2475: {'name': 'Desktop Applications Module 15 SP5 aarch64', 'edition': '15 SP5', 'architecture': 'aarch64', 'products': [2462, 2469]},
2487: {'name': 'Development Tools Module 15 SP5 aarch64', 'edition': '15 SP5', 'architecture': 'aarch64', 'products': [2462, 2469]},
2497: {'name': 'Legacy Module 15 SP5 aarch64', 'edition': '15 SP5', 'architecture': 'aarch64', 'products': [2462, 2469]},
2495: {'name': 'HPC Module 15 SP5 aarch64', 'edition': '15 SP5', 'architecture': 'aarch64', 'products': [2462, 2469]},
2501: {'name': 'Public Cloud Module 15 SP5 aarch64', 'edition': '15 SP5', 'architecture': 'aarch64', 'products': [2462, 2469]},
2533: {'name': 'Python 3 Module 15 SP5 aarch64', 'edition': '15 SP5', 'architecture': 'aarch64', 'products': [2462, 2469]},
2479: {'name': 'Server Applications Module 15 SP5 aarch64', 'edition': '15 SP5', 'architecture': 'aarch64', 'products': [2462, 2469]},
2559: {'name': 'SUSE Package Hub 15 SP5 aarch64', 'edition': '15 SP5', 'architecture': 'aarch64', 'products': [2462, 2469]},
2505: {'name': 'Transactional Server Module 15 SP5 aarch64', 'edition': '15 SP5', 'architecture': 'aarch64', 'products': [2462, 2469]},
2491: {'name': 'Web and Scripting Module 15 SP5 aarch64', 'edition': '15 SP5', 'architecture': 'aarch64', 'products': [2462, 2469]},
2472: {'name': 'Basesystem Module 15 SP5 ppc64le', 'edition': '15 SP5', 'architecture': 'ppc64le', 'products': [2463]},
2556: {'name': 'Certifications Module 15 SP5 ppc64le', 'edition': '15 SP5', 'architecture': 'ppc64le', 'products': [2463]},
2484: {'name': 'Containers Module 15 SP5 ppc64le', 'edition': '15 SP5', 'architecture': 'ppc64le', 'products': [2463]},
2476: {'name': 'Desktop Applications Module 15 SP5 ppc64le', 'edition': '15 SP5', 'architecture': 'ppc64le', 'products': [2463]},
2488: {'name': 'Development Tools Module 15 SP5 ppc64le', 'edition': '15 SP5', 'architecture': 'ppc64le', 'products': [2463]},
2498: {'name': 'Legacy Module 15 SP5 ppc64le', 'edition': '15 SP5', 'architecture': 'ppc64le', 'products': [2463]},
2502: {'name': 'Public Cloud Module 15 SP5 ppc64le', 'edition': '15 SP5', 'architecture': 'ppc64le', 'products': [2463]},
2534: {'name': 'Python 3 Module 15 SP5 ppc64le', 'edition': '15 SP5', 'architecture': 'ppc64le', 'products': [2463]},
2480: {'name': 'Server Applications Module 15 SP5 ppc64le', 'edition': '15 SP5', 'architecture': 'ppc64le', 'products': [2463]},
2560: {'name': 'SUSE Package Hub 15 SP5 ppc64le', 'edition': '15 SP5', 'architecture': 'ppc64le', 'products': [2463]},
2506: {'name': 'Transactional Server Module 15 SP5 ppc64le', 'edition': '15 SP5', 'architecture': 'ppc64le', 'products': [2463]},
2492: {'name': 'Web and Scripting Module 15 SP5 ppc64le', 'edition': '15 SP5', 'architecture': 'ppc64le', 'products': [2463]},
2473: {'name': 'Basesystem Module 15 SP5 s390x', 'edition': '15 SP5', 'architecture': 's390x', 'products': [2464]},
2557: {'name': 'Certifications Module 15 SP5 s390x', 'edition': '15 SP5', 'architecture': 's390x', 'products': [2464]},
2485: {'name': 'Containers Module 15 SP5 s390x', 'edition': '15 SP5', 'architecture': 's390x', 'products': [2464]},
2477: {'name': 'Desktop Applications Module 15 SP5 s390x', 'edition': '15 SP5', 'architecture': 's390x', 'products': [2464]},
2489: {'name': 'Development Tools Module 15 SP5 s390x', 'edition': '15 SP5', 'architecture': 's390x', 'products': [2464]},
2499: {'name': 'Legacy Module 15 SP5 s390x', 'edition': '15 SP5', 'architecture': 's390x', 'products': [2464]},
2503: {'name': 'Public Cloud Module 15 SP5 s390x', 'edition': '15 SP5', 'architecture': 's390x', 'products': [2464]},
2535: {'name': 'Python 3 Module 15 SP5 s390x', 'edition': '15 SP5', 'architecture': 's390x', 'products': [2464]},
2481: {'name': 'Server Applications Module 15 SP5 s390x', 'edition': '15 SP5', 'architecture': 's390x', 'products': [2464]},
2561: {'name': 'SUSE Package Hub 15 SP5 s390x', 'edition': '15 SP5', 'architecture': 's390x', 'products': [2464]},
2507: {'name': 'Transactional Server Module 15 SP5 s390x', 'edition': '15 SP5', 'architecture': 's390x', 'products': [2464]},
2493: {'name': 'Web and Scripting Module 15 SP5 s390x', 'edition': '15 SP5', 'architecture': 's390x', 'products': [2464]},
2474: {'name': 'Basesystem Module 15 SP5 x86_64', 'edition': '15 SP5', 'architecture': 'x86_64', 'products': [2468, 2517, 2470, 2582, 2465, 2467, 2513]},
2558: {'name': 'Certifications Module 15 SP5 x86_64', 'edition': '15 SP5', 'architecture': 'x86_64', 'products': [2468, 2517, 2470, 2582, 2465, 2467, 2513]},
2486: {'name': 'Containers Module 15 SP5 x86_64', 'edition': '15 SP5', 'architecture': 'x86_64', 'products': [2468, 2517, 2470, 2582, 2465, 2467, 2513]},
2478: {'name': 'Desktop Applications Module 15 SP5 x86_64', 'edition': '15 SP5', 'architecture': 'x86_64', 'products': [2468, 2517, 2470, 2582, 2465, 2467, 2513]},
2490: {'name': 'Development Tools Module 15 SP5 x86_64', 'edition': '15 SP5', 'architecture': 'x86_64', 'products': [2468, 2517, 2470, 2582, 2465, 2467, 2513]},
2496: {'name': 'HPC Module 15 SP5 x86_64', 'edition': '15 SP5', 'architecture': 'x86_64', 'products': [2468, 2517, 2470, 2582, 2465, 2467, 2513]},
2500: {'name': 'Legacy Module 15 SP5 x86_64', 'edition': '15 SP5', 'architecture': 'x86_64', 'products': [2468, 2517, 2470, 2582, 2465, 2467, 2513]},
2504: {'name': 'Public Cloud Module 15 SP5 x86_64', 'edition': '15 SP5', 'architecture': 'x86_64', 'products': [2468, 2517, 2470, 2582, 2465, 2467, 2513]},
2536: {'name': 'Python 3 Module 15 SP5 x86_64', 'edition': '15 SP5', 'architecture': 'x86_64', 'products': [2468, 2517, 2470, 2582, 2465, 2467, 2513]},
2519: {'name': 'SAP Applications Module 15 SP5 x86_64', 'edition': '15 SP5', 'architecture': 'x86_64', 'products': [2468, 2517, 2470, 2582, 2465, 2467, 2513]},
2589: {'name': 'SAP Business One Module 15 SP5 x86_64', 'edition': '15 SP5', 'architecture': 'x86_64', 'products': [2468, 2517, 2470, 2582, 2465, 2467, 2513]},
2482: {'name': 'Server Applications Module 15 SP5 x86_64', 'edition': '15 SP5', 'architecture': 'x86_64', 'products': [2468, 2517, 2470, 2582, 2465, 2467, 2513]},
2511: {'name': 'Live Patching 15 SP5 x86_64', 'edition': '15 SP5', 'architecture': 'x86_64', 'products': [2468, 2517, 2470, 2582, 2465, 2467, 2513]},
2562: {'name': 'SUSE Package Hub 15 SP5 x86_64', 'edition': '15 SP5', 'architecture': 'x86_64', 'products': [2468, 2517, 2470, 2582, 2465, 2467, 2513]},
2583: {'name': 'SUSE Real Time Module 15 SP5 x86_64', 'edition': '15 SP5', 'architecture': 'x86_64', 'products': [2468, 2517, 2470, 2582, 2465, 2467, 2513]},
2508: {'name': 'Transactional Server Module 15 SP5 x86_64', 'edition': '15 SP5', 'architecture': 'x86_64', 'products': [2468, 2517, 2470, 2582, 2465, 2467, 2513]},
2494: {'name': 'Web and Scripting Module 15 SP5 x86_64', 'edition': '15 SP5', 'architecture': 'x86_64', 'products': [2468, 2517, 2470, 2582, 2465, 2467, 2513]},
2615: {'name': 'Basesystem Module 15 SP6 aarch64', 'edition': '15 SP6', 'architecture': 'aarch64', 'products': [2613, 2606]},
2634: {'name': 'Containers Module 15 SP6 aarch64', 'edition': '15 SP6', 'architecture': 'aarch64', 'products': [2613, 2606]},
2619: {'name': 'Desktop Applications Module 16 SP5 aarch64', 'edition': '15 SP6', 'architecture': 'aarch64', 'products': [2613, 2606]},
2638: {'name': 'Development Tools Module 16 SP5 aarch64', 'edition': '15 SP6', 'architecture': 'aarch64', 'products': [2613, 2606]},
2647: {'name': 'HPC Module 15 SP6 aarch64', 'edition': '15 SP6', 'architecture': 'aarch64', 'products': [2613, 2606]},
2649: {'name': 'Legacy Module 15 SP6 aarch64', 'edition': '15 SP6', 'architecture': 'aarch64', 'products': [2613, 2606]},
2653: {'name': 'Public Cloud Module 15 SP6 aarch64', 'edition': '15 SP6', 'architecture': 'aarch64', 'products': [2613, 2606]},
2680: {'name': 'Python 3 Module 15 SP6 aarch64', 'edition': '15 SP6', 'architecture': 'aarch64', 'products': [2613, 2606]},
2623: {'name': 'Server Applications Module 15 SP6 aarch64', 'edition': '15 SP6', 'architecture': 'aarch64', 'products': [2613, 2606]},
2684: {'name': 'SUSE Package Hub 15 SP6 aarch64', 'edition': '15 SP6', 'architecture': 'aarch64', 'products': [2613, 2606]},
2657: {'name': 'Transactional Server Module 15 SP6 aarch64', 'edition': '15 SP6', 'architecture': 'aarch64', 'products': [2613, 2606]},
2643: {'name': 'Web and Scripting Module 15 SP6 aarch64', 'edition': '15 SP6', 'architecture': 'aarch64', 'products': [2613, 2606]},
2616: {'name': 'Basesystem Module 15 SP6 ppc64le', 'edition': '15 SP6', 'architecture': 'ppc64le', 'products': [2607]},
2635: {'name': 'Containers Module 15 SP6 ppc64le', 'edition': '15 SP6', 'architecture': 'ppc64le', 'products': [2607]},
2620: {'name': 'Desktop Applications Module 15 SP6 ppc64le', 'edition': '15 SP6', 'architecture': 'ppc64le', 'products': [2607]},
2639: {'name': 'Development Tools Module 15 SP6 ppc64le', 'edition': '15 SP6', 'architecture': 'ppc64le', 'products': [2607]},
2650: {'name': 'Legacy Module 15 SP6 ppc64le', 'edition': '15 SP6', 'architecture': 'ppc64le', 'products': [2607]},
2654: {'name': 'Public Cloud Module 15 SP6 ppc64le', 'edition': '15 SP6', 'architecture': 'ppc64le', 'products': [2607]},
2681: {'name': 'Python 3 Module 15 SP6 ppc64le', 'edition': '15 SP6', 'architecture': 'ppc64le', 'products': [2607]},
2624: {'name': 'Server Applications Module 15 SP6 ppc64le', 'edition': '15 SP6', 'architecture': 'ppc64le', 'products': [2607]},
2685: {'name': 'SUSE Package Hub 15 SP6 ppc64le', 'edition': '15 SP6', 'architecture': 'ppc64le', 'products': [2607]},
2658: {'name': 'Transactional Server Module 15 SP6 ppc64le', 'edition': '15 SP6', 'architecture': 'ppc64le', 'products': [2607]},
2644: {'name': 'Web and Scripting Module 15 SP6 ppc64le', 'edition': '15 SP6', 'architecture': 'ppc64le', 'products': [2607]},
2617: {'name': 'Basesystem Module 15 SP6 s390x', 'edition': '15 SP6', 'architecture': 's390x', 'products': [2608]},
2636: {'name': 'Containers Module 15 SP6 s390x', 'edition': '15 SP6', 'architecture': 's390x', 'products': [2608]},
2621: {'name': 'Desktop Applications Module 15 SP6 s390x', 'edition': '15 SP6', 'architecture': 's390x', 'products': [2608]},
2640: {'name': 'Development Tools Module 15 SP6 s390x', 'edition': '15 SP6', 'architecture': 's390x', 'products': [2608]},
2651: {'name': 'Legacy Module 15 SP6 s390x', 'edition': '15 SP6', 'architecture': 's390x', 'products': [2608]},
2655: {'name': 'Public Cloud Module 15 SP6 s390x', 'edition': '15 SP6', 'architecture': 's390x', 'products': [2608]},
2682: {'name': 'Python 3 Module 15 SP6 s390x', 'edition': '15 SP6', 'architecture': 's390x', 'products': [2608]},
2625: {'name': 'Server Applications Module 15 SP6 s390x', 'edition': '15 SP6', 'architecture': 's390x', 'products': [2608]},
2686: {'name': 'SUSE Package Hub 15 SP6 s390x', 'edition': '15 SP6', 'architecture': 's390x', 'products': [2608]},
2659: {'name': 'Transactional Server Module 15 SP6 s390x', 'edition': '15 SP6', 'architecture': 's390x', 'products': [2608]},
2645: {'name': 'Web and Scripting Module 15 SP6 s390x', 'edition': '15 SP6', 'architecture': 's390x', 'products': [2608]},
2618: {'name': 'Basesystem Module 15 SP6 x86_64', 'edition': '15 SP6', 'architecture': 'x86_64', 'products': [2612, 2631, 2614, 2609, 2611, 2661]},
2726: {'name': 'Certifications Module 15 SP6 x86_64', 'edition': '15 SP6', 'architecture': 'x86_64', 'products': [2612, 2631, 2614, 2609, 2611, 2661]},
2760: {'name': 'Confidential Computing Module 15 SP6 x86_64', 'edition': '15 SP6', 'architecture': 'x86_64', 'products': [2612, 2631, 2614, 2609, 2611, 2661]},
2637: {'name': 'Containers Module 15 SP6 x86_64', 'edition': '15 SP6', 'architecture': 'x86_64', 'products': [2612, 2631, 2614, 2609, 2611, 2661]},
2622: {'name': 'Desktop Applications Module 15 SP6 x86_64', 'edition': '15 SP6', 'architecture': 'x86_64', 'products': [2612, 2631, 2614, 2609, 2611, 2661]},
2641: {'name': 'Development Tools Module 15 SP6 x86_64', 'edition': '15 SP6', 'architecture': 'x86_64', 'products': [2612, 2631, 2614, 2609, 2611, 2661]},
2648: {'name': 'HPC Module 15 SP6 x86_64', 'edition': '15 SP6', 'architecture': 'x86_64', 'products': [2612, 2631, 2614, 2609, 2611, 2661]},
2652: {'name': 'Legacy Module 15 SP6 x86_64', 'edition': '15 SP6', 'architecture': 'x86_64', 'products': [2612, 2631, 2614, 2609, 2611, 2661]},
2656: {'name': 'Public Cloud Module 15 SP6 x86_64', 'edition': '15 SP6', 'architecture': 'x86_64', 'products': [2612, 2631, 2614, 2609, 2611, 2661]},
2683: {'name': 'Python 3 Module 15 SP6 x86_64', 'edition': '15 SP6', 'architecture': 'x86_64', 'products': [2612, 2631, 2614, 2609, 2611, 2661]},
2727: {'name': 'SAP Business One Module 15 SP6 x86_64', 'edition': '15 SP6', 'architecture': 'x86_64', 'products': [2612, 2631, 2614, 2609, 2611, 2661]},
2626: {'name': 'Server Applications Module 15 SP6 x86_64', 'edition': '15 SP6', 'architecture': 'x86_64', 'products': [2612, 2631, 2614, 2609, 2611, 2661]},
2664: {'name': 'Live Patching 15 SP6 x86_64', 'edition': '15 SP6', 'architecture': 'x86_64', 'products': [2612, 2631, 2614, 2609, 2611, 2661]},
2687: {'name': 'SUSE Package Hub 15 SP6 x86_64', 'edition': '15 SP6', 'architecture': 'x86_64', 'products': [2612, 2631, 2614, 2609, 2611, 2661]},
2660: {'name': 'Transactional Server Module 15 SP6 x86_64', 'edition': '15 SP6', 'architecture': 'x86_64', 'products': [2612, 2631, 2614, 2609, 2611, 2661]},
2646: {'name': 'Web and Scripting Module 15 SP6 x86_64', 'edition': '15 SP6', 'architecture': 'x86_64', 'products': [2612, 2631, 2614, 2609, 2611, 2661]},
}
# to get the list of product IDs:
# rmt-cli products list --name "SUSE Manager Server" --all
suma_product_list = {
1899: {'name': 'SUSE Manager Server 4.0', 'identifier': '4.0'},
2012: {'name': 'SUSE Manager Server 4.1', 'identifier': '4.1'},
2222: {'name': 'SUSE Manager Server 4.2', 'identifier': '4.2'},
2378: {'name': 'SUSE Manager Server 4.3', 'identifier': '4.3'},
2718: {'name': 'SUSE Manager Server 5.0', 'identifier': '5.0'},
}
# result lists
uptodate = []
notfound = []
different = []
unsupported = []
suseorphans = []
suseptf = []
# report flags
show_unknown = False
show_diff = False
show_uptodate = False
show_unsupported = False
show_suseorphans = False
show_suseptf = False
# verbose messages
verbose = False
# base name for the reports
sc_name = ''
# maximum number of running threads
max_threads = 35
# time to wait before starting each chunk of threads
wait_time = 5
# override architecture
arch = None
# short responses (just package versions)
short_response = False
# force data refresh from SCC (ignore the cache)
force_refresh = False
# default output directory for the reports
outputdir = os.getcwd()
# cache manager singleton
cm = None
# thread list
threads = []
def __init__(self):
# ignore DeprecationWarnings for now to avoid polluting the output
warnings.filterwarnings("ignore", category=DeprecationWarning)
self.cm = CacheManager()
def set_verbose(self, verbose):
self.verbose = verbose
def set_force_refresh(self, force_refresh):
self.force_refresh = force_refresh
def get_verbose(self, verbose):
return self.verbose
def cleanup(self, signalNumber, frame):
print('\nokay, okay, I\'m leaving!')
sys.exit(1)
return
def color(text, color, bold=True):
esc = '\x1b['
ret = ""
if bold:
ret += esc + '1m'
reset = esc + '0m'
if color == 'red':
ret += esc + '31m' + text + reset
elif color == 'green':
ret += esc + '32m' + text + reset
elif color == 'yellow':
ret += esc + '33m' + text + reset
elif color == 'blue':
ret += esc + '34m' + text + reset
elif color == 'magenta':
ret += esc + '35m' + text + reset
elif color == 'cyan':
ret += esc + '36m' + text + reset
else:
return text
return ret
def find_suma(self, directory_name):
regex_suma = r"SUSE Manager release (.*) .*"
try:
f = open(directory_name + '/basic-environment.txt', 'r')
text = f.read()
f.close()
matches_suma = re.search(regex_suma, text)
for p in self.suma_product_list:
if matches_suma is not None and matches_suma.group(1) == self.suma_product_list[p]['identifier']:
return p
except Exception as e:
print('error: ' + str(e))
return -1
def find_cpe(self, directory_name, architecture):
regex_os = r"CPE_NAME=\"(.*)\""
regex_sap = r"SLES_SAP-release-([0-9]+)-|SLES_SAP-release-([0-9]+)\.([0-9]+)"
regex_sap_cpe = r".*sles_sap\:([0-9]+)$|.*sles_sap\:([0-9]+)\:[a-z]+?([0-9]+)"
try:
with open(directory_name + '/basic-environment.txt', 'r') as f:
text = f.read()
f.close()
with open(directory_name + '/rpm.txt', 'r') as f:
text_rpms = f.read()
f.close()
matches_os = re.search(regex_os, text)
matches_sap = re.search(regex_sap, text_rpms)
for p in self.product_list:
# first, we try matching the SLES_SAP-release RPM as CPE strings -- according to TID 7023490, the sles_sap string cannot always be trusted...
if matches_sap is not None:
matches_sap_cpe = re.search(
regex_sap_cpe, self.product_list[p]['identifier'])
# we match the CPE in the product table (just for our control, remember the TID) and the architecture
if matches_sap_cpe is not None and architecture == self.product_list[p]['arch']:
# the string version does not have a service pack
if matches_sap.group(1) is not None and matches_sap.group(1) == matches_sap_cpe.group(1):
return p
# the string version contains a service pack (matches are on groups 2 and 3)
if matches_sap.group(2) is not None and matches_sap.group(2) == matches_sap_cpe.group(2) and matches_sap.group(3) == matches_sap_cpe.group(3):
return p
# if a SLES_SAP-release package is not found, fall back to checking the CPE
elif matches_os.group(1) == self.product_list[p]['identifier'] and architecture == self.product_list[p]['arch']:
return p
except Exception as e:
print('error: ' + str(e))
return -1
def find_arch(self, directory_name):
regex = r"^Architecture:\s+(\w+)"
try:
f = open(directory_name + '/hardware.txt', 'r')
text = f.read()
f.close()
matches = re.search(regex, text, re.MULTILINE)
if matches != None:
return matches.group(1)
except Exception as e:
print('error opening hardware.txt, trying basic-environment.txt...')
try:
f = open(directory_name + '/basic-environment.txt', 'r')
text = f.read()
f.close()
regex = r"^Linux.* (\w+) GNU\/Linux$"
matches = re.search(regex, text, re.MULTILINE)
if matches != None:
return matches.group(1)
except Exception as e:
print(
'could not determine architecture for the supportconfig directory. Please supply one with -a.')
return 'unknown'
return 'unknown'
def read_rpmlist(self, directory_name):
rpmlist = []
regex_start = r"(^NAME.*VERSION)\n"
regex_package = r"(\S*)\s{2,}(\S{2,}.*)\s{2,}(.*)"
regex_end = r"(^$)\n"
try:
f = open(directory_name + '/rpm.txt', 'r')
text = f.readlines()
f.close()
found_start = False
for line in text:
matches = re.search(regex_start, line)
if matches != None:
found_start = True
continue
if found_start:
matches = re.search(regex_end, line)
if matches:
break
matches = re.search(regex_package, line)
if matches:
rpmname = matches.group(1)
rpmdistro = matches.group(2).strip(' \t\n')
rpmversion = matches.group(3)
if rpmname.startswith('gpg-pubkey'):
continue
if rpmname != '' and rpmdistro != '' and rpmversion != '':
rpmlist.append([rpmname, rpmdistro, rpmversion])
else:
continue
except Exception as e:
print('error: ' + str(e))
return rpmlist
def list_chunk(self, data, size):
return (data[pos:pos + size] for pos in range(0, len(data), size))
def list_products(self):
print('Known products list')
print('ID Name')
print('-----------------------------------------------------')
for k, v in self.product_list.items():
print(str(k) + '\t' + v['name'])
print('total: ' + str(len(self.product_list)) + ' products.')
return
def usage(self):
print('Usage: ' + sys.argv[0] + ' [-l|--list-products] -p|--product product id -n|--name <package name> [-s|--short] [-v|--verbose] [-1|--show-unknown] [-2|--show-differences] [-3|--show-uptodate] [-4|--show-unsupported] [-5|--show-suseorphans] [-6|--show-suseptf] [-o|--outputdir] [-d|--supportconfig] [-a|--arch <architecture>] [-f|--force-refresh] [-V|--version]')
return
def show_version(self):
print('SCC VerCheck version ' + SCCVersion.color(self.version + '-' +
self.build, 'green') + ' by Erico Mendonca <erico.mendonca@suse.com>\n')
return
def show_help(self):
self.usage()
print('\n')
print('-l|--list-products\t\tLists all supported products. Use this to get a valid product ID for further queries.')
print('-p|--product <product id>\tSpecifies a valid product ID for queries. Mandatory for searches.')
print('-n|--name <package name>\tSpecifies a package name to search. Exact matches only for now. Mandatory for searches.')
print('-s|--short\t\t\tOnly outputs the latest version, useful for scripts')
print('-v|--verbose\t\t\tOutputs extra information about the search and results')
print('-1|--show-unknown\t\tshows unknown packages as they are found.')
print('-2|--show-differences\t\tshows packages that have updates available as they are found.')
print('-3|--show-uptodate\t\tshows packages that are on par with the updated versions as they are found.')
print('-4|--show-unsupported\t\tshows packages that have a vendor that is different from the system it was collected from.')
print('-5|--show-suseorphans\t\tshows packages that are from SUSE, but are now orphans (e.g. from different OS/product versions).')
print('-6|--show-suseptf\t\tshows SUSE-made PTF (Program Temporary Fix) packages.')
print('-o|--outputdir\t\t\tspecify an output directory for the reports. Default: current directory.')
print('-d|--supportconfig\t\tAnalyzes a supportconfig directory and generates CSV reports for all packages described by types 1-6.')
print('-a|--arch <architecture>\t\t\tSupply an architecture for the supportconfig analysis.')
print('-f|--force-refresh\t\tIgnore cached data and retrieve latest data from SCC and public cloud info')
print('-V|--version\t\t\tShow program version')
print('\n')
return
def test(self):
self.threads = []
package_name = 'glibc'
instance_nr = 0
for k, v in self.product_list.items():
print('searching for package \"glibc\" in product id \"' +
str(k) + '\" (' + v['name'] + ')')
self.threads.insert(instance_nr, PackageSearchEngine(
instance_nr, k, package_name, v['name'], '0', self.force_refresh))
self.threads[instance_nr].start()
instance_nr = instance_nr + 1
# fetch results for all threads
while len(self.threads) > 0:
for thread_number, t in enumerate(self.threads):
# if t.is_alive():
t.join(timeout=5)
if t.is_alive():
print('thread ' + t.name + ' is not ready yet, skipping')
self.threads.append(t)
continue
refined_data = t.get_results()
# for thread_number in range(instance_nr):
# threads[thread_number].join()
# refined_data = threads[thread_number].get_results()
try:
print('[thread ' + str(thread_number) + ' ] latest version for ' + refined_data['query'] + ' on product ID ' + str(
refined_data['product_id']) + ' is ' + refined_data['results'][0]['version'] + '-' + refined_data['results'][0]['release'])
if self.verbose:
for item in refined_data['results']:
print('[thread ' + str(thread_number) + ' ] version ' + item['version'] + '-' +
item['release'] + ' is available on repository [' + item['repository'] + ']')
except IndexError:
print('could not find any version for package ' + package_name)
time.sleep(.1)
return
def search_package(self, product_id, package_name):
self.threads = []
if product_id in self.suma_product_list:
plist = self.suma_product_list
else:
plist = self.product_list
print('searching for package \"' + package_name + '\" in product id \"' +
str(product_id) + '\" (' + plist[product_id]['name'] + ')')
self.threads.insert(0, PackageSearchEngine(
0, product_id, package_name, plist[product_id]['name'], '0', self.force_refresh))
self.threads[0].start()
# fetch results for the only thread
self.threads[0].join()
refined_data = self.threads[0].get_results()
sle_results = [p for p in refined_data['results']
if 'SUSE Linux Enterprise' in p['repository']]
try:
if self.short_response:
if len(sle_results) > 0:
print(sle_results[0]['version'] +
'-' + sle_results[0]['release'])
else:
print(refined_data['results'][0]['version'] +
'-' + refined_data['results'][0]['release'])
else:
if len(sle_results) > 0:
print('latest version for ' + SCCVersion.color(refined_data['query'], 'yellow') + ' on product ID ' + str(refined_data['product_id']) + '(' + SCCVersion.color(plist[product_id]['name'], 'yellow') + ') is ' + SCCVersion.color(
sle_results[0]['version'] + '-' + sle_results[0]['release'], 'green') + ', found on ' + SCCVersion.color(sle_results[0]['products'][0]['name'] + ' (' + sle_results[0]['products'][0]['identifier'] + ')', 'green'))
else:
print('latest version for ' + SCCVersion.color(refined_data['query'], 'yellow') + ' on product ID ' + str(refined_data['product_id']) + '(' + SCCVersion.color(plist[product_id]['name'], 'yellow') + ') is ' + SCCVersion.color(
refined_data['results'][0]['version'] + '-' + refined_data['results'][0]['release'], 'green') + ', found on ' + SCCVersion.color(refined_data['results'][0]['products'][0]['name'] + ' (' + refined_data['results'][0]['products'][0]['identifier'] + ')', 'green'))
if self.verbose:
for item in refined_data['results']:
print('version ' + item['version'] + '-' + item['release'] +
' is available on repository [' + item['repository'] + ']')
except IndexError:
if self.short_response:
print('none')
else:
print('could not find any version for package ' + package_name)
return
def ask_the_oracle(self, version_one, version_two):
# we don't know how to parse this, let's ask zypper
if self.verbose:
print('don''t know how to compare: %s and %s, let''s ask the oracle' % (
version_one, version_two))
proc = subprocess.Popen(["/usr/bin/zypper", "vcmp", str(version_one),
str(version_two)], env={"LANG": "C"}, stdout=subprocess.PIPE)
output, err = proc.communicate()
regex = r".*is newer than.*"
if output is not None:
matches = re.match(regex, output.decode('utf-8'))
if matches is not None:
if self.verbose:
print('the oracle says: %s is newer' % str(version_one))
return True
else:
if self.verbose:
print('the oracle says: %s is older' % str(version_one))
return False
def is_newer(self, version_one, version_two):
result = False
ver_regex = r"(.*)-(.*)"
try:
matches_v1 = re.match(ver_regex, version_one)
matches_v2 = re.match(ver_regex, version_two)
v1 = LooseVersion(matches_v1.group(1) + '-' + matches_v1.group(2))
v2 = LooseVersion(matches_v2.group(1) + '-' + matches_v2.group(2))
except (IndexError, AttributeError):
return self.ask_the_oracle(version_one, version_two)
try:
result = v1.__ge__(v2)
except TypeError as e:
return self.ask_the_oracle(version_one, version_two)
return result
def check_supportconfig(self, supportconfigdir):
self.sc_name = supportconfigdir.rstrip(os.sep).split(os.sep)[-1]
if self.sc_name == '.':
self.sc_name = os.getcwd().split(os.sep)[-1]
print('Analyzing supportconfig directory: ' + supportconfigdir)
if self.arch:
match_arch = self.arch
else:
match_arch = self.find_arch(supportconfigdir)
match_os = self.find_cpe(supportconfigdir, match_arch)
match_suma = self.find_suma(supportconfigdir)
selected_product_id = -1
if match_os != -1 and match_arch != "unknown":
print('product name = ' + self.product_list[match_os]['name'] + ' (id ' + str(
match_os) + ', ' + match_arch + ')')
selected_product_id = match_os
# primary repositories for trusted updates should have this regex
base_regex = r"(^SUSE Linux Enterprise.*|^Basesystem.*)"
if match_suma != -1:
print('found ' + self.suma_product_list[match_suma]
['name'] + ', will use alternate id ' + str(match_suma))
selected_product_id = match_suma
# primary repositories for trusted updates should have this regex
base_regex = r"^SUSE Manager.*"
else:
print('error while determining CPE')
return ([], [], [], [])
rpmlist = self.read_rpmlist(supportconfigdir)
total = len(rpmlist)
print('found ' + str(total) + ' total packages to check')
count = 0
self.threads = []
# fetch results for all threads
for chunk in self.list_chunk(rpmlist, self.max_threads):
for p in chunk:
self.threads.insert(count, PackageSearchEngine(
count, selected_product_id, p[0], p[1], p[2], self.force_refresh))
self.threads[count].start()
count += 1
progress = '[' + str(count) + '/' + str(total) + ']'
sys.stdout.write('processing ' + progress)
blank = ('\b' * (len(progress) + 11))
sys.stdout.write(blank)
sys.stdout.flush()
time.sleep(self.wait_time)
print('gathering results... ')
to_process = len([t for t in self.threads if t.processed == False])