foreman_rh_cloud 14.6.1 → 14.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/app/assets/javascripts/foreman_rh_cloud/locale/fr/foreman_rh_cloud.js +70 -82
- data/app/assets/javascripts/foreman_rh_cloud/locale/ja/foreman_rh_cloud.js +70 -82
- data/app/assets/javascripts/foreman_rh_cloud/locale/ka/foreman_rh_cloud.js +139 -151
- data/app/assets/javascripts/foreman_rh_cloud/locale/ko/foreman_rh_cloud.js +70 -82
- data/app/assets/javascripts/foreman_rh_cloud/locale/zh_CN/foreman_rh_cloud.js +70 -82
- data/app/services/foreman_rh_cloud/insights_api_forwarder.rb +25 -0
- data/lib/foreman_inventory_upload/generators/queries.rb +1 -1
- data/lib/foreman_inventory_upload/generators/slice.rb +14 -2
- data/lib/foreman_inventory_upload.rb +1 -7
- data/lib/foreman_rh_cloud/version.rb +1 -1
- data/locale/foreman_rh_cloud.pot +246 -268
- data/locale/fr/LC_MESSAGES/foreman_rh_cloud.mo +0 -0
- data/locale/fr/foreman_rh_cloud.po +70 -83
- data/locale/ja/LC_MESSAGES/foreman_rh_cloud.mo +0 -0
- data/locale/ja/foreman_rh_cloud.po +70 -83
- data/locale/ka/LC_MESSAGES/foreman_rh_cloud.mo +0 -0
- data/locale/ka/foreman_rh_cloud.po +139 -152
- data/locale/ko/LC_MESSAGES/foreman_rh_cloud.mo +0 -0
- data/locale/ko/foreman_rh_cloud.po +70 -83
- data/locale/zh_CN/LC_MESSAGES/foreman_rh_cloud.mo +0 -0
- data/locale/zh_CN/foreman_rh_cloud.po +70 -83
- data/package.json +1 -1
- data/test/unit/services/foreman_rh_cloud/insights_api_forwarder_test.rb +24 -0
- data/test/unit/slice_generator_test.rb +29 -0
- data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js +79 -49
- data/webpack/ForemanInventoryUpload/Components/TaskProgress/TaskProgress.js +1 -5
- metadata +2 -2
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"locale_data": {
|
|
4
4
|
"foreman_rh_cloud": {
|
|
5
5
|
"": {
|
|
6
|
-
"Project-Id-Version": "foreman_rh_cloud 14.
|
|
6
|
+
"Project-Id-Version": "foreman_rh_cloud 14.6.1",
|
|
7
7
|
"Report-Msgid-Bugs-To": "",
|
|
8
8
|
"PO-Revision-Date": "2023-01-20 13:26+0000",
|
|
9
9
|
"Last-Translator": "Ondřej Gajdušek, 2026",
|
|
@@ -29,6 +29,9 @@
|
|
|
29
29
|
"About subscription watch": [
|
|
30
30
|
"订阅查看"
|
|
31
31
|
],
|
|
32
|
+
"Actions": [
|
|
33
|
+
""
|
|
34
|
+
],
|
|
32
35
|
"Actions history": [
|
|
33
36
|
"操作历史记录"
|
|
34
37
|
],
|
|
@@ -68,27 +71,6 @@
|
|
|
68
71
|
"Clear Selection": [
|
|
69
72
|
"清除选择"
|
|
70
73
|
],
|
|
71
|
-
"Cloud Connector has been configured however obfuscating host names setting is enabled, it's recommended to disable it": [
|
|
72
|
-
"已配置了云连接器,但启用了模糊主机名设置,建议禁用它"
|
|
73
|
-
],
|
|
74
|
-
"Cloud Connector has been configured however the inventory auto-upload is disabled, it's recommended to enable it": [
|
|
75
|
-
"已配置了云连接器,但禁用了清单自动上传,建议启用它"
|
|
76
|
-
],
|
|
77
|
-
"Cloud Connector is in progress": [
|
|
78
|
-
"云连接器正在进行"
|
|
79
|
-
],
|
|
80
|
-
"Cloud connector job link": [
|
|
81
|
-
"云连接器作业链接"
|
|
82
|
-
],
|
|
83
|
-
"Cloud connector setup has failed: ": [
|
|
84
|
-
"云连接器设置失败: "
|
|
85
|
-
],
|
|
86
|
-
"Cloud connector setup has started: ": [
|
|
87
|
-
"云连接器设置已启动: "
|
|
88
|
-
],
|
|
89
|
-
"Cloud connector setup is in progress now: ": [
|
|
90
|
-
"云连接器设置现在正在进行: "
|
|
91
|
-
],
|
|
92
74
|
"Completed": [
|
|
93
75
|
"完成"
|
|
94
76
|
],
|
|
@@ -98,12 +80,6 @@
|
|
|
98
80
|
"Configure": [
|
|
99
81
|
"配置"
|
|
100
82
|
],
|
|
101
|
-
"Configure Cloud Connector on given hosts": [
|
|
102
|
-
"在给定主机上配置 Cloud Connector"
|
|
103
|
-
],
|
|
104
|
-
"Configure cloud connector": [
|
|
105
|
-
"配置云连接器"
|
|
106
|
-
],
|
|
107
83
|
"Connectivity test": [
|
|
108
84
|
"连接测试"
|
|
109
85
|
],
|
|
@@ -113,6 +89,9 @@
|
|
|
113
89
|
"Current page": [
|
|
114
90
|
"当前页"
|
|
115
91
|
],
|
|
92
|
+
"Destroy HBI hosts for organization": [
|
|
93
|
+
""
|
|
94
|
+
],
|
|
116
95
|
"Details": [
|
|
117
96
|
"详情"
|
|
118
97
|
],
|
|
@@ -122,18 +101,12 @@
|
|
|
122
101
|
"Disable vulnerability analysis": [
|
|
123
102
|
"禁用漏洞分析"
|
|
124
103
|
],
|
|
125
|
-
"Disconnected hosts: ": [
|
|
126
|
-
"断开连接的主机:"
|
|
127
|
-
],
|
|
128
104
|
"Displays manifest statuses per accessible organizations.": [
|
|
129
105
|
"显示每个可访问的机构的清单状态。"
|
|
130
106
|
],
|
|
131
107
|
"Documentation": [
|
|
132
108
|
"文档"
|
|
133
109
|
],
|
|
134
|
-
"Download Report": [
|
|
135
|
-
"下载报告"
|
|
136
|
-
],
|
|
137
110
|
"Download latest report": [
|
|
138
111
|
"下载最新的报告"
|
|
139
112
|
],
|
|
@@ -164,9 +137,6 @@
|
|
|
164
137
|
"Enable automatic upload of your hosts inventory to the Red Hat cloud": [
|
|
165
138
|
"启用自动将主机清单上传到红帽云"
|
|
166
139
|
],
|
|
167
|
-
"Enable cloud connector": [
|
|
168
|
-
"启用云连接器"
|
|
169
|
-
],
|
|
170
140
|
"Enable inventory upload": [
|
|
171
141
|
"启用清单上传"
|
|
172
142
|
],
|
|
@@ -185,8 +155,8 @@
|
|
|
185
155
|
"Exclude installed packages from being uploaded to the Red Hat cloud. (If insights_minimal_data_collection is set to true, this setting is ignored and installed packages are always excluded.) Ignored when using local Insights.": [
|
|
186
156
|
"在上传到红帽云时排除安装的软件包。(如果 insights_minimal_data_collection 设置为 true,则忽略此设置,且安装的软件包始终被排除。)在使用本地 Insights 时忽略。"
|
|
187
157
|
],
|
|
188
|
-
"
|
|
189
|
-
"
|
|
158
|
+
"Excluded from upload to console.redhat.com Inventory service because host_registration_insights_inventory parameter value is false: ": [
|
|
159
|
+
""
|
|
190
160
|
],
|
|
191
161
|
"Failed": [
|
|
192
162
|
"失败"
|
|
@@ -194,6 +164,9 @@
|
|
|
194
164
|
"Failed to destroy HBI host %s: %s": [
|
|
195
165
|
"销毁 HBI 主机 %s 失败:%s"
|
|
196
166
|
],
|
|
167
|
+
"Failed to destroy HBI hosts for organization %s: %s": [
|
|
168
|
+
""
|
|
169
|
+
],
|
|
197
170
|
"Failed to fetch hosts": [
|
|
198
171
|
"获取主机失败"
|
|
199
172
|
],
|
|
@@ -212,20 +185,20 @@
|
|
|
212
185
|
"Fix host": [
|
|
213
186
|
"修复主机"
|
|
214
187
|
],
|
|
215
|
-
"For more info, please visit the": [
|
|
216
|
-
"如需更多信息,请访问"
|
|
217
|
-
],
|
|
218
188
|
"For more information about Insights and Cloud Connector, see:": [
|
|
219
189
|
"有关 Insights 和云连接器的更多信息,请参阅"
|
|
220
190
|
],
|
|
221
191
|
"For more information about the Subscriptions service, see:": [
|
|
222
192
|
"有关订阅服务的更多信息,请参阅:"
|
|
223
193
|
],
|
|
194
|
+
"Force RHEL Lightspeed CLA connection": [
|
|
195
|
+
""
|
|
196
|
+
],
|
|
224
197
|
"Foreman plugin that process & upload data to Red Hat Cloud": [
|
|
225
198
|
"处理数据并将其上传到红帽云的 Foreman 插件"
|
|
226
199
|
],
|
|
227
|
-
"
|
|
228
|
-
"
|
|
200
|
+
"Forward requests to Lightspeed CLA even when in IoP mode. Ignored when IoP mode is off.": [
|
|
201
|
+
""
|
|
229
202
|
],
|
|
230
203
|
"Generate and upload report": [
|
|
231
204
|
"生成并上传报告"
|
|
@@ -239,9 +212,6 @@
|
|
|
239
212
|
"Generated": [
|
|
240
213
|
"生成"
|
|
241
214
|
],
|
|
242
|
-
"Generating": [
|
|
243
|
-
"生成中"
|
|
244
|
-
],
|
|
245
215
|
"Go to Foreman Insights page": [
|
|
246
216
|
"进入 Foreman Insights 页面"
|
|
247
217
|
],
|
|
@@ -266,15 +236,18 @@
|
|
|
266
236
|
"Host inventory report job": [
|
|
267
237
|
"主机清单报告作业"
|
|
268
238
|
],
|
|
269
|
-
"Host
|
|
270
|
-
"
|
|
239
|
+
"Host is excluded from upload to console.redhat.com Inventory service due to host parameter": [
|
|
240
|
+
""
|
|
241
|
+
],
|
|
242
|
+
"Host is not present on console.redhat.com Inventory service": [
|
|
243
|
+
""
|
|
244
|
+
],
|
|
245
|
+
"Host is uploaded and present on console.redhat.com Inventory service": [
|
|
246
|
+
""
|
|
271
247
|
],
|
|
272
248
|
"Hostname": [
|
|
273
249
|
"主机名"
|
|
274
250
|
],
|
|
275
|
-
"Hosts with subscription in organization: ": [
|
|
276
|
-
"机构中具有订阅的主机: "
|
|
277
|
-
],
|
|
278
251
|
"ID of the RHC(Yggdrasil) daemon": [
|
|
279
252
|
"RHC (Yggdrasil)守护进程的 ID"
|
|
280
253
|
],
|
|
@@ -347,12 +320,12 @@
|
|
|
347
320
|
"N/A": [
|
|
348
321
|
"不适用"
|
|
349
322
|
],
|
|
350
|
-
"Next run: ": [
|
|
351
|
-
"下一次运行 :"
|
|
352
|
-
],
|
|
353
323
|
"No": [
|
|
354
324
|
"否"
|
|
355
325
|
],
|
|
326
|
+
"No HBI hosts found for organization %s": [
|
|
327
|
+
""
|
|
328
|
+
],
|
|
356
329
|
"No account data available.": [
|
|
357
330
|
"没有可用的帐户数据。"
|
|
358
331
|
],
|
|
@@ -380,15 +353,18 @@
|
|
|
380
353
|
"None of the selected hosts are registered": [
|
|
381
354
|
"所选主机都没有注册"
|
|
382
355
|
],
|
|
356
|
+
"Not present on console.redhat.com Inventory service: ": [
|
|
357
|
+
""
|
|
358
|
+
],
|
|
383
359
|
"Not reporting": [
|
|
384
360
|
"未报告"
|
|
385
361
|
],
|
|
362
|
+
"Not reporting because host_registration_insights parameter value is false": [
|
|
363
|
+
""
|
|
364
|
+
],
|
|
386
365
|
"Nothing to sync, there are no hosts with subscription for this organization.": [
|
|
387
366
|
"没有同步,此机构没有带有订阅的主机。"
|
|
388
367
|
],
|
|
389
|
-
"Notice": [
|
|
390
|
-
"注意事項"
|
|
391
|
-
],
|
|
392
368
|
"Obfuscate host ipv4 addresses": [
|
|
393
369
|
"模糊的主机 ipv4 地址"
|
|
394
370
|
],
|
|
@@ -419,6 +395,12 @@
|
|
|
419
395
|
"Oops! Couldn't find organization that matches your query": [
|
|
420
396
|
"未找到与您的查询匹配的机构"
|
|
421
397
|
],
|
|
398
|
+
"Organization": [
|
|
399
|
+
""
|
|
400
|
+
],
|
|
401
|
+
"Organization not found": [
|
|
402
|
+
""
|
|
403
|
+
],
|
|
422
404
|
"Organization status": [
|
|
423
405
|
"机构标签"
|
|
424
406
|
],
|
|
@@ -440,6 +422,9 @@
|
|
|
440
422
|
"RHC daemon id. Ignored when using local Insights.": [
|
|
441
423
|
"RHC 守护进程 ID。在使用本地 Insights 时忽略。"
|
|
442
424
|
],
|
|
425
|
+
"RHC instance ID to register with Red Hat Sources": [
|
|
426
|
+
""
|
|
427
|
+
],
|
|
443
428
|
"Read more about it in RH cloud insights": [
|
|
444
429
|
"在 RH Cloud insights 中了解更多有关它的信息"
|
|
445
430
|
],
|
|
@@ -458,15 +443,15 @@
|
|
|
458
443
|
"Recommendations": [
|
|
459
444
|
"建议"
|
|
460
445
|
],
|
|
446
|
+
"Recommendations actions": [
|
|
447
|
+
""
|
|
448
|
+
],
|
|
461
449
|
"Recommendations selected: %s.": [
|
|
462
450
|
"选择的建议:%s。"
|
|
463
451
|
],
|
|
464
452
|
"Recommendations synced successfully": [
|
|
465
453
|
"成功同步建议"
|
|
466
454
|
],
|
|
467
|
-
"Reconfigure cloud connector": [
|
|
468
|
-
"重新配置云连接器"
|
|
469
|
-
],
|
|
470
455
|
"Red Hat Cloud Inventory": [
|
|
471
456
|
"红帽云清单"
|
|
472
457
|
],
|
|
@@ -479,8 +464,8 @@
|
|
|
479
464
|
"Red Hat Inventory": [
|
|
480
465
|
"Red Hat 清单"
|
|
481
466
|
],
|
|
482
|
-
"
|
|
483
|
-
"
|
|
467
|
+
"Registered hosts in organization: ": [
|
|
468
|
+
""
|
|
484
469
|
],
|
|
485
470
|
"Remediate": [
|
|
486
471
|
"补救"
|
|
@@ -521,9 +506,18 @@
|
|
|
521
506
|
"Satellite server has %{hits_count} recommendations by Red Hat": [
|
|
522
507
|
"Satellite 服务器有 %{hits_count} 个红帽提供的建议"
|
|
523
508
|
],
|
|
509
|
+
"Schedule a task to register in Red Hat Sources for cloud connector": [
|
|
510
|
+
""
|
|
511
|
+
],
|
|
524
512
|
"Scoped search string for host removal": [
|
|
525
513
|
"用于删除主机的有范围的搜索字符串"
|
|
526
514
|
],
|
|
515
|
+
"Searching by recommendations count is not available in IoP mode.": [
|
|
516
|
+
""
|
|
517
|
+
],
|
|
518
|
+
"Select all recommendations": [
|
|
519
|
+
""
|
|
520
|
+
],
|
|
527
521
|
"Select recommendations from all pages": [
|
|
528
522
|
"在所有页面中选择建议"
|
|
529
523
|
],
|
|
@@ -542,9 +536,6 @@
|
|
|
542
536
|
"Show Advanced Settings": [
|
|
543
537
|
"显示高级设置"
|
|
544
538
|
],
|
|
545
|
-
"Show if system is configured to use local iop-advisor-engine.": [
|
|
546
|
-
"显示系统是否被配置为使用本地 iop-advisor-engine。"
|
|
547
|
-
],
|
|
548
539
|
"Single-host report job": [
|
|
549
540
|
"单主机报告作业"
|
|
550
541
|
],
|
|
@@ -566,11 +557,8 @@
|
|
|
566
557
|
"Success": [
|
|
567
558
|
"成功"
|
|
568
559
|
],
|
|
569
|
-
"Successfully
|
|
570
|
-
"
|
|
571
|
-
],
|
|
572
|
-
"Successfully uploaded to your RH cloud inventory": [
|
|
573
|
-
"成功上传到您的 RH 云清单"
|
|
560
|
+
"Successfully deleted all HBI hosts for organization %s": [
|
|
561
|
+
""
|
|
574
562
|
],
|
|
575
563
|
"Sync automatically": [
|
|
576
564
|
"自动同步"
|
|
@@ -581,6 +569,9 @@
|
|
|
581
569
|
"Synchronize recommendations Automatically": [
|
|
582
570
|
"自动同步建议"
|
|
583
571
|
],
|
|
572
|
+
"Table actions": [
|
|
573
|
+
""
|
|
574
|
+
],
|
|
584
575
|
"The Foreman inventory upload plugin automatically uploads Foreman host inventory data to the Inventory service of Insights, where it can also be used by the Subscriptions service for subscription reporting. If you use the Subscriptions service, enabling inventory uploads is required.": [
|
|
585
576
|
"Foreman 清单上传插件会自动将 Foreman 主机清单数据上传到 Insights 的 Inventory 服务,订阅服务使用这些信息来提供订阅报告。如果使用订阅服务,则需要启用清单上传。"
|
|
586
577
|
],
|
|
@@ -605,9 +596,6 @@
|
|
|
605
596
|
"There were no missing Insights facets": [
|
|
606
597
|
"没有缺失的 Insights 情况"
|
|
607
598
|
],
|
|
608
|
-
"This action will also enable automatic reports upload": [
|
|
609
|
-
"此操作还会启用自动报告上传"
|
|
610
|
-
],
|
|
611
599
|
"To enable this reporting for all Foreman organizations, set {uploadButtonName} to on. The data will be reported automatically once per day.": [
|
|
612
600
|
"要为所有 Foreman 机构启用此报告,请将 {uploadButtonName} 设置为 on。数据将每天自动报告一次。"
|
|
613
601
|
],
|
|
@@ -626,6 +614,9 @@
|
|
|
626
614
|
"Unknown": [
|
|
627
615
|
"未知"
|
|
628
616
|
],
|
|
617
|
+
"Unsupported operator for recommendations count search: %s": [
|
|
618
|
+
""
|
|
619
|
+
],
|
|
629
620
|
"Upload hits from iop-advisor-engine": [
|
|
630
621
|
"从 iop-advisor-engine 上传 hits"
|
|
631
622
|
],
|
|
@@ -641,8 +632,8 @@
|
|
|
641
632
|
"Uploaded": [
|
|
642
633
|
"已上传"
|
|
643
634
|
],
|
|
644
|
-
"
|
|
645
|
-
"
|
|
635
|
+
"Uploaded and present on console.redhat.com Inventory service: ": [
|
|
636
|
+
""
|
|
646
637
|
],
|
|
647
638
|
"Value %{value} is not a valid UUID": [
|
|
648
639
|
"值 %{value} 不是一个有效的 UUID"
|
|
@@ -680,6 +671,9 @@
|
|
|
680
671
|
"Whether the resolution requires reboot": [
|
|
681
672
|
"resolution 是否需要重启"
|
|
682
673
|
],
|
|
674
|
+
"You can review this information later by looking at the Inventory status of each host.": [
|
|
675
|
+
""
|
|
676
|
+
],
|
|
683
677
|
"You do not have permission to perform this action": [
|
|
684
678
|
"您没有执行此操作的权限"
|
|
685
679
|
],
|
|
@@ -689,9 +683,6 @@
|
|
|
689
683
|
"generic": [
|
|
690
684
|
"通用"
|
|
691
685
|
],
|
|
692
|
-
"hosts page": [
|
|
693
|
-
"主机页"
|
|
694
|
-
],
|
|
695
686
|
"impact name": [
|
|
696
687
|
"影响名称"
|
|
697
688
|
],
|
|
@@ -764,9 +755,6 @@
|
|
|
764
755
|
"upload resolutions related to the hits": [
|
|
765
756
|
"上传与 hits 相关的 resolutions"
|
|
766
757
|
],
|
|
767
|
-
"view the job in progress": [
|
|
768
|
-
"查看正在进行中的任务"
|
|
769
|
-
],
|
|
770
758
|
"view the task page for more details": [
|
|
771
759
|
"查看任务页面以了解更多详细信息"
|
|
772
760
|
]
|
|
@@ -39,6 +39,7 @@ module ForemanRhCloud
|
|
|
39
39
|
# edit_vulnerability | PATCH /api/vulnerability/v1/cves/status
|
|
40
40
|
# | PATCH /api/vulnerability/v1/cves/business_risk
|
|
41
41
|
# edit_vulnerability | PATCH /api/vulnerability/v1/systems/opt_out
|
|
42
|
+
# | PATCH /api/vulnerability/v1/feature/cves_without_errata
|
|
42
43
|
#
|
|
43
44
|
# view_advisor | GET /api/insights/v1/*
|
|
44
45
|
# edit_advisor | POST /api/insights/v1/ack/
|
|
@@ -177,6 +178,22 @@ module ForemanRhCloud
|
|
|
177
178
|
'GET' => :view_compliance,
|
|
178
179
|
},
|
|
179
180
|
},
|
|
181
|
+
# Test results for a report - requires view_compliance for GET
|
|
182
|
+
{
|
|
183
|
+
test: %r{api/compliance/v2/reports/[^/]+/test_results$},
|
|
184
|
+
tag_name: :tags,
|
|
185
|
+
permissions: {
|
|
186
|
+
'GET' => :view_compliance,
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
# Individual test result in a report - requires view_compliance for GET
|
|
190
|
+
{
|
|
191
|
+
test: %r{api/compliance/v2/reports/[^/]+/test_results/[^/]+$},
|
|
192
|
+
tag_name: :tags,
|
|
193
|
+
permissions: {
|
|
194
|
+
'GET' => :view_compliance,
|
|
195
|
+
},
|
|
196
|
+
},
|
|
180
197
|
# Other compliance endpoints - GET requires view_compliance
|
|
181
198
|
{
|
|
182
199
|
test: %r{api/compliance/v2/.*},
|
|
@@ -239,6 +256,14 @@ module ForemanRhCloud
|
|
|
239
256
|
'GET' => :view_vulnerability,
|
|
240
257
|
},
|
|
241
258
|
},
|
|
259
|
+
# CVEs without errata feature flag - no tags support (per OpenAPI spec)
|
|
260
|
+
{
|
|
261
|
+
test: %r{api/vulnerability/v1/feature/cves_without_errata$},
|
|
262
|
+
permissions: {
|
|
263
|
+
'GET' => :view_vulnerability,
|
|
264
|
+
'PATCH' => :edit_vulnerability,
|
|
265
|
+
},
|
|
266
|
+
},
|
|
242
267
|
# Other vulnerability endpoints - GET requires view_vulnerability (with tags support)
|
|
243
268
|
{
|
|
244
269
|
test: %r{api/vulnerability/v1/.*},
|
|
@@ -62,7 +62,7 @@ module ForemanInventoryUpload
|
|
|
62
62
|
:content_facet,
|
|
63
63
|
:host_statuses,
|
|
64
64
|
:inventory_upload_facts,
|
|
65
|
-
subscription_facet: [:installed_products, :
|
|
65
|
+
subscription_facet: [:installed_products, { hypervisor_host: :subscription_facet }]
|
|
66
66
|
)
|
|
67
67
|
end
|
|
68
68
|
|
|
@@ -78,12 +78,24 @@ module ForemanInventoryUpload
|
|
|
78
78
|
@stream.simple_field('number_of_cpus', fact_value(host, 'cpu::cpu(s)')) { |v| v.to_i } if fact_value(host, 'cpu::cpu(s)').present?
|
|
79
79
|
@stream.simple_field('number_of_sockets', fact_value(host, 'cpu::cpu_socket(s)'), :last) { |v| v.to_i } if fact_value(host, 'cpu::cpu_socket(s)').present?
|
|
80
80
|
end
|
|
81
|
+
virtual_host_uuid = host.subscription_facet&.hypervisor_host&.subscription_facet&.uuid
|
|
81
82
|
if host.subscription_facet.hypervisor?
|
|
82
83
|
@stream.simple_field('cpu_socket(s)', fact_value(host, 'cpu::cpu_socket(s)'))
|
|
83
84
|
@stream.simple_field('hypervisor_type', fact_value(host, 'hypervisor::type'))
|
|
84
|
-
@stream.simple_field('hypervisor_version', fact_value(host, 'hypervisor::version'),
|
|
85
|
+
@stream.simple_field('hypervisor_version', fact_value(host, 'hypervisor::version'), virtual_host_uuid.blank?)
|
|
85
86
|
else
|
|
86
|
-
@stream.simple_field('cpu_socket(s)', fact_value(host, 'cpu::cpu_socket(s)'),
|
|
87
|
+
@stream.simple_field('cpu_socket(s)', fact_value(host, 'cpu::cpu_socket(s)'), virtual_host_uuid.blank?)
|
|
88
|
+
end
|
|
89
|
+
# Guests need the hypervisor mapping in the satellite facts namespace for Subscription Watch, even in minimal mode
|
|
90
|
+
return if virtual_host_uuid.blank?
|
|
91
|
+
|
|
92
|
+
@stream.array_field('facts', :last) do
|
|
93
|
+
@stream.object do
|
|
94
|
+
@stream.simple_field('namespace', SATELLITE_NAMESPACE)
|
|
95
|
+
@stream.object_field('facts', :last) do
|
|
96
|
+
@stream.simple_field('virtual_host_uuid', virtual_host_uuid, :last)
|
|
97
|
+
end
|
|
98
|
+
end
|
|
87
99
|
end
|
|
88
100
|
end
|
|
89
101
|
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
module ForemanInventoryUpload
|
|
2
2
|
def self.base_folder
|
|
3
|
-
|
|
4
|
-
# create folders under /var/lib/foreman. If the folder does not exist, it's
|
|
5
|
-
# a dev setup, where we can use the parent of the current working directory
|
|
6
|
-
@base_folder ||= File.join(
|
|
7
|
-
Dir.glob('/var/lib/foreman').first || File.dirname(Dir.getwd),
|
|
8
|
-
'red_hat_inventory/'
|
|
9
|
-
)
|
|
3
|
+
@base_folder ||= Rails.root.join('tmp/red_hat_inventory').to_s
|
|
10
4
|
end
|
|
11
5
|
|
|
12
6
|
def self.uploads_folder
|