foreman_rh_cloud 11.4.0 → 11.4.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/services/foreman_rh_cloud/cloud_request.rb +4 -0
- data/app/services/foreman_rh_cloud/cloud_request_forwarder.rb +7 -1
- data/app/services/foreman_rh_cloud/rules_ingester.rb +12 -1
- data/lib/foreman_rh_cloud/engine.rb +11 -0
- data/lib/foreman_rh_cloud/version.rb +1 -1
- data/package.json +1 -1
- 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: 9f8fc6102624f1f64c8417c8417d1ba48e5db528a0551027ba3fd2fac84cb11e
|
4
|
+
data.tar.gz: 9a8a361d435e8ad403937c50b46c6ed3f56f127342320d00258480bd9dfad194
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3d88a21a8bdb3990d0b5f76b20b9b43e1cac02d1c5f8c1adcbc565fa2291d67ede4c4fd5cc794b83db7569048853bf13dc1fa0eeb7fa0556c1e77c390ebf10e
|
7
|
+
data.tar.gz: 7309c277c4478897a0cf00d5fb2a18cf9007e2231bf6c63e16ee880feed2bc664ab340e9af84d092ae4b31bd8fe1e6e3c4f282a4628a56cd463eea2b3f234b2d
|
@@ -8,6 +8,10 @@ module ForemanRhCloud
|
|
8
8
|
proxy: ForemanRhCloud.transformed_http_proxy_string,
|
9
9
|
}.deep_merge(params)
|
10
10
|
|
11
|
+
if ForemanRhCloud.with_local_advisor_engine?
|
12
|
+
final_params[:ssl_ca_file] ||= ForemanRhCloud.ca_cert
|
13
|
+
end
|
14
|
+
|
11
15
|
response = RestClient::Request.execute(final_params)
|
12
16
|
|
13
17
|
logger.debug("Response headers for request url #{final_params[:url]} are: #{response.headers}")
|
@@ -34,7 +34,13 @@ module ForemanRhCloud
|
|
34
34
|
),
|
35
35
|
}
|
36
36
|
requested_url = original_request.original_fullpath.end_with?('/') ? original_request.path + '/' : original_request.path
|
37
|
-
|
37
|
+
params = path_params(requested_url, certs)
|
38
|
+
|
39
|
+
if ForemanRhCloud.with_local_advisor_engine?
|
40
|
+
params[:ssl_ca_file] = ForemanRhCloud.ca_cert
|
41
|
+
end
|
42
|
+
|
43
|
+
base_params.merge(params)
|
38
44
|
end
|
39
45
|
|
40
46
|
def prepare_forward_payload(original_request, controller_name)
|
@@ -13,7 +13,18 @@ module ForemanRhCloud
|
|
13
13
|
|
14
14
|
def fetch_rules_data
|
15
15
|
advisor_url = "#{ForemanRhCloud.on_premise_url}/r/insights/v1/static/release/content.json"
|
16
|
-
|
16
|
+
uri = URI.parse(advisor_url)
|
17
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
18
|
+
http.use_ssl = true
|
19
|
+
|
20
|
+
# Set CA certificate
|
21
|
+
http.ca_file = ForemanRhCloud.ca_cert
|
22
|
+
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
23
|
+
|
24
|
+
request = Net::HTTP::Get.new(uri.request_uri)
|
25
|
+
|
26
|
+
response = http.request(request)
|
27
|
+
JSON.parse(response.body, symbolize_names: true)
|
17
28
|
end
|
18
29
|
|
19
30
|
def fetch_rules_and_resolutions
|
@@ -212,4 +212,15 @@ module ForemanRhCloud
|
|
212
212
|
def self.with_local_advisor_engine?
|
213
213
|
SETTINGS.dig(:foreman_rh_cloud, :use_local_advisor_engine) || false
|
214
214
|
end
|
215
|
+
|
216
|
+
def self.ca_cert
|
217
|
+
# The reference to candlepin ca_cert_file can be removed
|
218
|
+
# once the setting is dropped. Foreman 3.15 introduces
|
219
|
+
# a single CA file that bundles all CAs.
|
220
|
+
if ::SETTINGS.dig(:katello, :candlepin, :ca_cert_file)
|
221
|
+
::SETTINGS[:katello][:candlepin][:ca_cert_file]
|
222
|
+
else
|
223
|
+
::SETTINGS[:ssl_ca_file]
|
224
|
+
end
|
225
|
+
end
|
215
226
|
end
|
data/package.json
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_rh_cloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 11.4.
|
4
|
+
version: 11.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Foreman Red Hat Cloud team
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: foreman_ansible
|
@@ -697,7 +697,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
697
697
|
- !ruby/object:Gem::Version
|
698
698
|
version: '0'
|
699
699
|
requirements: []
|
700
|
-
rubygems_version: 3.6.
|
700
|
+
rubygems_version: 3.6.7
|
701
701
|
specification_version: 4
|
702
702
|
summary: Summary of ForemanRhCloud.
|
703
703
|
test_files:
|