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
|
@@ -35,6 +35,11 @@ class SliceGeneratorTest < ActiveSupport::TestCase
|
|
|
35
35
|
ForemanInventoryUpload::Generators::Queries.instance_variable_set(:@fact_names, nil)
|
|
36
36
|
end
|
|
37
37
|
|
|
38
|
+
teardown do
|
|
39
|
+
# Ensure stubs are cleaned up to avoid leakage into other tests
|
|
40
|
+
ForemanRhCloud.unstub(:with_iop_smart_proxy?)
|
|
41
|
+
end
|
|
42
|
+
|
|
38
43
|
def create_fact_values(host, facts)
|
|
39
44
|
facts.each do |fact_name, value|
|
|
40
45
|
FactoryBot.create(:fact_value, fact_name: fact_names[fact_name], value: value, host: host)
|
|
@@ -636,6 +641,7 @@ class SliceGeneratorTest < ActiveSupport::TestCase
|
|
|
636
641
|
assert_tag('1', actual_host, 'int_param', 'satellite_parameter')
|
|
637
642
|
|
|
638
643
|
assert_equal false, satellite_facts['is_hostname_obfuscated']
|
|
644
|
+
assert_equal true, satellite_facts['is_simple_content_access']
|
|
639
645
|
|
|
640
646
|
version = satellite_facts['satellite_version']
|
|
641
647
|
if defined?(ForemanThemeSatellite)
|
|
@@ -697,22 +703,6 @@ class SliceGeneratorTest < ActiveSupport::TestCase
|
|
|
697
703
|
assert_equal 'test_sla', fact_values['system_purpose_sla']
|
|
698
704
|
end
|
|
699
705
|
|
|
700
|
-
test 'generates a report for a golden ticket' do
|
|
701
|
-
batch = Host.where(id: @host.id).in_batches.first
|
|
702
|
-
generator = create_generator(batch) do |generator|
|
|
703
|
-
generator.stubs(:golden_ticket?).returns(true)
|
|
704
|
-
end
|
|
705
|
-
|
|
706
|
-
json_str = generator.render
|
|
707
|
-
actual = JSON.parse(json_str.join("\n"))
|
|
708
|
-
|
|
709
|
-
assert_equal '00000000-0000-0000-0000-000000000000', actual['report_slice_id']
|
|
710
|
-
assert_not_nil(actual_host = actual['hosts'].first)
|
|
711
|
-
assert_equal @host.fqdn, actual_host['fqdn']
|
|
712
|
-
assert_equal '1234', actual_host['account']
|
|
713
|
-
assert_equal 1, generator.hosts_count
|
|
714
|
-
end
|
|
715
|
-
|
|
716
706
|
test 'skips hosts without subscription' do
|
|
717
707
|
a_host = FactoryBot.create(
|
|
718
708
|
:host,
|
|
@@ -749,7 +739,9 @@ class SliceGeneratorTest < ActiveSupport::TestCase
|
|
|
749
739
|
assert_equal 1, generator.hosts_count
|
|
750
740
|
end
|
|
751
741
|
|
|
752
|
-
test 'excludes hosts with host_registration_insights_inventory set to false' do
|
|
742
|
+
test 'excludes hosts with host_registration_insights_inventory set to false in cloud mode' do
|
|
743
|
+
ForemanRhCloud.stubs(:with_iop_smart_proxy?).returns(false)
|
|
744
|
+
|
|
753
745
|
@host.host_parameters << HostParameter.create(
|
|
754
746
|
name: 'host_registration_insights_inventory',
|
|
755
747
|
value: "false",
|
|
@@ -761,6 +753,39 @@ class SliceGeneratorTest < ActiveSupport::TestCase
|
|
|
761
753
|
assert_equal 0, count
|
|
762
754
|
end
|
|
763
755
|
|
|
756
|
+
test 'includes hosts with host_registration_insights_inventory set to false in IoP mode' do
|
|
757
|
+
ForemanRhCloud.stubs(:with_iop_smart_proxy?).returns(true)
|
|
758
|
+
|
|
759
|
+
@host.host_parameters << HostParameter.create(
|
|
760
|
+
name: 'host_registration_insights_inventory',
|
|
761
|
+
value: "false",
|
|
762
|
+
parameter_type: 'boolean'
|
|
763
|
+
)
|
|
764
|
+
|
|
765
|
+
count = ForemanInventoryUpload::Generators::Queries.for_org(@host.organization_id).count
|
|
766
|
+
|
|
767
|
+
assert_equal 1, count, 'IoP mode should include all hosts regardless of parameter value'
|
|
768
|
+
end
|
|
769
|
+
|
|
770
|
+
test 'parameter filter applies correctly when switching modes' do
|
|
771
|
+
@host.host_parameters << HostParameter.create(
|
|
772
|
+
name: 'host_registration_insights_inventory',
|
|
773
|
+
value: "false",
|
|
774
|
+
parameter_type: 'boolean'
|
|
775
|
+
)
|
|
776
|
+
|
|
777
|
+
# Cloud mode - should exclude
|
|
778
|
+
ForemanRhCloud.stubs(:with_iop_smart_proxy?).returns(false)
|
|
779
|
+
cloud_count = ForemanInventoryUpload::Generators::Queries.for_org(@host.organization_id).count
|
|
780
|
+
assert_equal 0, cloud_count, 'Cloud mode should exclude opted-out hosts'
|
|
781
|
+
|
|
782
|
+
# IoP mode - should include
|
|
783
|
+
ForemanRhCloud.unstub(:with_iop_smart_proxy?)
|
|
784
|
+
ForemanRhCloud.stubs(:with_iop_smart_proxy?).returns(true)
|
|
785
|
+
iop_count = ForemanInventoryUpload::Generators::Queries.for_org(@host.organization_id).count
|
|
786
|
+
assert_equal 1, iop_count, 'IoP mode should include all hosts'
|
|
787
|
+
end
|
|
788
|
+
|
|
764
789
|
test 'includes hosts with host_registration_insights set to true' do
|
|
765
790
|
@host.host_parameters.build(
|
|
766
791
|
name: 'host_registration_insights_inventory',
|
|
@@ -1091,11 +1116,7 @@ class SliceGeneratorTest < ActiveSupport::TestCase
|
|
|
1091
1116
|
|
|
1092
1117
|
def create_generator(batch, name = '00000000-0000-0000-0000-000000000000')
|
|
1093
1118
|
generator = ForemanInventoryUpload::Generators::Slice.new(batch, [], name)
|
|
1094
|
-
if block_given?
|
|
1095
|
-
yield(generator)
|
|
1096
|
-
else
|
|
1097
|
-
generator.stubs(:golden_ticket?).returns(false)
|
|
1098
|
-
end
|
|
1119
|
+
yield(generator) if block_given?
|
|
1099
1120
|
generator
|
|
1100
1121
|
end
|
|
1101
1122
|
|
metadata
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: foreman_rh_cloud
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 14.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Foreman Red Hat Cloud team
|
|
8
|
+
autorequire:
|
|
8
9
|
bindir: bin
|
|
9
10
|
cert_chain: []
|
|
10
|
-
date:
|
|
11
|
+
date: 2026-02-25 00:00:00.000000000 Z
|
|
11
12
|
dependencies:
|
|
12
13
|
- !ruby/object:Gem::Dependency
|
|
13
14
|
name: foreman_ansible
|
|
@@ -233,16 +234,26 @@ files:
|
|
|
233
234
|
- locale/Makefile
|
|
234
235
|
- locale/foreman_rh_cloud.pot
|
|
235
236
|
- locale/fr/LC_MESSAGES/foreman_rh_cloud.mo
|
|
237
|
+
- locale/fr/foreman_rh_cloud.edit.po
|
|
236
238
|
- locale/fr/foreman_rh_cloud.po
|
|
239
|
+
- locale/fr/foreman_rh_cloud.po.time_stamp
|
|
237
240
|
- locale/gemspec.rb
|
|
238
241
|
- locale/ja/LC_MESSAGES/foreman_rh_cloud.mo
|
|
242
|
+
- locale/ja/foreman_rh_cloud.edit.po
|
|
239
243
|
- locale/ja/foreman_rh_cloud.po
|
|
244
|
+
- locale/ja/foreman_rh_cloud.po.time_stamp
|
|
240
245
|
- locale/ka/LC_MESSAGES/foreman_rh_cloud.mo
|
|
246
|
+
- locale/ka/foreman_rh_cloud.edit.po
|
|
241
247
|
- locale/ka/foreman_rh_cloud.po
|
|
248
|
+
- locale/ka/foreman_rh_cloud.po.time_stamp
|
|
242
249
|
- locale/ko/LC_MESSAGES/foreman_rh_cloud.mo
|
|
250
|
+
- locale/ko/foreman_rh_cloud.edit.po
|
|
243
251
|
- locale/ko/foreman_rh_cloud.po
|
|
252
|
+
- locale/ko/foreman_rh_cloud.po.time_stamp
|
|
244
253
|
- locale/zh_CN/LC_MESSAGES/foreman_rh_cloud.mo
|
|
254
|
+
- locale/zh_CN/foreman_rh_cloud.edit.po
|
|
245
255
|
- locale/zh_CN/foreman_rh_cloud.po
|
|
256
|
+
- locale/zh_CN/foreman_rh_cloud.po.time_stamp
|
|
246
257
|
- package.json
|
|
247
258
|
- test/controllers/accounts_controller_test.rb
|
|
248
259
|
- test/controllers/insights_cloud/api/advisor_engine_controller_test.rb
|
|
@@ -651,6 +662,7 @@ homepage: https://github.com/theforeman/foreman_rh_cloud
|
|
|
651
662
|
licenses:
|
|
652
663
|
- GPL-3.0
|
|
653
664
|
metadata: {}
|
|
665
|
+
post_install_message:
|
|
654
666
|
rdoc_options: []
|
|
655
667
|
require_paths:
|
|
656
668
|
- lib
|
|
@@ -668,7 +680,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
668
680
|
- !ruby/object:Gem::Version
|
|
669
681
|
version: '0'
|
|
670
682
|
requirements: []
|
|
671
|
-
rubygems_version:
|
|
683
|
+
rubygems_version: 3.2.33
|
|
684
|
+
signing_key:
|
|
672
685
|
specification_version: 4
|
|
673
686
|
summary: Summary of ForemanRhCloud.
|
|
674
687
|
test_files:
|