katello 4.12.0.rc3 → 4.12.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of katello might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/helpers/katello/concerns/dashboard_helper_extensions.rb +0 -10
- data/app/helpers/katello/hosts_and_hostgroups_helper.rb +14 -2
- data/app/lib/katello/resources/cdn.rb +4 -13
- data/app/services/katello/pulp3/alternate_content_source.rb +2 -2
- data/lib/katello/plugin.rb +0 -7
- data/lib/katello/version.rb +1 -1
- data/webpack/scenes/ContentViews/Publish/CVPublishForm.js +1 -1
- data/webpack/scenes/ContentViews/Publish/__tests__/publishContentView.test.js +30 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd21e38a92cceb34e2ae67a8e9dd1f128eed67323230e83eeb671a63bad4f11f
|
4
|
+
data.tar.gz: 7cddfcb3d2aaae7a8d170b760986c4268b7bde531bff0f88d6b21896cda8e340
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1762ccadc8e731d4662b243fd46effe9df5d67ce39a6cb5fa36f1593fb60d7e24237b497740feba93cf7e73f62497e8c8b1e637d584f85a864a0c367697f0303
|
7
|
+
data.tar.gz: b16c43097ea41164f44f68225deaa0a4e6cf256e06976f40519237e286575f87728b8af45e5861af6df241826fd31350eb20bbf90461566add5c4a4411e8c2cb
|
@@ -8,16 +8,6 @@ module Katello
|
|
8
8
|
def total_host_count
|
9
9
|
host_query.size
|
10
10
|
end
|
11
|
-
|
12
|
-
def removed_widgets
|
13
|
-
widgets = super
|
14
|
-
|
15
|
-
if Organization.current&.simple_content_access?
|
16
|
-
widgets.reject! { |widget| ::Widget.singleton_class::SUBSCRIPTION_TEMPLATES.include? widget[:template] }
|
17
|
-
end
|
18
|
-
|
19
|
-
widgets
|
20
|
-
end
|
21
11
|
end
|
22
12
|
end
|
23
13
|
end
|
@@ -72,6 +72,10 @@ module Katello
|
|
72
72
|
def fetch_lifecycle_environment(host_or_hostgroup, options = {})
|
73
73
|
return host_or_hostgroup.single_lifecycle_environment if host_or_hostgroup.try(:single_lifecycle_environment)
|
74
74
|
return host_or_hostgroup.lifecycle_environment if host_or_hostgroup.try(:lifecycle_environment)
|
75
|
+
if host_or_hostgroup.is_a?(::Hostgroup) && host_or_hostgroup.content_facet.present?
|
76
|
+
# to handle cloned hostgroups that are new records
|
77
|
+
return host_or_hostgroup.content_facet.lifecycle_environment
|
78
|
+
end
|
75
79
|
selected_host_group = options.fetch(:selected_host_group, nil)
|
76
80
|
return selected_host_group.lifecycle_environment if selected_host_group.present?
|
77
81
|
end
|
@@ -79,12 +83,20 @@ module Katello
|
|
79
83
|
def fetch_content_view(host_or_hostgroup, options = {})
|
80
84
|
return host_or_hostgroup.single_content_view if host_or_hostgroup.try(:single_content_view)
|
81
85
|
return host_or_hostgroup.content_view if host_or_hostgroup.try(:content_view)
|
86
|
+
if host_or_hostgroup.is_a?(::Hostgroup) && host_or_hostgroup.content_facet.present?
|
87
|
+
# to handle cloned hostgroups that are new records
|
88
|
+
return host_or_hostgroup.content_facet.content_view
|
89
|
+
end
|
82
90
|
selected_host_group = options.fetch(:selected_host_group, nil)
|
83
91
|
return selected_host_group.content_view if selected_host_group.present?
|
84
92
|
end
|
85
93
|
|
86
|
-
def fetch_content_source(
|
87
|
-
return
|
94
|
+
def fetch_content_source(host_or_hostgroup, options = {})
|
95
|
+
return host_or_hostgroup.content_source if host_or_hostgroup.content_source_id&.present? && host_or_hostgroup.persisted?
|
96
|
+
if host_or_hostgroup.is_a?(::Hostgroup) && host_or_hostgroup.content_facet.present?
|
97
|
+
# to handle cloned hostgroups that are new records
|
98
|
+
return host_or_hostgroup.content_facet.content_source
|
99
|
+
end
|
88
100
|
selected_host_group = options.fetch(:selected_host_group, nil)
|
89
101
|
return selected_host_group.content_source if selected_host_group.present?
|
90
102
|
end
|
@@ -1,8 +1,6 @@
|
|
1
1
|
module Katello
|
2
2
|
module Resources
|
3
3
|
module CDN
|
4
|
-
SUPPORTED_SSL_VERSIONS = ['SSLv23', 'TLSv1'].freeze
|
5
|
-
|
6
4
|
class Utils
|
7
5
|
# takes releasever from contentUrl (e.g. 6Server, 6.0, 6.1)
|
8
6
|
# returns hash e.g. {:major => 6, :minor => "6.1"}
|
@@ -24,11 +22,6 @@ module Katello
|
|
24
22
|
end
|
25
23
|
|
26
24
|
def initialize(url, options = {})
|
27
|
-
@ssl_version = Setting[:cdn_ssl_version]
|
28
|
-
if @ssl_version && !SUPPORTED_SSL_VERSIONS.include?(@ssl_version)
|
29
|
-
fail("Invalid SSL version specified. Check the 'CDN SSL Version' setting")
|
30
|
-
end
|
31
|
-
|
32
25
|
options.reverse_merge!(:verify_ssl => 9)
|
33
26
|
options.assert_valid_keys(:ssl_client_key,
|
34
27
|
:ssl_client_cert,
|
@@ -106,12 +99,10 @@ module Katello
|
|
106
99
|
net.cert_store = @cert_store
|
107
100
|
end
|
108
101
|
|
109
|
-
# NOTE: This
|
110
|
-
#
|
111
|
-
#
|
112
|
-
|
113
|
-
# "OpenSSL::SSL::SSLContext::METHODS"
|
114
|
-
net.ssl_version = @ssl_version
|
102
|
+
# NOTE: This is only here due to https://github.com/ruby/openssl/issues/709, otherwise the
|
103
|
+
# system-wide crypto policy could be used. Enforcing TLS version >= 1.2 will prevent using
|
104
|
+
# very old infrastructure for now, but that was considered better than having an insecure default.
|
105
|
+
net.min_version = OpenSSL::SSL::TLS1_2_VERSION
|
115
106
|
|
116
107
|
if (@options[:verify_ssl] == false) || (@options[:verify_ssl] == OpenSSL::SSL::VERIFY_NONE)
|
117
108
|
net.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
@@ -108,7 +108,7 @@ module Katello
|
|
108
108
|
if acs.content_type == ::Katello::Repository::FILE_TYPE && acs.subpaths.present?
|
109
109
|
paths = insert_pulp_manifest!(paths)
|
110
110
|
end
|
111
|
-
response = api.alternate_content_source_api.create(name: generate_backend_object_name, paths: paths,
|
111
|
+
response = api.alternate_content_source_api.create(name: generate_backend_object_name, paths: paths.sort,
|
112
112
|
remote: smart_proxy_acs.remote_href)
|
113
113
|
smart_proxy_acs.update!(alternate_content_source_href: response.pulp_href)
|
114
114
|
return response
|
@@ -125,7 +125,7 @@ module Katello
|
|
125
125
|
if acs.content_type == ::Katello::Repository::FILE_TYPE && acs.subpaths.present?
|
126
126
|
paths = insert_pulp_manifest!(paths)
|
127
127
|
end
|
128
|
-
api.alternate_content_source_api.update(href, name: generate_backend_object_name, paths: paths, remote: smart_proxy_acs.remote_href)
|
128
|
+
api.alternate_content_source_api.update(href, name: generate_backend_object_name, paths: paths.sort, remote: smart_proxy_acs.remote_href)
|
129
129
|
end
|
130
130
|
|
131
131
|
def delete_alternate_content_source
|
data/lib/katello/plugin.rb
CHANGED
@@ -373,13 +373,6 @@ Foreman::Plugin.register :katello do
|
|
373
373
|
collection: proc { http_proxy_select },
|
374
374
|
include_blank: N_("no global default")
|
375
375
|
|
376
|
-
setting 'cdn_ssl_version',
|
377
|
-
type: :string,
|
378
|
-
default: nil,
|
379
|
-
full_name: N_('CDN SSL version'),
|
380
|
-
description: N_("SSL version used to communicate with the CDN"),
|
381
|
-
collection: proc { hashify_parameters(Katello::Resources::CDN::SUPPORTED_SSL_VERSIONS) }
|
382
|
-
|
383
376
|
setting 'katello_default_provision',
|
384
377
|
type: :string,
|
385
378
|
default: 'Kickstart default',
|
data/lib/katello/version.rb
CHANGED
@@ -66,7 +66,7 @@ const CVPublishForm = ({
|
|
66
66
|
</Alert>)
|
67
67
|
}
|
68
68
|
{!duplicateReposAlertDismissed && composite &&
|
69
|
-
(duplicateRepos !== null
|
69
|
+
(duplicateRepos !== null && duplicateRepos.length > 0) &&
|
70
70
|
(
|
71
71
|
<Alert
|
72
72
|
ouiaId="duplicate-repos-alert"
|
@@ -1,6 +1,9 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import * as reactRedux from 'react-redux';
|
3
3
|
import { renderWithRedux, patientlyWaitFor, fireEvent, act } from 'react-testing-lib-wrapper';
|
4
|
+
import { screen } from '@testing-library/react';
|
5
|
+
import '@testing-library/jest-dom';
|
6
|
+
|
4
7
|
import { nockInstance, assertNockRequest } from '../../../../test-utils/nockWrapper';
|
5
8
|
import api from '../../../../services/api';
|
6
9
|
import PublishContentViewWizard from '../PublishContentViewWizard';
|
@@ -80,6 +83,33 @@ test('Can show wizard with duplicate repository warning for composite CV', async
|
|
80
83
|
assertNockRequest(filterScope, done);
|
81
84
|
});
|
82
85
|
|
86
|
+
test('Can show wizard without duplicate repository warning for composite CV', async (done) => {
|
87
|
+
const cvCompositeDetailsData = cvDetailData;
|
88
|
+
cvCompositeDetailsData.composite = true;
|
89
|
+
cvCompositeDetailsData.duplicate_repositories_to_publish = [];
|
90
|
+
const scope = nockInstance
|
91
|
+
.get(environmentPathsPath)
|
92
|
+
.query(true)
|
93
|
+
.reply(200, environmentPathsData);
|
94
|
+
const filterScope = nockInstance
|
95
|
+
.get(cvFiltersPath)
|
96
|
+
.reply(200, contentViewFilterData);
|
97
|
+
|
98
|
+
const { getByText } = renderWithRedux(<PublishContentViewWizard
|
99
|
+
details={cvCompositeDetailsData}
|
100
|
+
show
|
101
|
+
onClose={() => { }}
|
102
|
+
/>);
|
103
|
+
|
104
|
+
await patientlyWaitFor(() => {
|
105
|
+
expect(getByText('Publish new version - 6.0')).toBeInTheDocument();
|
106
|
+
expect(screen.queryByText('Repositories common to the selected content view versions will merge, resulting in a composite content view that is a union of all content from each of the content view versions.')).not.toBeInTheDocument();
|
107
|
+
});
|
108
|
+
|
109
|
+
assertNockRequest(scope);
|
110
|
+
assertNockRequest(filterScope, done);
|
111
|
+
});
|
112
|
+
|
83
113
|
test('Can show Wizard and show environment paths', async (done) => {
|
84
114
|
const scope = nockInstance
|
85
115
|
.get(environmentPathsPath)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: katello
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.12.0
|
4
|
+
version: 4.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- N/A
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-03-
|
11
|
+
date: 2024-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -5398,9 +5398,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
5398
5398
|
version: '4'
|
5399
5399
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
5400
5400
|
requirements:
|
5401
|
-
- - "
|
5401
|
+
- - ">="
|
5402
5402
|
- !ruby/object:Gem::Version
|
5403
|
-
version:
|
5403
|
+
version: '0'
|
5404
5404
|
requirements: []
|
5405
5405
|
rubygems_version: 3.4.10
|
5406
5406
|
signing_key:
|