foreman_rh_cloud 3.0.25 → 3.0.26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/services/foreman_rh_cloud/cloud_request_forwarder.rb +10 -0
- data/config/Gemfile.lock.gh_test +93 -95
- data/config/routes.rb +1 -1
- data/lib/foreman_rh_cloud/version.rb +1 -1
- data/lib/insights_cloud/async/insights_resolutions_sync.rb +3 -2
- data/lib/insights_cloud/async/insights_rules_sync.rb +6 -2
- data/package.json +1 -1
- data/test/jobs/insights_resolutions_sync_test.rb +10 -1
- data/test/unit/services/foreman_rh_cloud/cloud_request_forwarder_test.rb +1 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a30fca135e4f60623ae8d50f3ae579b60b03769214d6635713f2d78d394c104
|
4
|
+
data.tar.gz: 0da61a8209494baea39169da75800e5b09738c065712b249dbad21abb771f369
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd3887751accfdb3f4873c69b74791483c690d1d884a3b122c9c2b70842bec4919965767174e75f8362be09de630d738979b8e5510b8cbf9f0fa496684cff690
|
7
|
+
data.tar.gz: c6b5ef0482a81d7faf69f3f679b2e015b2ca01421bf1115b45607cd2f73072b7b001e9d82526c1f8c1bdbd9240e3a1013ef4e1d72db251f888909c0b21b80f21
|
@@ -62,6 +62,12 @@ module ForemanRhCloud
|
|
62
62
|
ssl_client_cert: OpenSSL::X509::Certificate.new(certs[:cert]),
|
63
63
|
ssl_client_key: OpenSSL::PKey::RSA.new(certs[:key]),
|
64
64
|
}
|
65
|
+
when connection_test_request?
|
66
|
+
{
|
67
|
+
url: ForemanRhCloud.cert_base_url + '/api/apicast-tests/ping',
|
68
|
+
ssl_client_cert: OpenSSL::X509::Certificate.new(certs[:cert]),
|
69
|
+
ssl_client_key: OpenSSL::PKey::RSA.new(certs[:key]),
|
70
|
+
}
|
65
71
|
else # Legacy insights API
|
66
72
|
{
|
67
73
|
url: ForemanRhCloud.legacy_insights_url + request_path.sub('/redhat_access/r/insights', '/r/insights'),
|
@@ -76,6 +82,10 @@ module ForemanRhCloud
|
|
76
82
|
->(request_path) { request_path.include? '/platform' }
|
77
83
|
end
|
78
84
|
|
85
|
+
def connection_test_request?
|
86
|
+
->(request_path) { request_path =~ /redhat_access\/r\/insights\/?$/ }
|
87
|
+
end
|
88
|
+
|
79
89
|
def prepare_forward_cloud_url(base_url, request_path)
|
80
90
|
cloud_path = request_path.sub('/redhat_access/r/insights/platform/', '')
|
81
91
|
.sub('/redhat_access/r/insights/', '')
|
data/config/Gemfile.lock.gh_test
CHANGED
@@ -9,27 +9,27 @@ PATH
|
|
9
9
|
PATH
|
10
10
|
remote: ../katello
|
11
11
|
specs:
|
12
|
-
katello (3.18.
|
12
|
+
katello (3.18.3.1)
|
13
13
|
activerecord-import
|
14
14
|
anemone
|
15
15
|
angular-rails-templates (~> 1.1.0)
|
16
16
|
apipie-rails (>= 0.5.14)
|
17
17
|
deface (>= 1.0.2, < 2.0.0)
|
18
18
|
dynflow (>= 1.2.0)
|
19
|
-
foreman-tasks (>= 0.14.1)
|
19
|
+
foreman-tasks (>= 0.14.1, < 4.0)
|
20
20
|
foreman_remote_execution (>= 3.0)
|
21
21
|
fx (< 1.0)
|
22
22
|
gettext_i18n_rails
|
23
23
|
json
|
24
24
|
oauth
|
25
25
|
pg
|
26
|
-
pulp_2to3_migration_client (>= 0.
|
26
|
+
pulp_2to3_migration_client (>= 0.8.0, < 1.0.0)
|
27
27
|
pulp_ansible_client (>= 0.2, < 0.5)
|
28
28
|
pulp_certguard_client (< 2.0)
|
29
29
|
pulp_container_client (>= 2.0.0, < 2.2.0)
|
30
30
|
pulp_deb_client (>= 2.6.0, < 2.8.0)
|
31
31
|
pulp_file_client (>= 1.2.0, < 1.4.0)
|
32
|
-
pulp_rpm_client (>= 3.
|
32
|
+
pulp_rpm_client (>= 3.10.0, < 3.11.0)
|
33
33
|
pulpcore_client (>= 3.6.0, < 3.8.0)
|
34
34
|
rabl
|
35
35
|
rails
|
@@ -41,51 +41,51 @@ PATH
|
|
41
41
|
GEM
|
42
42
|
remote: https://rubygems.org/
|
43
43
|
specs:
|
44
|
-
actioncable (6.0.3.
|
45
|
-
actionpack (= 6.0.3.
|
44
|
+
actioncable (6.0.3.6)
|
45
|
+
actionpack (= 6.0.3.6)
|
46
46
|
nio4r (~> 2.0)
|
47
47
|
websocket-driver (>= 0.6.1)
|
48
|
-
actionmailbox (6.0.3.
|
49
|
-
actionpack (= 6.0.3.
|
50
|
-
activejob (= 6.0.3.
|
51
|
-
activerecord (= 6.0.3.
|
52
|
-
activestorage (= 6.0.3.
|
53
|
-
activesupport (= 6.0.3.
|
48
|
+
actionmailbox (6.0.3.6)
|
49
|
+
actionpack (= 6.0.3.6)
|
50
|
+
activejob (= 6.0.3.6)
|
51
|
+
activerecord (= 6.0.3.6)
|
52
|
+
activestorage (= 6.0.3.6)
|
53
|
+
activesupport (= 6.0.3.6)
|
54
54
|
mail (>= 2.7.1)
|
55
|
-
actionmailer (6.0.3.
|
56
|
-
actionpack (= 6.0.3.
|
57
|
-
actionview (= 6.0.3.
|
58
|
-
activejob (= 6.0.3.
|
55
|
+
actionmailer (6.0.3.6)
|
56
|
+
actionpack (= 6.0.3.6)
|
57
|
+
actionview (= 6.0.3.6)
|
58
|
+
activejob (= 6.0.3.6)
|
59
59
|
mail (~> 2.5, >= 2.5.4)
|
60
60
|
rails-dom-testing (~> 2.0)
|
61
|
-
actionpack (6.0.3.
|
62
|
-
actionview (= 6.0.3.
|
63
|
-
activesupport (= 6.0.3.
|
61
|
+
actionpack (6.0.3.6)
|
62
|
+
actionview (= 6.0.3.6)
|
63
|
+
activesupport (= 6.0.3.6)
|
64
64
|
rack (~> 2.0, >= 2.0.8)
|
65
65
|
rack-test (>= 0.6.3)
|
66
66
|
rails-dom-testing (~> 2.0)
|
67
67
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
68
|
-
actiontext (6.0.3.
|
69
|
-
actionpack (= 6.0.3.
|
70
|
-
activerecord (= 6.0.3.
|
71
|
-
activestorage (= 6.0.3.
|
72
|
-
activesupport (= 6.0.3.
|
68
|
+
actiontext (6.0.3.6)
|
69
|
+
actionpack (= 6.0.3.6)
|
70
|
+
activerecord (= 6.0.3.6)
|
71
|
+
activestorage (= 6.0.3.6)
|
72
|
+
activesupport (= 6.0.3.6)
|
73
73
|
nokogiri (>= 1.8.5)
|
74
|
-
actionview (6.0.3.
|
75
|
-
activesupport (= 6.0.3.
|
74
|
+
actionview (6.0.3.6)
|
75
|
+
activesupport (= 6.0.3.6)
|
76
76
|
builder (~> 3.1)
|
77
77
|
erubi (~> 1.4)
|
78
78
|
rails-dom-testing (~> 2.0)
|
79
79
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
80
|
-
activejob (6.0.3.
|
81
|
-
activesupport (= 6.0.3.
|
80
|
+
activejob (6.0.3.6)
|
81
|
+
activesupport (= 6.0.3.6)
|
82
82
|
globalid (>= 0.3.6)
|
83
|
-
activemodel (6.0.3.
|
84
|
-
activesupport (= 6.0.3.
|
85
|
-
activerecord (6.0.3.
|
86
|
-
activemodel (= 6.0.3.
|
87
|
-
activesupport (= 6.0.3.
|
88
|
-
activerecord-import (1.0
|
83
|
+
activemodel (6.0.3.6)
|
84
|
+
activesupport (= 6.0.3.6)
|
85
|
+
activerecord (6.0.3.6)
|
86
|
+
activemodel (= 6.0.3.6)
|
87
|
+
activesupport (= 6.0.3.6)
|
88
|
+
activerecord-import (1.1.0)
|
89
89
|
activerecord (>= 3.2)
|
90
90
|
activerecord-nulldb-adapter (0.7.0)
|
91
91
|
activerecord (>= 5.2.0, < 6.3)
|
@@ -95,12 +95,12 @@ GEM
|
|
95
95
|
multi_json (~> 1.11, >= 1.11.2)
|
96
96
|
rack (>= 1.5.2, < 3)
|
97
97
|
railties (>= 4.0)
|
98
|
-
activestorage (6.0.3.
|
99
|
-
actionpack (= 6.0.3.
|
100
|
-
activejob (= 6.0.3.
|
101
|
-
activerecord (= 6.0.3.
|
102
|
-
marcel (~> 0.
|
103
|
-
activesupport (6.0.3.
|
98
|
+
activestorage (6.0.3.6)
|
99
|
+
actionpack (= 6.0.3.6)
|
100
|
+
activejob (= 6.0.3.6)
|
101
|
+
activerecord (= 6.0.3.6)
|
102
|
+
marcel (~> 1.0.0)
|
103
|
+
activesupport (6.0.3.6)
|
104
104
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
105
105
|
i18n (>= 0.7, < 2)
|
106
106
|
minitest (~> 5.1)
|
@@ -109,7 +109,7 @@ GEM
|
|
109
109
|
addressable (2.7.0)
|
110
110
|
public_suffix (>= 2.0.2, < 5.0)
|
111
111
|
algebrick (0.7.5)
|
112
|
-
amazing_print (1.
|
112
|
+
amazing_print (1.3.0)
|
113
113
|
ancestry (3.2.1)
|
114
114
|
activerecord (>= 4.2.0)
|
115
115
|
anemone (0.7.2)
|
@@ -134,15 +134,15 @@ GEM
|
|
134
134
|
execjs
|
135
135
|
bcrypt (3.1.16)
|
136
136
|
benchmark-ips (2.8.4)
|
137
|
-
binding_of_caller (
|
137
|
+
binding_of_caller (0.8.0)
|
138
138
|
debug_inspector (>= 0.0.1)
|
139
|
-
bootsnap (1.7.
|
139
|
+
bootsnap (1.7.3)
|
140
140
|
msgpack (~> 1.0)
|
141
141
|
bootstrap-sass (3.4.1)
|
142
142
|
autoprefixer-rails (>= 5.2.1)
|
143
143
|
sassc (>= 2.0.0)
|
144
144
|
builder (3.2.4)
|
145
|
-
bullet (6.1.
|
145
|
+
bullet (6.1.4)
|
146
146
|
activesupport (>= 3.0.0)
|
147
147
|
uniform_notifier (~> 1.11)
|
148
148
|
byebug (11.1.3)
|
@@ -180,12 +180,12 @@ GEM
|
|
180
180
|
daemons (1.3.1)
|
181
181
|
database_cleaner (1.99.0)
|
182
182
|
deacon (1.0.0)
|
183
|
-
debug_inspector (1.
|
183
|
+
debug_inspector (1.1.0)
|
184
184
|
declarative (0.0.20)
|
185
185
|
declarative-option (0.1.0)
|
186
|
-
deep_cloneable (3.
|
186
|
+
deep_cloneable (3.1.0)
|
187
187
|
activerecord (>= 3.1.0, < 7)
|
188
|
-
deface (1.
|
188
|
+
deface (1.8.1)
|
189
189
|
nokogiri (>= 1.6)
|
190
190
|
polyglot
|
191
191
|
rails (>= 5.2)
|
@@ -193,7 +193,7 @@ GEM
|
|
193
193
|
docile (1.3.5)
|
194
194
|
domain_name (0.5.20190701)
|
195
195
|
unf (>= 0.0.5, < 1.0.0)
|
196
|
-
dynflow (1.
|
196
|
+
dynflow (1.5.0)
|
197
197
|
algebrick (~> 0.7.0)
|
198
198
|
apipie-params
|
199
199
|
concurrent-ruby (~> 1.1.3)
|
@@ -203,7 +203,7 @@ GEM
|
|
203
203
|
erubi (1.10.0)
|
204
204
|
excon (0.79.0)
|
205
205
|
execjs (2.7.0)
|
206
|
-
facter (4.0.
|
206
|
+
facter (4.0.52)
|
207
207
|
hocon (~> 1.3)
|
208
208
|
thor (>= 1.0.1, < 2.0)
|
209
209
|
factory_bot (5.2.0)
|
@@ -270,7 +270,7 @@ GEM
|
|
270
270
|
sinatra
|
271
271
|
foreman-tasks-core (0.3.4)
|
272
272
|
dynflow (>= 1.2.0)
|
273
|
-
foreman_ansible (6.
|
273
|
+
foreman_ansible (6.2.0)
|
274
274
|
deface (< 2.0)
|
275
275
|
foreman_remote_execution (>= 4.2.0)
|
276
276
|
ipaddress (>= 0.8.0, < 1.0)
|
@@ -338,7 +338,7 @@ GEM
|
|
338
338
|
http-cookie (1.0.3)
|
339
339
|
domain_name (~> 0.5)
|
340
340
|
httpclient (2.8.3)
|
341
|
-
i18n (1.8.
|
341
|
+
i18n (1.8.10)
|
342
342
|
concurrent-ruby (~> 1.0)
|
343
343
|
immigrant (0.3.6)
|
344
344
|
activerecord (>= 3.0)
|
@@ -369,16 +369,14 @@ GEM
|
|
369
369
|
nokogiri (>= 1.5.9)
|
370
370
|
mail (2.7.1)
|
371
371
|
mini_mime (>= 0.1.1)
|
372
|
-
marcel (0.
|
373
|
-
mimemagic (~> 0.3.2)
|
372
|
+
marcel (1.0.0)
|
374
373
|
maruku (0.7.3)
|
375
374
|
memoist (0.16.2)
|
376
375
|
method_source (1.0.0)
|
377
376
|
mime-types (3.3.1)
|
378
377
|
mime-types-data (~> 3.2015)
|
379
|
-
mime-types-data (3.
|
380
|
-
|
381
|
-
mini_mime (1.0.2)
|
378
|
+
mime-types-data (3.2021.0225)
|
379
|
+
mini_mime (1.0.3)
|
382
380
|
mini_portile2 (2.5.0)
|
383
381
|
minitest (5.10.3)
|
384
382
|
minitest-reporters (1.4.3)
|
@@ -404,8 +402,8 @@ GEM
|
|
404
402
|
net-ssh (>= 2.6.5, < 7.0.0)
|
405
403
|
net-ssh (4.2.0)
|
406
404
|
netrc (0.11.0)
|
407
|
-
nio4r (2.5.
|
408
|
-
nokogiri (1.11.
|
405
|
+
nio4r (2.5.7)
|
406
|
+
nokogiri (1.11.2)
|
409
407
|
mini_portile2 (~> 2.5.0)
|
410
408
|
racc (~> 1.4)
|
411
409
|
oauth (0.5.5)
|
@@ -415,10 +413,10 @@ GEM
|
|
415
413
|
json (>= 1, < 3)
|
416
414
|
paint (2.2.1)
|
417
415
|
parallel (1.20.1)
|
418
|
-
parallel_tests (3.
|
416
|
+
parallel_tests (3.6.0)
|
419
417
|
parallel
|
420
418
|
parse-cron (0.1.4)
|
421
|
-
parser (3.0.
|
419
|
+
parser (3.0.1.1)
|
422
420
|
ast (~> 2.4.1)
|
423
421
|
patternfly-sass (3.59.5)
|
424
422
|
bootstrap-sass (~> 3.4.0)
|
@@ -430,12 +428,12 @@ GEM
|
|
430
428
|
polyglot (0.3.5)
|
431
429
|
prometheus-client (1.0.0)
|
432
430
|
promise.rb (0.7.4)
|
433
|
-
pry (0.
|
431
|
+
pry (0.14.0)
|
434
432
|
coderay (~> 1.1)
|
435
433
|
method_source (~> 1.0)
|
436
|
-
pry-byebug (3.
|
434
|
+
pry-byebug (3.8.0)
|
437
435
|
byebug (~> 11.0)
|
438
|
-
pry (~> 0.
|
436
|
+
pry (~> 0.10)
|
439
437
|
pry-doc (1.1.0)
|
440
438
|
pry (~> 0.11)
|
441
439
|
yard (~> 0.9.11)
|
@@ -444,20 +442,20 @@ GEM
|
|
444
442
|
pry-remote (0.1.8)
|
445
443
|
pry (~> 0.9)
|
446
444
|
slop (~> 3.0)
|
447
|
-
pry-stack_explorer (0.
|
448
|
-
binding_of_caller (~>
|
445
|
+
pry-stack_explorer (0.4.13)
|
446
|
+
binding_of_caller (~> 0.7)
|
449
447
|
pry (~> 0.13)
|
450
448
|
public_suffix (4.0.6)
|
451
|
-
pulp_2to3_migration_client (0.
|
449
|
+
pulp_2to3_migration_client (0.11.2)
|
452
450
|
faraday (>= 0.14.0)
|
453
451
|
json (~> 2.1, >= 2.1.0)
|
454
452
|
pulp_ansible_client (0.4.3)
|
455
453
|
faraday (>= 0.14.0)
|
456
454
|
json (~> 2.1, >= 2.1.0)
|
457
|
-
pulp_certguard_client (1.
|
455
|
+
pulp_certguard_client (1.3.0)
|
458
456
|
faraday (>= 0.14.0)
|
459
457
|
json (~> 2.1, >= 2.1.0)
|
460
|
-
pulp_container_client (2.1.
|
458
|
+
pulp_container_client (2.1.2)
|
461
459
|
faraday (>= 0.14.0)
|
462
460
|
json (~> 2.1, >= 2.1.0)
|
463
461
|
pulp_deb_client (2.7.0)
|
@@ -466,13 +464,13 @@ GEM
|
|
466
464
|
pulp_file_client (1.3.0)
|
467
465
|
faraday (>= 0.14.0)
|
468
466
|
json (~> 2.1, >= 2.1.0)
|
469
|
-
pulp_rpm_client (3.
|
467
|
+
pulp_rpm_client (3.10.0)
|
470
468
|
faraday (>= 0.14.0)
|
471
469
|
json (~> 2.1, >= 2.1.0)
|
472
|
-
pulpcore_client (3.7.
|
470
|
+
pulpcore_client (3.7.6)
|
473
471
|
faraday (>= 0.14.0)
|
474
472
|
json (~> 2.1, >= 2.1.0)
|
475
|
-
puma (4.3.
|
473
|
+
puma (4.3.8)
|
476
474
|
nio4r (~> 2.0)
|
477
475
|
puma-plugin-systemd (0.1.5)
|
478
476
|
json
|
@@ -492,20 +490,20 @@ GEM
|
|
492
490
|
rack
|
493
491
|
rack-test (1.1.0)
|
494
492
|
rack (>= 1.0, < 3)
|
495
|
-
rails (6.0.3.
|
496
|
-
actioncable (= 6.0.3.
|
497
|
-
actionmailbox (= 6.0.3.
|
498
|
-
actionmailer (= 6.0.3.
|
499
|
-
actionpack (= 6.0.3.
|
500
|
-
actiontext (= 6.0.3.
|
501
|
-
actionview (= 6.0.3.
|
502
|
-
activejob (= 6.0.3.
|
503
|
-
activemodel (= 6.0.3.
|
504
|
-
activerecord (= 6.0.3.
|
505
|
-
activestorage (= 6.0.3.
|
506
|
-
activesupport (= 6.0.3.
|
493
|
+
rails (6.0.3.6)
|
494
|
+
actioncable (= 6.0.3.6)
|
495
|
+
actionmailbox (= 6.0.3.6)
|
496
|
+
actionmailer (= 6.0.3.6)
|
497
|
+
actionpack (= 6.0.3.6)
|
498
|
+
actiontext (= 6.0.3.6)
|
499
|
+
actionview (= 6.0.3.6)
|
500
|
+
activejob (= 6.0.3.6)
|
501
|
+
activemodel (= 6.0.3.6)
|
502
|
+
activerecord (= 6.0.3.6)
|
503
|
+
activestorage (= 6.0.3.6)
|
504
|
+
activesupport (= 6.0.3.6)
|
507
505
|
bundler (>= 1.3.0)
|
508
|
-
railties (= 6.0.3.
|
506
|
+
railties (= 6.0.3.6)
|
509
507
|
sprockets-rails (>= 2.0.0)
|
510
508
|
rails-controller-testing (1.0.5)
|
511
509
|
actionpack (>= 5.0.1.rc1)
|
@@ -519,9 +517,9 @@ GEM
|
|
519
517
|
rails-i18n (6.0.0)
|
520
518
|
i18n (>= 0.7, < 2)
|
521
519
|
railties (>= 6.0.0, < 7)
|
522
|
-
railties (6.0.3.
|
523
|
-
actionpack (= 6.0.3.
|
524
|
-
activesupport (= 6.0.3.
|
520
|
+
railties (6.0.3.6)
|
521
|
+
actionpack (= 6.0.3.6)
|
522
|
+
activesupport (= 6.0.3.6)
|
525
523
|
method_source
|
526
524
|
rake (>= 0.8.7)
|
527
525
|
thor (>= 0.20.3, < 2.0)
|
@@ -541,7 +539,7 @@ GEM
|
|
541
539
|
rdoc (6.3.0)
|
542
540
|
record_tag_helper (1.0.1)
|
543
541
|
actionview (>= 5)
|
544
|
-
redhat_access (2.2.
|
542
|
+
redhat_access (2.2.20)
|
545
543
|
angular-rails-templates (>= 0.0.4)
|
546
544
|
foreman-tasks
|
547
545
|
katello
|
@@ -563,7 +561,7 @@ GEM
|
|
563
561
|
mime-types (>= 1.16, < 4.0)
|
564
562
|
netrc (~> 0.8)
|
565
563
|
retriable (3.1.2)
|
566
|
-
rexml (3.2.
|
564
|
+
rexml (3.2.5)
|
567
565
|
rfauxfactory (0.1.5)
|
568
566
|
roadie (4.0.0)
|
569
567
|
css_parser (~> 1.4)
|
@@ -628,12 +626,12 @@ GEM
|
|
628
626
|
tilt
|
629
627
|
scoped_search (4.1.9)
|
630
628
|
activerecord (>= 4.2.0)
|
631
|
-
sd_notify (0.1.
|
632
|
-
secure_headers (6.3.
|
629
|
+
sd_notify (0.1.1)
|
630
|
+
secure_headers (6.3.2)
|
633
631
|
selenium-webdriver (3.142.7)
|
634
632
|
childprocess (>= 0.5, < 4.0)
|
635
633
|
rubyzip (>= 1.2.2)
|
636
|
-
sequel (5.
|
634
|
+
sequel (5.45.0)
|
637
635
|
sexp_processor (4.15.2)
|
638
636
|
shoulda-context (1.2.2)
|
639
637
|
shoulda-matchers (4.3.0)
|
@@ -645,7 +643,7 @@ GEM
|
|
645
643
|
rack (~> 2.0)
|
646
644
|
rack-protection (>= 1.5.0)
|
647
645
|
redis (>= 3.3.5, < 4.2)
|
648
|
-
signet (0.
|
646
|
+
signet (0.15.0)
|
649
647
|
addressable (~> 2.3)
|
650
648
|
faraday (>= 0.17.3, < 2.0)
|
651
649
|
jwt (>= 1.5, < 3.0)
|
@@ -690,11 +688,11 @@ GEM
|
|
690
688
|
unf_ext
|
691
689
|
unf_ext (0.0.7.7)
|
692
690
|
unicode-display_width (1.6.1)
|
693
|
-
uniform_notifier (1.
|
691
|
+
uniform_notifier (1.14.2)
|
694
692
|
validates_lengths_from_database (0.8.0)
|
695
693
|
activerecord (>= 4)
|
696
694
|
vcr (3.0.3)
|
697
|
-
webmock (3.
|
695
|
+
webmock (3.12.2)
|
698
696
|
addressable (>= 2.3.6)
|
699
697
|
crack (>= 0.3.2)
|
700
698
|
hashdiff (>= 0.4.0, < 2.0.0)
|
data/config/routes.rb
CHANGED
@@ -37,7 +37,7 @@ Rails.application.routes.draw do
|
|
37
37
|
end
|
38
38
|
|
39
39
|
scope '/r/insights' do
|
40
|
-
match '/*path', :constraints => lambda { |req| !req.path.include?('view/api') }, to: 'machine_telemetries#forward_request', via: [:get, :post, :delete,:put, :patch]
|
40
|
+
match '(/*path)(/)', :constraints => lambda { |req| !req.path.include?('view/api') }, to: 'machine_telemetries#forward_request', via: [:get, :post, :delete,:put, :patch]
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
@@ -19,8 +19,9 @@ module InsightsCloud
|
|
19
19
|
def run
|
20
20
|
InsightsResolution.transaction do
|
21
21
|
InsightsResolution.delete_all
|
22
|
-
|
23
|
-
|
22
|
+
rule_ids = relevant_rules
|
23
|
+
api_response = query_insights_resolutions(rule_ids) unless rule_ids.empty?
|
24
|
+
write_resolutions(api_response) if api_response
|
24
25
|
end
|
25
26
|
end
|
26
27
|
|
@@ -11,8 +11,12 @@ module InsightsCloud
|
|
11
11
|
return
|
12
12
|
end
|
13
13
|
|
14
|
-
|
15
|
-
|
14
|
+
# since the tasks are not connected, we need to force sequence execution here
|
15
|
+
# to make sure we don't run resolutions until we synced all our rules
|
16
|
+
sequence do
|
17
|
+
plan_self
|
18
|
+
plan_resolutions
|
19
|
+
end
|
16
20
|
end
|
17
21
|
|
18
22
|
def plan_resolutions
|
data/package.json
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'test_plugin_helper'
|
2
2
|
require 'foreman_tasks/test_helpers'
|
3
3
|
|
4
4
|
class InsightsResolutionsSyncTest < ActiveSupport::TestCase
|
@@ -75,4 +75,13 @@ class InsightsResolutionsSyncTest < ActiveSupport::TestCase
|
|
75
75
|
assert_equal 5, InsightsResolution.all.count
|
76
76
|
assert_equal 2, @rule.resolutions.count
|
77
77
|
end
|
78
|
+
|
79
|
+
test 'Skips pinging the cloud if no rule ids were found' do
|
80
|
+
InsightsCloud::Async::InsightsResolutionsSync.any_instance.expects(:query_insights_resolutions).never
|
81
|
+
InsightsRule.all.delete_all
|
82
|
+
|
83
|
+
ForemanTasks.sync_task(InsightsCloud::Async::InsightsResolutionsSync)
|
84
|
+
|
85
|
+
assert_equal 0, InsightsResolution.all.count
|
86
|
+
end
|
78
87
|
end
|
@@ -48,6 +48,7 @@ class CloudRequestForwarderTest < ActiveSupport::TestCase
|
|
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",
|
51
|
+
"/redhat_access/r/insights/" => "https://cert.cloud.redhat.com/api/apicast-tests/ping",
|
51
52
|
}
|
52
53
|
|
53
54
|
paths.each do |key, value|
|
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.26
|
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-08-
|
11
|
+
date: 2021-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: katello
|
@@ -671,7 +671,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
671
671
|
- !ruby/object:Gem::Version
|
672
672
|
version: '0'
|
673
673
|
requirements: []
|
674
|
-
rubygems_version: 3.2.
|
674
|
+
rubygems_version: 3.2.22
|
675
675
|
signing_key:
|
676
676
|
specification_version: 4
|
677
677
|
summary: Summary of ForemanRhCloud.
|