foreman_rh_cloud 13.2.0 → 14.0.1
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/app/assets/javascripts/foreman_rh_cloud/locale/fr/foreman_rh_cloud.js +133 -1
- data/app/assets/javascripts/foreman_rh_cloud/locale/ja/foreman_rh_cloud.js +133 -1
- data/app/assets/javascripts/foreman_rh_cloud/locale/ka/foreman_rh_cloud.js +133 -1
- data/app/assets/javascripts/foreman_rh_cloud/locale/ko/foreman_rh_cloud.js +133 -1
- data/app/assets/javascripts/foreman_rh_cloud/locale/zh_CN/foreman_rh_cloud.js +133 -1
- data/lib/foreman_inventory_upload/generators/fact_helpers.rb +0 -8
- data/lib/foreman_inventory_upload/generators/queries.rb +13 -3
- data/lib/foreman_inventory_upload/generators/slice.rb +1 -1
- data/lib/foreman_inventory_upload.rb +23 -8
- data/lib/foreman_rh_cloud/version.rb +1 -1
- data/locale/Makefile +3 -3
- data/locale/foreman_rh_cloud.pot +245 -41
- data/locale/fr/LC_MESSAGES/foreman_rh_cloud.mo +0 -0
- data/locale/fr/foreman_rh_cloud.edit.po +1032 -0
- data/locale/fr/foreman_rh_cloud.po +133 -1
- data/locale/fr/foreman_rh_cloud.po.time_stamp +0 -0
- data/locale/ja/LC_MESSAGES/foreman_rh_cloud.mo +0 -0
- data/locale/ja/foreman_rh_cloud.edit.po +1026 -0
- data/locale/ja/foreman_rh_cloud.po +133 -1
- data/locale/ja/foreman_rh_cloud.po.time_stamp +0 -0
- data/locale/ka/LC_MESSAGES/foreman_rh_cloud.mo +0 -0
- data/locale/ka/foreman_rh_cloud.edit.po +1025 -0
- data/locale/ka/foreman_rh_cloud.po +133 -1
- data/locale/ka/foreman_rh_cloud.po.time_stamp +0 -0
- data/locale/ko/LC_MESSAGES/foreman_rh_cloud.mo +0 -0
- data/locale/ko/foreman_rh_cloud.edit.po +1029 -0
- data/locale/ko/foreman_rh_cloud.po +133 -1
- data/locale/ko/foreman_rh_cloud.po.time_stamp +0 -0
- data/locale/zh_CN/LC_MESSAGES/foreman_rh_cloud.mo +0 -0
- data/locale/zh_CN/foreman_rh_cloud.edit.po +1031 -0
- data/locale/zh_CN/foreman_rh_cloud.po +133 -1
- data/locale/zh_CN/foreman_rh_cloud.po.time_stamp +0 -0
- data/package.json +1 -1
- data/test/controllers/insights_cloud/api/advisor_engine_controller_test.rb +5 -0
- data/test/controllers/insights_cloud/api/machine_telemetries_controller_test.rb +6 -1
- data/test/controllers/insights_sync/settings_controller_test.rb +5 -0
- data/test/jobs/host_inventory_report_job_test.rb +2 -0
- data/test/jobs/inventory_full_sync_test.rb +4 -7
- data/test/jobs/inventory_hosts_sync_test.rb +5 -7
- data/test/jobs/inventory_scheduled_sync_test.rb +5 -0
- data/test/jobs/inventory_self_host_sync_test.rb +1 -1
- data/test/jobs/single_host_report_job_test.rb +2 -0
- data/test/jobs/upload_report_direct_job_test.rb +5 -0
- data/test/unit/archived_report_generator_test.rb +1 -2
- data/test/unit/fact_helpers_test.rb +0 -16
- data/test/unit/lib/foreman_rh_cloud/registration_manager_extensions_test.rb +5 -0
- data/test/unit/lib/insights_cloud/async/vmaas_reposcan_sync_test.rb +5 -0
- data/test/unit/rh_cloud_http_proxy_test.rb +5 -0
- data/test/unit/services/foreman_rh_cloud/branch_info_test.rb +1 -1
- data/test/unit/services/foreman_rh_cloud/cloud_request_forwarder_test.rb +1 -1
- data/test/unit/slice_generator_test.rb +43 -22
- metadata +16 -3
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"locale_data": {
|
|
4
4
|
"foreman_rh_cloud": {
|
|
5
5
|
"": {
|
|
6
|
-
"Project-Id-Version": "foreman_rh_cloud 13.0
|
|
6
|
+
"Project-Id-Version": "foreman_rh_cloud 13.2.0",
|
|
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, 2025",
|
|
@@ -23,6 +23,9 @@
|
|
|
23
23
|
"%s organizations": [
|
|
24
24
|
"%s 机构"
|
|
25
25
|
],
|
|
26
|
+
"A specific organization must be selected from the organization context.": [
|
|
27
|
+
""
|
|
28
|
+
],
|
|
26
29
|
"About subscription watch": [
|
|
27
30
|
"订阅查看"
|
|
28
31
|
],
|
|
@@ -35,6 +38,9 @@
|
|
|
35
38
|
"All recommendations are now selected.": [
|
|
36
39
|
"现在选择了所有建议。"
|
|
37
40
|
],
|
|
41
|
+
"Analysis disabled": [
|
|
42
|
+
""
|
|
43
|
+
],
|
|
38
44
|
"Analytics data collection": [
|
|
39
45
|
"数据收集分析"
|
|
40
46
|
],
|
|
@@ -44,6 +50,9 @@
|
|
|
44
50
|
"Apply Insights recommendations": [
|
|
45
51
|
"应用 Insights 建议"
|
|
46
52
|
],
|
|
53
|
+
"Attempted to destroy HBI host %s, but host does not exist in HBI": [
|
|
54
|
+
""
|
|
55
|
+
],
|
|
47
56
|
"Automatic inventory upload": [
|
|
48
57
|
"自动清单上传"
|
|
49
58
|
],
|
|
@@ -83,6 +92,9 @@
|
|
|
83
92
|
"Completed": [
|
|
84
93
|
"完成"
|
|
85
94
|
],
|
|
95
|
+
"Completed with warnings": [
|
|
96
|
+
""
|
|
97
|
+
],
|
|
86
98
|
"Configure": [
|
|
87
99
|
"配置"
|
|
88
100
|
],
|
|
@@ -101,6 +113,15 @@
|
|
|
101
113
|
"Current page": [
|
|
102
114
|
"当前页"
|
|
103
115
|
],
|
|
116
|
+
"Details": [
|
|
117
|
+
""
|
|
118
|
+
],
|
|
119
|
+
"Disable": [
|
|
120
|
+
""
|
|
121
|
+
],
|
|
122
|
+
"Disable vulnerability analysis": [
|
|
123
|
+
""
|
|
124
|
+
],
|
|
104
125
|
"Disconnected hosts: ": [
|
|
105
126
|
"断开连接的主机:"
|
|
106
127
|
],
|
|
@@ -116,6 +137,15 @@
|
|
|
116
137
|
"Download latest report": [
|
|
117
138
|
"下载最新的报告"
|
|
118
139
|
],
|
|
140
|
+
"Download report": [
|
|
141
|
+
""
|
|
142
|
+
],
|
|
143
|
+
"Duration": [
|
|
144
|
+
""
|
|
145
|
+
],
|
|
146
|
+
"Enable": [
|
|
147
|
+
""
|
|
148
|
+
],
|
|
119
149
|
"Enable automatic deletion of mismatched host records from the Red Hat cloud": [
|
|
120
150
|
"启用自动删除来自红帽云的主机记录"
|
|
121
151
|
],
|
|
@@ -140,6 +170,9 @@
|
|
|
140
170
|
"Enable inventory upload": [
|
|
141
171
|
"启用清单上传"
|
|
142
172
|
],
|
|
173
|
+
"Enable vulnerability analysis": [
|
|
174
|
+
""
|
|
175
|
+
],
|
|
143
176
|
"Encountered an error while trying to access the server:": [
|
|
144
177
|
"在尝试访问服务器时遇到错误:"
|
|
145
178
|
],
|
|
@@ -155,6 +188,18 @@
|
|
|
155
188
|
"Exit Code: %s": [
|
|
156
189
|
"退出代码:%s"
|
|
157
190
|
],
|
|
191
|
+
"Failed": [
|
|
192
|
+
""
|
|
193
|
+
],
|
|
194
|
+
"Failed to destroy HBI host %s: %s": [
|
|
195
|
+
""
|
|
196
|
+
],
|
|
197
|
+
"Failed to fetch hosts": [
|
|
198
|
+
""
|
|
199
|
+
],
|
|
200
|
+
"Failed to update vulnerability analysis status": [
|
|
201
|
+
""
|
|
202
|
+
],
|
|
158
203
|
"Fetch Insights-related host details": [
|
|
159
204
|
"获取与 Insights 相关的主机详情"
|
|
160
205
|
],
|
|
@@ -191,6 +236,9 @@
|
|
|
191
236
|
"Generate the report, but do not upload": [
|
|
192
237
|
"生成报告,但不上传"
|
|
193
238
|
],
|
|
239
|
+
"Generated": [
|
|
240
|
+
""
|
|
241
|
+
],
|
|
194
242
|
"Generating": [
|
|
195
243
|
"生成中"
|
|
196
244
|
],
|
|
@@ -239,6 +287,9 @@
|
|
|
239
287
|
"Insights": [
|
|
240
288
|
"Insights"
|
|
241
289
|
],
|
|
290
|
+
"Invalid response from server": [
|
|
291
|
+
""
|
|
292
|
+
],
|
|
242
293
|
"Inventory": [
|
|
243
294
|
"清单"
|
|
244
295
|
],
|
|
@@ -275,6 +326,9 @@
|
|
|
275
326
|
"Low": [
|
|
276
327
|
"低"
|
|
277
328
|
],
|
|
329
|
+
"Manage vulnerability analysis": [
|
|
330
|
+
""
|
|
331
|
+
],
|
|
278
332
|
"Manual": [
|
|
279
333
|
"手册"
|
|
280
334
|
],
|
|
@@ -290,21 +344,42 @@
|
|
|
290
344
|
"More details can be found in": [
|
|
291
345
|
"如需更多详细信息,请参阅"
|
|
292
346
|
],
|
|
347
|
+
"N/A": [
|
|
348
|
+
""
|
|
349
|
+
],
|
|
293
350
|
"Next run: ": [
|
|
294
351
|
"下一次运行 :"
|
|
295
352
|
],
|
|
296
353
|
"No": [
|
|
297
354
|
"否"
|
|
298
355
|
],
|
|
356
|
+
"No account data available.": [
|
|
357
|
+
""
|
|
358
|
+
],
|
|
359
|
+
"No recent tasks": [
|
|
360
|
+
""
|
|
361
|
+
],
|
|
299
362
|
"No recommendations were found for this host!": [
|
|
300
363
|
"没有找到此主机的建议!"
|
|
301
364
|
],
|
|
365
|
+
"No report generation tasks have been run yet.": [
|
|
366
|
+
""
|
|
367
|
+
],
|
|
302
368
|
"No results found": [
|
|
303
369
|
"没有找到结果"
|
|
304
370
|
],
|
|
371
|
+
"No task history": [
|
|
372
|
+
""
|
|
373
|
+
],
|
|
305
374
|
"No task was found": [
|
|
306
375
|
"没有找到任务"
|
|
307
376
|
],
|
|
377
|
+
"No tasks have been run yet.": [
|
|
378
|
+
""
|
|
379
|
+
],
|
|
380
|
+
"None of the selected hosts are registered": [
|
|
381
|
+
""
|
|
382
|
+
],
|
|
308
383
|
"Not reporting": [
|
|
309
384
|
"未报告"
|
|
310
385
|
],
|
|
@@ -350,9 +425,15 @@
|
|
|
350
425
|
"Pagination": [
|
|
351
426
|
"分页"
|
|
352
427
|
],
|
|
428
|
+
"Paused": [
|
|
429
|
+
""
|
|
430
|
+
],
|
|
353
431
|
"Playbook": [
|
|
354
432
|
"运行 playbook"
|
|
355
433
|
],
|
|
434
|
+
"Previous tasks will appear here.": [
|
|
435
|
+
""
|
|
436
|
+
],
|
|
356
437
|
"RH Cloud": [
|
|
357
438
|
"RH Cloud"
|
|
358
439
|
],
|
|
@@ -407,6 +488,18 @@
|
|
|
407
488
|
"Remediation summary": [
|
|
408
489
|
"补救概述"
|
|
409
490
|
],
|
|
491
|
+
"Report Generation": [
|
|
492
|
+
""
|
|
493
|
+
],
|
|
494
|
+
"Report generation and upload started": [
|
|
495
|
+
""
|
|
496
|
+
],
|
|
497
|
+
"Report generation started": [
|
|
498
|
+
""
|
|
499
|
+
],
|
|
500
|
+
"Report saved to": [
|
|
501
|
+
""
|
|
502
|
+
],
|
|
410
503
|
"Reporting": [
|
|
411
504
|
"报告"
|
|
412
505
|
],
|
|
@@ -422,6 +515,9 @@
|
|
|
422
515
|
"Run remediation playbook generated by Insights": [
|
|
423
516
|
"运行 Insights 生成的补救 playbook"
|
|
424
517
|
],
|
|
518
|
+
"Running": [
|
|
519
|
+
""
|
|
520
|
+
],
|
|
425
521
|
"Satellite server has %{hits_count} recommendations by Red Hat": [
|
|
426
522
|
"Satellite 服务器有 %{hits_count} 个红帽提供的建议"
|
|
427
523
|
],
|
|
@@ -461,6 +557,15 @@
|
|
|
461
557
|
"Start report generation": [
|
|
462
558
|
"开始报告生成"
|
|
463
559
|
],
|
|
560
|
+
"Started": [
|
|
561
|
+
""
|
|
562
|
+
],
|
|
563
|
+
"Stopped": [
|
|
564
|
+
""
|
|
565
|
+
],
|
|
566
|
+
"Success": [
|
|
567
|
+
""
|
|
568
|
+
],
|
|
464
569
|
"Successfully synced hosts: ": [
|
|
465
570
|
"成功同步的主机:"
|
|
466
571
|
],
|
|
@@ -518,15 +623,24 @@
|
|
|
518
623
|
"Total risks": [
|
|
519
624
|
"总风险"
|
|
520
625
|
],
|
|
626
|
+
"Unknown": [
|
|
627
|
+
""
|
|
628
|
+
],
|
|
521
629
|
"Upload hits from iop-advisor-engine": [
|
|
522
630
|
"从 iop-advisor-engine 上传 hits"
|
|
523
631
|
],
|
|
524
632
|
"Upload hits information": [
|
|
525
633
|
"上传 hits 信息"
|
|
526
634
|
],
|
|
635
|
+
"Upload is disabled because subscription connection is not enabled. Enable it in Administer > Settings > Content.": [
|
|
636
|
+
""
|
|
637
|
+
],
|
|
527
638
|
"Upload rules related to the hits": [
|
|
528
639
|
"上传与 hits 相关的 rule"
|
|
529
640
|
],
|
|
641
|
+
"Uploaded": [
|
|
642
|
+
""
|
|
643
|
+
],
|
|
530
644
|
"Uploading": [
|
|
531
645
|
"上载中"
|
|
532
646
|
],
|
|
@@ -539,18 +653,36 @@
|
|
|
539
653
|
"View in Red Hat Insights": [
|
|
540
654
|
"禁用 Red Hat Insights"
|
|
541
655
|
],
|
|
656
|
+
"View task": [
|
|
657
|
+
""
|
|
658
|
+
],
|
|
659
|
+
"View task details": [
|
|
660
|
+
""
|
|
661
|
+
],
|
|
542
662
|
"Vulnerabilities": [
|
|
543
663
|
"安全漏洞"
|
|
544
664
|
],
|
|
545
665
|
"Vulnerability": [
|
|
546
666
|
"安全漏洞"
|
|
547
667
|
],
|
|
668
|
+
"Vulnerability analysis disabled": [
|
|
669
|
+
""
|
|
670
|
+
],
|
|
671
|
+
"Vulnerability analysis enabled": [
|
|
672
|
+
""
|
|
673
|
+
],
|
|
548
674
|
"Wait and %s": [
|
|
549
675
|
"等待和 %s"
|
|
550
676
|
],
|
|
677
|
+
"Warning": [
|
|
678
|
+
""
|
|
679
|
+
],
|
|
551
680
|
"Whether the resolution requires reboot": [
|
|
552
681
|
"resolution 是否需要重启"
|
|
553
682
|
],
|
|
683
|
+
"You do not have permission to perform this action": [
|
|
684
|
+
""
|
|
685
|
+
],
|
|
554
686
|
"category name": [
|
|
555
687
|
"类别名称"
|
|
556
688
|
],
|
|
@@ -28,14 +28,6 @@ module ForemanInventoryUpload
|
|
|
28
28
|
@organization_accounts[organization.id] ||= organization.pools.where.not(account_number: nil).pluck(:account_number).first
|
|
29
29
|
end
|
|
30
30
|
|
|
31
|
-
def golden_ticket?(organization)
|
|
32
|
-
result = organization.try(:golden_ticket?)
|
|
33
|
-
result = organization.content_access_mode == 'org_environment' if result.nil?
|
|
34
|
-
|
|
35
|
-
@organization_golden_tickets ||= {}
|
|
36
|
-
@organization_golden_tickets[organization.id] ||= result
|
|
37
|
-
end
|
|
38
|
-
|
|
39
31
|
def cloud_provider(host)
|
|
40
32
|
bios_version = fact_value(host, 'dmi::bios::version')
|
|
41
33
|
|
|
@@ -47,8 +47,14 @@ module ForemanInventoryUpload
|
|
|
47
47
|
end
|
|
48
48
|
|
|
49
49
|
def self.for_slice(base)
|
|
50
|
-
base
|
|
51
|
-
|
|
50
|
+
query = base
|
|
51
|
+
|
|
52
|
+
# In IoP mode, skip the parameter check - include all hosts regardless of opt-out setting
|
|
53
|
+
unless skip_inventory_parameter_filter?
|
|
54
|
+
query = query.search_for("not params.#{InsightsCloud.enable_client_param_inventory} = f")
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
query
|
|
52
58
|
.joins(:subscription_facet)
|
|
53
59
|
.preload(
|
|
54
60
|
:interfaces,
|
|
@@ -56,10 +62,14 @@ module ForemanInventoryUpload
|
|
|
56
62
|
:content_facet,
|
|
57
63
|
:host_statuses,
|
|
58
64
|
:inventory_upload_facts,
|
|
59
|
-
subscription_facet: [:
|
|
65
|
+
subscription_facet: [:installed_products, :hypervisor_host]
|
|
60
66
|
)
|
|
61
67
|
end
|
|
62
68
|
|
|
69
|
+
def self.skip_inventory_parameter_filter?
|
|
70
|
+
ForemanRhCloud.with_iop_smart_proxy?
|
|
71
|
+
end
|
|
72
|
+
|
|
63
73
|
def self.for_org(organization_id, use_batches: true, hosts_query: '')
|
|
64
74
|
base_query = for_slice(Host.unscoped.where(organization_id: organization_id).search_for(hosts_query))
|
|
65
75
|
use_batches ? base_query.in_batches(of: ForemanInventoryUpload.slice_size) : base_query
|
|
@@ -230,7 +230,7 @@ module ForemanInventoryUpload
|
|
|
230
230
|
@stream.simple_field('system_purpose_sla', host.subscription_facet.service_level)
|
|
231
231
|
@stream.simple_field('distribution_version', fact_value(host, 'distribution::version'))
|
|
232
232
|
@stream.simple_field('satellite_instance_id', Foreman.try(:instance_id))
|
|
233
|
-
@stream.simple_field('is_simple_content_access',
|
|
233
|
+
@stream.simple_field('is_simple_content_access', true)
|
|
234
234
|
@stream.simple_field('is_hostname_obfuscated', !!obfuscate_hostname?(host))
|
|
235
235
|
@stream.simple_field('organization_id', host.organization_id, :last)
|
|
236
236
|
end
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
module ForemanInventoryUpload
|
|
2
2
|
def self.base_folder
|
|
3
3
|
# in production setup, where selinux is enabled, we only have rights to
|
|
4
|
-
# create folders under /
|
|
5
|
-
# a dev setup, where we can use
|
|
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
6
|
@base_folder ||= File.join(
|
|
7
|
-
Dir.glob('/var/lib/foreman').first || Dir.getwd,
|
|
7
|
+
Dir.glob('/var/lib/foreman').first || File.dirname(Dir.getwd),
|
|
8
8
|
'red_hat_inventory/'
|
|
9
9
|
)
|
|
10
10
|
end
|
|
@@ -30,11 +30,6 @@ module ForemanInventoryUpload
|
|
|
30
30
|
File.join(ForemanInventoryUpload.done_folder, filename)
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
-
def self.report_file_paths(organization_id)
|
|
34
|
-
filename = facts_archive_name(organization_id)
|
|
35
|
-
Dir[ForemanInventoryUpload.uploads_file_path(filename), ForemanInventoryUpload.done_file_path(filename)]
|
|
36
|
-
end
|
|
37
|
-
|
|
38
33
|
def self.generated_reports_folder
|
|
39
34
|
@generated_reports_folder ||= ensure_folder(
|
|
40
35
|
File.join(
|
|
@@ -44,6 +39,26 @@ module ForemanInventoryUpload
|
|
|
44
39
|
)
|
|
45
40
|
end
|
|
46
41
|
|
|
42
|
+
def self.generated_reports_file_path(filename)
|
|
43
|
+
File.join(ForemanInventoryUpload.generated_reports_folder, filename)
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def self.report_file_paths(organization_id)
|
|
47
|
+
filename = facts_archive_name(organization_id)
|
|
48
|
+
# Report files start in generated
|
|
49
|
+
# They are then MOVED (not copied) to uploads, then done.
|
|
50
|
+
# When they are moved to the new folder, they overwrite any file with the same name.
|
|
51
|
+
# If it's a generate-only, it will be in generated
|
|
52
|
+
# Failed or incomplete uploads will be in uploads
|
|
53
|
+
# Completed uploads will be in done
|
|
54
|
+
# The ordering here ensures we get the correct file path every time.
|
|
55
|
+
Dir[
|
|
56
|
+
ForemanInventoryUpload.generated_reports_file_path(filename),
|
|
57
|
+
ForemanInventoryUpload.uploads_file_path(filename),
|
|
58
|
+
ForemanInventoryUpload.done_file_path(filename),
|
|
59
|
+
]
|
|
60
|
+
end
|
|
61
|
+
|
|
47
62
|
def self.outputs_folder
|
|
48
63
|
@outputs_folder ||= ensure_folder(File.join(ForemanInventoryUpload.base_folder, 'outputs/'))
|
|
49
64
|
end
|
data/locale/Makefile
CHANGED
|
@@ -60,9 +60,9 @@ tx-pull: $(EDITFILES)
|
|
|
60
60
|
|
|
61
61
|
tx-update: tx-pull
|
|
62
62
|
@echo
|
|
63
|
-
@echo Run rake plugin:gettext[$(DOMAIN)] from the Foreman installation
|
|
64
|
-
@echo then run rake plugin:po_to_json[$(DOMAIN)] from the Foreman installation
|
|
65
|
-
@echo then run make -C locale mo-files to finish
|
|
63
|
+
@echo Run bundle exec rake plugin:gettext[$(DOMAIN)] from the Foreman installation git directory
|
|
64
|
+
@echo then run bundle exec rake plugin:po_to_json[$(DOMAIN)] from the Foreman installation git directory
|
|
65
|
+
@echo then run make -C locale mo-files from the foreman_rh_cloud directory to finish
|
|
66
66
|
@echo
|
|
67
67
|
|
|
68
68
|
mo-files: $(MOFILES)
|