foreman_rh_cloud 3.0.22 → 3.0.25
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/api/v2/rh_cloud/inventory_controller.rb +50 -0
- data/app/controllers/concerns/inventory_upload/report_actions.rb +26 -0
- data/app/controllers/concerns/inventory_upload/task_actions.rb +25 -0
- data/app/controllers/foreman_inventory_upload/reports_controller.rb +3 -1
- data/app/controllers/foreman_inventory_upload/tasks_controller.rb +5 -13
- data/app/controllers/foreman_inventory_upload/uploads_controller.rb +4 -4
- data/app/controllers/insights_cloud/api/machine_telemetries_controller.rb +6 -3
- data/app/controllers/insights_cloud/hits_controller.rb +7 -3
- data/app/helpers/foreman_insights_deprecations_helper.rb +9 -0
- data/app/helpers/foreman_insights_host_helper.rb +19 -0
- data/app/models/insights_client_report_status.rb +11 -22
- data/app/overrides/old_plugin_deprecation.rb +20 -0
- data/app/services/foreman_rh_cloud/cloud_auth.rb +4 -0
- data/app/services/foreman_rh_cloud/cloud_request_forwarder.rb +0 -8
- data/app/services/foreman_rh_cloud/insights_status_cleaner.rb +17 -0
- data/app/services/foreman_rh_cloud/remediations_retriever.rb +5 -0
- data/config/package-lock.json.plugin +32774 -0
- data/config/routes.rb +19 -0
- data/db/migrate/20210720000001_remove_old_insights_statuses.foreman_rh_cloud.rb +6 -0
- data/lib/foreman_inventory_upload.rb +9 -1
- data/lib/foreman_inventory_upload/generators/queries.rb +1 -0
- data/lib/foreman_inventory_upload/generators/slice.rb +1 -0
- data/lib/foreman_inventory_upload/generators/tags.rb +3 -1
- data/lib/foreman_rh_cloud/engine.rb +17 -10
- data/lib/foreman_rh_cloud/version.rb +1 -1
- data/lib/insights_cloud/async/insights_client_status_aging.rb +23 -0
- data/lib/insights_cloud/async/insights_full_sync.rb +5 -0
- data/lib/insights_cloud/async/insights_resolutions_sync.rb +9 -0
- data/lib/insights_cloud/async/insights_rules_sync.rb +5 -0
- data/lib/inventory_sync/async/host_result.rb +4 -0
- data/lib/inventory_sync/async/inventory_full_sync.rb +5 -0
- data/lib/inventory_sync/async/inventory_hosts_sync.rb +21 -2
- data/lib/inventory_sync/async/inventory_scheduled_sync.rb +4 -0
- data/lib/inventory_sync/async/inventory_self_host_sync.rb +39 -0
- data/lib/inventory_sync/async/query_inventory_job.rb +5 -1
- data/lib/tasks/insights.rake +15 -0
- data/lib/tasks/rh_cloud_inventory.rake +2 -1
- data/package.json +2 -2
- data/test/controllers/insights_cloud/api/machine_telemetries_controller_test.rb +41 -0
- data/test/controllers/inventory_upload/api/inventory_controller_test.rb +53 -0
- data/test/jobs/insights_client_status_aging_test.rb +33 -0
- data/test/jobs/insights_full_sync_test.rb +1 -0
- data/test/jobs/insights_resolutions_sync_test.rb +1 -0
- data/test/jobs/insights_rules_sync_test.rb +1 -0
- data/test/jobs/inventory_full_sync_test.rb +10 -0
- data/test/jobs/inventory_hosts_sync_test.rb +268 -0
- data/test/jobs/inventory_scheduled_sync_test.rb +22 -0
- data/test/jobs/inventory_self_host_sync_test.rb +104 -0
- data/test/models/insights_client_report_status_test.rb +70 -72
- data/test/test_plugin_helper.rb +2 -0
- data/test/unit/services/foreman_rh_cloud/cloud_request_forwarder_test.rb +3 -3
- data/test/unit/services/foreman_rh_cloud/insights_status_cleaner_test.rb +31 -0
- data/test/unit/services/foreman_rh_cloud/template_renderer_helper_test.rb +1 -0
- data/test/unit/slice_generator_test.rb +15 -0
- data/test/unit/tags_generator_test.rb +41 -0
- data/webpack/ForemanInventoryUpload/Components/PageHeader/components/PageDescription/PageDescription.js +11 -0
- data/webpack/ForemanInventoryUpload/Components/PageHeader/components/PageDescription/__tests__/__snapshots__/PageDescription.test.js.snap +11 -0
- data/webpack/InsightsCloudSync/Components/RemediationModal/RemediationModal.scss +14 -0
- data/webpack/InsightsCloudSync/Components/__tests__/__snapshots__/NoTokenEmptyState.test.js.snap +20 -13
- data/webpack/InsightsCloudSync/__snapshots__/InsightsCloudSync.test.js.snap +2 -2
- metadata +26 -4
- data/app/subscribers/foreman_rh_cloud/insights_subscriber.rb +0 -9
@@ -1,77 +1,75 @@
|
|
1
1
|
require 'test_plugin_helper'
|
2
2
|
|
3
3
|
class InsightsClientReportStatusTest < ActiveSupport::TestCase
|
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
|
-
assert_equal 2, host_status.to_status
|
75
|
-
end
|
4
|
+
setup do
|
5
|
+
@host = FactoryBot.create(:host, :managed)
|
6
|
+
end
|
7
|
+
|
8
|
+
test 'fresh host does not have insights status' do
|
9
|
+
@host.reload
|
10
|
+
|
11
|
+
refute @host.host_statuses.where(type: 'InsightsClientReportStatus').exists?
|
12
|
+
insights_status = @host.get_status(InsightsClientReportStatus)
|
13
|
+
refute insights_status.relevant?
|
14
|
+
end
|
15
|
+
|
16
|
+
test 'host can refresh all its statuses' do
|
17
|
+
@host.refresh_statuses
|
18
|
+
@host.reload
|
19
|
+
|
20
|
+
refute @host.host_statuses.where(type: 'InsightsClientReportStatus').exists?
|
21
|
+
end
|
22
|
+
|
23
|
+
test 'host with correct report status sets global status to OK' do
|
24
|
+
global_status = @host.get_status(HostStatus.find_status_by_humanized_name('Global'))
|
25
|
+
# Status has to be OK before action
|
26
|
+
assert_equal HostStatus::Global::OK, global_status.status
|
27
|
+
|
28
|
+
# force create record
|
29
|
+
@host.get_status(InsightsClientReportStatus).refresh!
|
30
|
+
# now refresh should work
|
31
|
+
@host.refresh_statuses([InsightsClientReportStatus])
|
32
|
+
|
33
|
+
@host.reload
|
34
|
+
global_status = @host.get_status(HostStatus.find_status_by_humanized_name('Global'))
|
35
|
+
# Status has to be OK after the action too
|
36
|
+
assert_equal HostStatus::Global::OK, global_status.status
|
37
|
+
|
38
|
+
insights_status = @host.get_status(InsightsClientReportStatus)
|
39
|
+
# assert the status would be displayed
|
40
|
+
assert insights_status.relevant?
|
41
|
+
end
|
42
|
+
|
43
|
+
test 'host will return to OK once the status is refreshed' do
|
44
|
+
global_status = @host.get_status(HostStatus.find_status_by_humanized_name('Global'))
|
45
|
+
# Status has to be OK before action
|
46
|
+
assert_equal HostStatus::Global::OK, global_status.status
|
47
|
+
|
48
|
+
insights_status = @host.get_status(InsightsClientReportStatus)
|
49
|
+
insights_status.status = InsightsClientReportStatus::NO_REPORT
|
50
|
+
insights_status.save!
|
51
|
+
@host.refresh_global_status!
|
52
|
+
global_status = @host.global_status
|
53
|
+
assert_equal HostStatus::Global::ERROR, global_status
|
54
|
+
|
55
|
+
@host.refresh_statuses([InsightsClientReportStatus])
|
56
|
+
|
57
|
+
@host.reload
|
58
|
+
# Status has to be OK after the action too
|
59
|
+
assert_equal HostStatus::Global::OK, @host.global_status
|
60
|
+
end
|
61
|
+
|
62
|
+
test 'host with stale status would set global to ERROR' do
|
63
|
+
global_status = @host.get_status(HostStatus.find_status_by_humanized_name('Global'))
|
64
|
+
# Status has to be OK before action
|
65
|
+
assert_equal HostStatus::Global::OK, global_status.status
|
66
|
+
|
67
|
+
insights_status = @host.get_status(InsightsClientReportStatus)
|
68
|
+
insights_status.status = InsightsClientReportStatus::NO_REPORT
|
69
|
+
insights_status.save!
|
70
|
+
@host.refresh_global_status!
|
71
|
+
@host.reload
|
72
|
+
|
73
|
+
assert_equal HostStatus::Global::ERROR, @host.global_status
|
76
74
|
end
|
77
75
|
end
|
data/test/test_plugin_helper.rb
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
require 'test_helper'
|
3
3
|
|
4
4
|
# Add plugin to FactoryBot's paths
|
5
|
+
FactoryBot.definition_file_paths << "#{ForemanTasks::Engine.root}/test/factories"
|
6
|
+
FactoryBot.definition_file_paths << "#{ForemanRemoteExecution::Engine.root}/test/factories"
|
5
7
|
FactoryBot.definition_file_paths << File.join(File.dirname(__FILE__), 'factories')
|
6
8
|
# FactoryBot.definition_file_paths << "#{Katello::Engine.root}/test/factories"
|
7
9
|
FactoryBot.reload
|
@@ -42,9 +42,9 @@ class CloudRequestForwarderTest < ActiveSupport::TestCase
|
|
42
42
|
test 'should prepare correct cloud url' do
|
43
43
|
paths = {
|
44
44
|
"/redhat_access/r/insights/platform/module-update-router/v1/channel?module=insights-core" => "https://cert.cloud.redhat.com/api/module-update-router/v1/channel?module=insights-core",
|
45
|
-
"/redhat_access/r/insights/v1/static/release/insights-core.egg" => "https://
|
46
|
-
"/redhat_access/r/insights/v1/static/uploader.v2.json" => "https://
|
47
|
-
"/redhat_access/r/insights/v1/static/uploader.v2.json.asc" => "https://
|
45
|
+
"/redhat_access/r/insights/v1/static/release/insights-core.egg" => "https://cert-api.access.redhat.com/r/insights/v1/static/release/insights-core.egg",
|
46
|
+
"/redhat_access/r/insights/v1/static/uploader.v2.json" => "https://cert-api.access.redhat.com/r/insights/v1/static/uploader.v2.json",
|
47
|
+
"/redhat_access/r/insights/v1/static/uploader.v2.json.asc" => "https://cert-api.access.redhat.com/r/insights/v1/static/uploader.v2.json.asc",
|
48
48
|
"/redhat_access/r/insights/platform/inventory/v1/hosts" => "https://cert.cloud.redhat.com/api/inventory/v1/hosts",
|
49
49
|
"/redhat_access/r/insights/platform/ingress/v1/upload" => "https://cert.cloud.redhat.com/api/ingress/v1/upload",
|
50
50
|
"/redhat_access/r/insights/uploads/67200803-132b-474b-a6f9-37be74185df4" => "https://cert-api.access.redhat.com/r/insights/uploads/67200803-132b-474b-a6f9-37be74185df4",
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'test_plugin_helper'
|
2
|
+
|
3
|
+
class InsightsStatusCleanerTest < ActiveSupport::TestCase
|
4
|
+
setup do
|
5
|
+
@host1 = FactoryBot.create(:host)
|
6
|
+
@host2 = FactoryBot.create(:host)
|
7
|
+
|
8
|
+
InsightsClientReportStatus.find_or_initialize_by(host_id: @host1.id).update(status: InsightsClientReportStatus::NO_REPORT, reported_at: Time.now - InsightsClientReportStatus::REPORT_INTERVAL + 1.day)
|
9
|
+
InsightsClientReportStatus.find_or_initialize_by(host_id: @host2.id).update(status: InsightsClientReportStatus::NO_REPORT, reported_at: Time.now - InsightsClientReportStatus::REPORT_INTERVAL + 1.day)
|
10
|
+
|
11
|
+
@host1.refresh_global_status!
|
12
|
+
@host2.refresh_global_status!
|
13
|
+
end
|
14
|
+
|
15
|
+
test 'Cleans hosts by search condition' do
|
16
|
+
assert_equal HostStatus::Global::ERROR, @host1.global_status
|
17
|
+
assert_equal HostStatus::Global::ERROR, @host2.global_status
|
18
|
+
|
19
|
+
instance = ForemanRhCloud::InsightsStatusCleaner.new
|
20
|
+
actual_count = instance.clean("name = #{@host1.name}")
|
21
|
+
|
22
|
+
@host1.reload
|
23
|
+
@host2.refresh_global_status!
|
24
|
+
|
25
|
+
assert_equal 1, actual_count
|
26
|
+
assert_equal HostStatus::Global::OK, @host1.global_status
|
27
|
+
assert_equal HostStatus::Global::ERROR, @host2.global_status
|
28
|
+
assert InsightsClientReportStatus.where(host_id: @host1.id).empty?
|
29
|
+
refute InsightsClientReportStatus.where(host_id: @host2.id).empty?
|
30
|
+
end
|
31
|
+
end
|
@@ -8,6 +8,7 @@ class TemplateRendererHelperTest < ActiveSupport::TestCase
|
|
8
8
|
response.stubs(:body).returns('TEST PLAYBOOK')
|
9
9
|
ForemanRhCloud::RemediationsRetriever.any_instance.stubs(:query_playbook).returns(response)
|
10
10
|
@host1 = FactoryBot.create(:host)
|
11
|
+
FactoryBot.create(:setting, name: 'rh_cloud_token', value: 'MOCK_TOKEN')
|
11
12
|
end
|
12
13
|
|
13
14
|
test 'Generates a playbook for hit and remediation' do
|
@@ -53,6 +53,7 @@ class SliceGeneratorTest < ActiveSupport::TestCase
|
|
53
53
|
'insights_client::hostname',
|
54
54
|
'insights_client::obfuscate_ip_enabled',
|
55
55
|
'insights_client::ips',
|
56
|
+
'insights_id',
|
56
57
|
]
|
57
58
|
end
|
58
59
|
|
@@ -657,6 +658,20 @@ class SliceGeneratorTest < ActiveSupport::TestCase
|
|
657
658
|
assert_not_nil actual_host['bios_uuid']
|
658
659
|
end
|
659
660
|
|
661
|
+
test 'passes valid insights_id field' do
|
662
|
+
FactoryBot.create(:fact_value, fact_name: fact_names['insights_id'], value: 'D30B0B42-7824-2635-C62D-491394DE43F7', host: @host)
|
663
|
+
|
664
|
+
batch = Host.where(id: @host.id).in_batches.first
|
665
|
+
generator = create_generator(batch)
|
666
|
+
|
667
|
+
json_str = generator.render
|
668
|
+
actual = JSON.parse(json_str.join("\n"))
|
669
|
+
|
670
|
+
assert_equal '00000000-0000-0000-0000-000000000000', actual['report_slice_id']
|
671
|
+
assert_not_nil(actual_host = actual['hosts'].first)
|
672
|
+
assert_not_nil actual_host['insights_id']
|
673
|
+
end
|
674
|
+
|
660
675
|
private
|
661
676
|
|
662
677
|
def create_generator(batch, name = '00000000-0000-0000-0000-000000000000')
|
@@ -62,6 +62,47 @@ class TagsGeneratorTest < ActiveSupport::TestCase
|
|
62
62
|
assert_equal false, actual.key?('content_view')
|
63
63
|
end
|
64
64
|
|
65
|
+
test 'generates parameter tags' do
|
66
|
+
FactoryBot.create(:setting, :name => 'include_parameter_tags', :settings_type => "boolean", :category => "Setting::RhCloud", :default => false, :value => true)
|
67
|
+
|
68
|
+
@host.stubs(:host_inherited_params_objects).returns(
|
69
|
+
[
|
70
|
+
OpenStruct.new(name: 'bool_param', value: true),
|
71
|
+
OpenStruct.new(name: 'false_param', value: false),
|
72
|
+
OpenStruct.new(name: 'int_param', value: 1),
|
73
|
+
OpenStruct.new(name: 'empty_param', value: nil),
|
74
|
+
OpenStruct.new(name: 'empty_str_param', value: ''),
|
75
|
+
]
|
76
|
+
)
|
77
|
+
|
78
|
+
generator = create_generator
|
79
|
+
actual = Hash[generator.generate_parameters]
|
80
|
+
|
81
|
+
assert_equal 3, actual.count
|
82
|
+
assert_equal true, actual['bool_param']
|
83
|
+
assert_equal false, actual['false_param']
|
84
|
+
assert_equal 1, actual['int_param']
|
85
|
+
end
|
86
|
+
|
87
|
+
test 'skips parameter tags if include_parameter_tags setting is off' do
|
88
|
+
FactoryBot.create(:setting, :name => 'include_parameter_tags', :settings_type => "boolean", :category => "Setting::RhCloud", :default => false, :value => false)
|
89
|
+
|
90
|
+
@host.stubs(:host_inherited_params_objects).returns(
|
91
|
+
[
|
92
|
+
OpenStruct.new(name: 'bool_param', value: true),
|
93
|
+
OpenStruct.new(name: 'false_param', value: false),
|
94
|
+
OpenStruct.new(name: 'int_param', value: 1),
|
95
|
+
OpenStruct.new(name: 'empty_param', value: nil),
|
96
|
+
OpenStruct.new(name: 'empty_str_param', value: ''),
|
97
|
+
]
|
98
|
+
)
|
99
|
+
|
100
|
+
generator = create_generator
|
101
|
+
actual = generator.generate_parameters.group_by { |key, value| key }
|
102
|
+
|
103
|
+
assert_equal 0, actual.count
|
104
|
+
end
|
105
|
+
|
65
106
|
private
|
66
107
|
|
67
108
|
def create_generator
|
@@ -31,6 +31,17 @@ export const PageDescription = () => (
|
|
31
31
|
About subscription watch
|
32
32
|
</a>
|
33
33
|
</p>
|
34
|
+
<p>
|
35
|
+
{__('For more information about Insights and Cloud Connector read')}
|
36
|
+
|
37
|
+
<a
|
38
|
+
href="https://console.redhat.com/security/insights/"
|
39
|
+
target="_blank"
|
40
|
+
rel="noopener noreferrer"
|
41
|
+
>
|
42
|
+
Red Hat Insights Data and Application Security
|
43
|
+
</a>
|
44
|
+
</p>
|
34
45
|
</div>
|
35
46
|
);
|
36
47
|
|
@@ -24,5 +24,16 @@ exports[`PageDescription rendering render without Props 1`] = `
|
|
24
24
|
About subscription watch
|
25
25
|
</a>
|
26
26
|
</p>
|
27
|
+
<p>
|
28
|
+
For more information about Insights and Cloud Connector read
|
29
|
+
|
30
|
+
<a
|
31
|
+
href="https://console.redhat.com/security/insights/"
|
32
|
+
rel="noopener noreferrer"
|
33
|
+
target="_blank"
|
34
|
+
>
|
35
|
+
Red Hat Insights Data and Application Security
|
36
|
+
</a>
|
37
|
+
</p>
|
27
38
|
</div>
|
28
39
|
`;
|
@@ -6,4 +6,18 @@
|
|
6
6
|
margin-top: 5px;
|
7
7
|
}
|
8
8
|
}
|
9
|
+
|
10
|
+
// applies to the backdrop parent of the modal
|
11
|
+
@at-root .pf-c-backdrop {
|
12
|
+
width: calc(100% - 200px) !important;
|
13
|
+
left: 200px !important;
|
14
|
+
}
|
15
|
+
|
16
|
+
// where the vertical nav breaks: https://github.com/theforeman/foreman/blob/3347fa49d500964f0209122d8d36c920d1feafcc/webpack/assets/javascripts/react_app/components/Layout/components/Toolbar/HeaderToolbar.scss#L26
|
17
|
+
@media (max-width: 768px) {
|
18
|
+
@at-root .pf-c-backdrop {
|
19
|
+
width: 100% !important;
|
20
|
+
left: 0 !important;
|
21
|
+
}
|
22
|
+
}
|
9
23
|
}
|
data/webpack/InsightsCloudSync/Components/__tests__/__snapshots__/NoTokenEmptyState.test.js.snap
CHANGED
@@ -190,21 +190,28 @@ exports[`NoTokenEmptyState render 1`] = `
|
|
190
190
|
onClick={[Function]}
|
191
191
|
variant="primary"
|
192
192
|
>
|
193
|
-
<
|
194
|
-
|
195
|
-
|
196
|
-
className="pf-c-button pf-m-primary pf-m-disabled"
|
197
|
-
data-ouia-component-id="OUIA-Generated-Button-primary-1"
|
198
|
-
data-ouia-component-type="PF4/Button"
|
199
|
-
data-ouia-safe={true}
|
200
|
-
disabled={true}
|
193
|
+
<ButtonBase
|
194
|
+
innerRef={null}
|
195
|
+
isDisabled={true}
|
201
196
|
onClick={[Function]}
|
202
|
-
|
203
|
-
tabIndex={null}
|
204
|
-
type="button"
|
197
|
+
variant="primary"
|
205
198
|
>
|
206
|
-
|
207
|
-
|
199
|
+
<button
|
200
|
+
aria-disabled={true}
|
201
|
+
aria-label={null}
|
202
|
+
className="pf-c-button pf-m-primary pf-m-disabled"
|
203
|
+
data-ouia-component-id="OUIA-Generated-Button-primary-1"
|
204
|
+
data-ouia-component-type="PF4/Button"
|
205
|
+
data-ouia-safe={true}
|
206
|
+
disabled={true}
|
207
|
+
onClick={[Function]}
|
208
|
+
role={null}
|
209
|
+
tabIndex={null}
|
210
|
+
type="button"
|
211
|
+
>
|
212
|
+
Save setting and sync recommendations
|
213
|
+
</button>
|
214
|
+
</ButtonBase>
|
208
215
|
</Button>
|
209
216
|
</div>
|
210
217
|
</div>
|
@@ -29,12 +29,12 @@ exports[`InsightsCloudSync render 1`] = `
|
|
29
29
|
toolbarButtons={
|
30
30
|
<React.Fragment>
|
31
31
|
<UNDEFINED />
|
32
|
-
<
|
32
|
+
<ForwardRef
|
33
33
|
onClick={[Function]}
|
34
34
|
variant="secondary"
|
35
35
|
>
|
36
36
|
Start recommendations sync
|
37
|
-
</
|
37
|
+
</ForwardRef>
|
38
38
|
</React.Fragment>
|
39
39
|
}
|
40
40
|
>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_rh_cloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.25
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Foreman Red Hat Cloud team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: katello
|
@@ -146,8 +146,11 @@ files:
|
|
146
146
|
- LICENSE
|
147
147
|
- README.md
|
148
148
|
- Rakefile
|
149
|
+
- app/controllers/api/v2/rh_cloud/inventory_controller.rb
|
149
150
|
- app/controllers/concerns/insights_cloud/candlepin_cache.rb
|
150
151
|
- app/controllers/concerns/insights_cloud/client_authentication.rb
|
152
|
+
- app/controllers/concerns/inventory_upload/report_actions.rb
|
153
|
+
- app/controllers/concerns/inventory_upload/task_actions.rb
|
151
154
|
- app/controllers/foreman_inventory_upload/accounts_controller.rb
|
152
155
|
- app/controllers/foreman_inventory_upload/reports_controller.rb
|
153
156
|
- app/controllers/foreman_inventory_upload/tasks_controller.rb
|
@@ -157,6 +160,8 @@ files:
|
|
157
160
|
- app/controllers/insights_cloud/hits_controller.rb
|
158
161
|
- app/controllers/insights_cloud/settings_controller.rb
|
159
162
|
- app/controllers/insights_cloud/tasks_controller.rb
|
163
|
+
- app/helpers/foreman_insights_deprecations_helper.rb
|
164
|
+
- app/helpers/foreman_insights_host_helper.rb
|
160
165
|
- app/helpers/foreman_inventory_upload_helper.rb
|
161
166
|
- app/helpers/foreman_inventory_upload_host_helper.rb
|
162
167
|
- app/models/concerns/rh_cloud_host.rb
|
@@ -169,20 +174,22 @@ files:
|
|
169
174
|
- app/models/setting/rh_cloud.rb
|
170
175
|
- app/overrides/hosts_list.rb
|
171
176
|
- app/overrides/layouts/base/styles.html.erb.deface
|
177
|
+
- app/overrides/old_plugin_deprecation.rb
|
172
178
|
- app/services/foreman_rh_cloud/branch_info.rb
|
173
179
|
- app/services/foreman_rh_cloud/cloud_auth.rb
|
174
180
|
- app/services/foreman_rh_cloud/cloud_connector.rb
|
175
181
|
- app/services/foreman_rh_cloud/cloud_request.rb
|
176
182
|
- app/services/foreman_rh_cloud/cloud_request_forwarder.rb
|
183
|
+
- app/services/foreman_rh_cloud/insights_status_cleaner.rb
|
177
184
|
- app/services/foreman_rh_cloud/remediations_retriever.rb
|
178
185
|
- app/services/foreman_rh_cloud/template_renderer_helper.rb
|
179
|
-
- app/subscribers/foreman_rh_cloud/insights_subscriber.rb
|
180
186
|
- app/views/hosts/_insights_tab.html.erb
|
181
187
|
- app/views/job_templates/rh_cloud_remediations.erb
|
182
188
|
- app/views/layouts/foreman_rh_cloud/application.html.erb
|
183
189
|
- config/Gemfile.lock.gh_test
|
184
190
|
- config/database.yml.example
|
185
191
|
- config/package-lock.json.gh_test
|
192
|
+
- config/package-lock.json.plugin
|
186
193
|
- config/routes.rb
|
187
194
|
- db/migrate/20191215104806_create_insights_hits.foreman_inventory_upload.rb
|
188
195
|
- db/migrate/20191216062008_create_insights_facets.foreman_inventory_upload.rb
|
@@ -193,6 +200,7 @@ files:
|
|
193
200
|
- db/migrate/20210214000002_add_rule_id_to_hits.foreman_rh_cloud.rb
|
194
201
|
- db/migrate/20210307000001_add_unique_to_insights_facet.foreman_rh_cloud.rb
|
195
202
|
- db/migrate/20210404000001_change_resolutions.foreman_rh_cloud.rb
|
203
|
+
- db/migrate/20210720000001_remove_old_insights_statuses.foreman_rh_cloud.rb
|
196
204
|
- db/seeds.d/179_ui_notifications.rb
|
197
205
|
- db/seeds.d/50_job_templates.rb
|
198
206
|
- lib/foreman_inventory_upload.rb
|
@@ -216,6 +224,7 @@ files:
|
|
216
224
|
- lib/foreman_rh_cloud/engine.rb
|
217
225
|
- lib/foreman_rh_cloud/version.rb
|
218
226
|
- lib/insights_cloud.rb
|
227
|
+
- lib/insights_cloud/async/insights_client_status_aging.rb
|
219
228
|
- lib/insights_cloud/async/insights_full_sync.rb
|
220
229
|
- lib/insights_cloud/async/insights_generate_notifications.rb
|
221
230
|
- lib/insights_cloud/async/insights_resolutions_sync.rb
|
@@ -226,6 +235,7 @@ files:
|
|
226
235
|
- lib/inventory_sync/async/inventory_full_sync.rb
|
227
236
|
- lib/inventory_sync/async/inventory_hosts_sync.rb
|
228
237
|
- lib/inventory_sync/async/inventory_scheduled_sync.rb
|
238
|
+
- lib/inventory_sync/async/inventory_self_host_sync.rb
|
229
239
|
- lib/inventory_sync/async/query_inventory_job.rb
|
230
240
|
- lib/tasks/foreman_rh_cloud_tasks.rake
|
231
241
|
- lib/tasks/insights.rake
|
@@ -238,15 +248,20 @@ files:
|
|
238
248
|
- test/controllers/accounts_controller_test.rb
|
239
249
|
- test/controllers/insights_cloud/api/machine_telemetries_controller_test.rb
|
240
250
|
- test/controllers/insights_sync/settings_controller_test.rb
|
251
|
+
- test/controllers/inventory_upload/api/inventory_controller_test.rb
|
241
252
|
- test/controllers/reports_controller_test.rb
|
242
253
|
- test/controllers/uploads_controller_test.rb
|
243
254
|
- test/controllers/uploads_settings_controller_test.rb
|
244
255
|
- test/factories/insights_factories.rb
|
245
256
|
- test/factories/inventory_upload_factories.rb
|
257
|
+
- test/jobs/insights_client_status_aging_test.rb
|
246
258
|
- test/jobs/insights_full_sync_test.rb
|
247
259
|
- test/jobs/insights_resolutions_sync_test.rb
|
248
260
|
- test/jobs/insights_rules_sync_test.rb
|
249
261
|
- test/jobs/inventory_full_sync_test.rb
|
262
|
+
- test/jobs/inventory_hosts_sync_test.rb
|
263
|
+
- test/jobs/inventory_scheduled_sync_test.rb
|
264
|
+
- test/jobs/inventory_self_host_sync_test.rb
|
250
265
|
- test/jobs/upload_report_job_test.rb
|
251
266
|
- test/models/insights_client_report_status_test.rb
|
252
267
|
- test/test_plugin_helper.rb
|
@@ -257,6 +272,7 @@ files:
|
|
257
272
|
- test/unit/rh_cloud_http_proxy_test.rb
|
258
273
|
- test/unit/services/foreman_rh_cloud/branch_info_test.rb
|
259
274
|
- test/unit/services/foreman_rh_cloud/cloud_request_forwarder_test.rb
|
275
|
+
- test/unit/services/foreman_rh_cloud/insights_status_cleaner_test.rb
|
260
276
|
- test/unit/services/foreman_rh_cloud/remediations_retriever_test.rb
|
261
277
|
- test/unit/services/foreman_rh_cloud/template_renderer_helper_test.rb
|
262
278
|
- test/unit/shell_process_job_test.rb
|
@@ -655,7 +671,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
655
671
|
- !ruby/object:Gem::Version
|
656
672
|
version: '0'
|
657
673
|
requirements: []
|
658
|
-
rubygems_version: 3.2.
|
674
|
+
rubygems_version: 3.2.15
|
659
675
|
signing_key:
|
660
676
|
specification_version: 4
|
661
677
|
summary: Summary of ForemanRhCloud.
|
@@ -663,15 +679,20 @@ test_files:
|
|
663
679
|
- test/controllers/accounts_controller_test.rb
|
664
680
|
- test/controllers/insights_cloud/api/machine_telemetries_controller_test.rb
|
665
681
|
- test/controllers/insights_sync/settings_controller_test.rb
|
682
|
+
- test/controllers/inventory_upload/api/inventory_controller_test.rb
|
666
683
|
- test/controllers/reports_controller_test.rb
|
667
684
|
- test/controllers/uploads_controller_test.rb
|
668
685
|
- test/controllers/uploads_settings_controller_test.rb
|
669
686
|
- test/factories/insights_factories.rb
|
670
687
|
- test/factories/inventory_upload_factories.rb
|
688
|
+
- test/jobs/insights_client_status_aging_test.rb
|
671
689
|
- test/jobs/insights_full_sync_test.rb
|
672
690
|
- test/jobs/insights_resolutions_sync_test.rb
|
673
691
|
- test/jobs/insights_rules_sync_test.rb
|
674
692
|
- test/jobs/inventory_full_sync_test.rb
|
693
|
+
- test/jobs/inventory_hosts_sync_test.rb
|
694
|
+
- test/jobs/inventory_scheduled_sync_test.rb
|
695
|
+
- test/jobs/inventory_self_host_sync_test.rb
|
675
696
|
- test/jobs/upload_report_job_test.rb
|
676
697
|
- test/models/insights_client_report_status_test.rb
|
677
698
|
- test/test_plugin_helper.rb
|
@@ -682,6 +703,7 @@ test_files:
|
|
682
703
|
- test/unit/rh_cloud_http_proxy_test.rb
|
683
704
|
- test/unit/services/foreman_rh_cloud/branch_info_test.rb
|
684
705
|
- test/unit/services/foreman_rh_cloud/cloud_request_forwarder_test.rb
|
706
|
+
- test/unit/services/foreman_rh_cloud/insights_status_cleaner_test.rb
|
685
707
|
- test/unit/services/foreman_rh_cloud/remediations_retriever_test.rb
|
686
708
|
- test/unit/services/foreman_rh_cloud/template_renderer_helper_test.rb
|
687
709
|
- test/unit/shell_process_job_test.rb
|