katello 4.10.0.rc1 → 4.10.0.rc2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b9db7d1d03acdd894e7da09e675d883390b6c89438fcc29c15e2a0d29c605fe9
4
- data.tar.gz: 22bada45567b4fdddfd8b3e0fe7599608cff84743f9dc0bdf284d2fbdd92f456
3
+ metadata.gz: cf47fce24e4eb32ab555fa4a624f8cbf2ee04a9911fbe031ee7c005d323a9a50
4
+ data.tar.gz: 7247fdecda0b42666ac4eefa3ce2d6e8d005c1279bb59ab9cc6847dc79f3476c
5
5
  SHA512:
6
- metadata.gz: 2e38e417ded6754e6502096e9b01b66d21e097e9fd3d21c4e9a4e205d23754b1c59eb85aee21cd4d1e48844f3cbfaf70506a303a6c929574fec87fd2f9ebf5a9
7
- data.tar.gz: 7f1e68bed2dfbc1e14ccf4c71d6a31311910f243bd0fbcc93449a2d8835f4a707117ff8b5f564a8bcfd5f0daffa26b03b5d066a251aaa5e2a310414594be3f53
6
+ metadata.gz: fec72e7378d6de1ccc70416273228202f1e33e2474799025d8efefb1f851c25948b3a4e7b3995852de983b0f4a6312f18b4b7c5682343a9d16f95f099a4b46aa
7
+ data.tar.gz: 9f8962a1d46bea986888c5dfb99ba639dd532b5ce9cac04c1d275ba21b7e2d76677cee24ac6c7089a0e1b2ec41bb55db636b32fa92e3d8ca07d13b6b2fc92dda
@@ -35,7 +35,7 @@ module Katello
35
35
  end
36
36
 
37
37
  def use_install_media(host, options = {})
38
- return true if host&.errors && host.errors.include?(:medium_id)
38
+ return true if host&.errors && host.errors.include?(:medium_id) && host.medium.present?
39
39
  kickstart_repository_id(host, options).blank?
40
40
  end
41
41
 
@@ -29,7 +29,7 @@ module Katello
29
29
  end
30
30
 
31
31
  def attributes=(attrs)
32
- check_cve_attributes(attrs)
32
+ check_cve_attributes(attrs) unless self.content_facet.blank?
33
33
  super
34
34
  end
35
35
 
@@ -93,12 +93,13 @@ module Katello
93
93
  content_view_environments&.first&.lifecycle_environment
94
94
  end
95
95
 
96
+ # rubocop:disable Metrics/CyclomaticComplexity
96
97
  def assign_single_environment(
97
98
  content_view_id: nil, lifecycle_environment_id: nil, environment_id: nil,
98
99
  content_view: nil, lifecycle_environment: nil, environment: nil
99
100
  )
100
- lifecycle_environment_id ||= environment_id || lifecycle_environment&.id || environment&.id
101
- content_view_id ||= content_view&.id
101
+ lifecycle_environment_id ||= environment_id || lifecycle_environment&.id || environment&.id || self.single_lifecycle_environment&.id
102
+ content_view_id ||= content_view&.id || self.single_content_view&.id
102
103
 
103
104
  unless lifecycle_environment_id
104
105
  fail _("Lifecycle environment must be specified")
@@ -2,6 +2,7 @@ module Katello
2
2
  class Ping
3
3
  OK_RETURN_CODE = 'ok'.freeze
4
4
  FAIL_RETURN_CODE = 'FAIL'.freeze
5
+ PACKAGES = %w(katello candlepin pulp foreman hammer).freeze
5
6
 
6
7
  class << self
7
8
  def services(capsule_id = nil)
@@ -142,6 +143,13 @@ module Katello
142
143
  result
143
144
  end
144
145
 
146
+ # get package information for katello and its components
147
+ def packages
148
+ names = PACKAGES.join("|")
149
+ packages = `rpm -qa | egrep "#{names}"`
150
+ packages.split("\n").sort
151
+ end
152
+
145
153
  def pulp_url(capsule_id)
146
154
  proxy = fetch_proxy(capsule_id)
147
155
  uri = URI.parse(proxy.pulp_url)
@@ -1,9 +1,17 @@
1
- <% media_selection = using_hostgroups_page? ? use_install_media(@hostgroup) : use_install_media(@host, :selected_host_group => @hostgroup)
1
+ <%
2
+ if using_discovered_hosts_page?
3
+ media_selection = use_install_media(@host, :selected_host_group => @host&.hostgroup)
4
+ kickstart_options = kickstart_repository_options(@host, :selected_host_group => @host&.hostgroup)
5
+ elsif using_hostgroups_page?
6
+ media_selection = use_install_media(@hostgroup)
7
+ kickstart_options = kickstart_repository_options(@hostgroup)
8
+ else
9
+ media_selection = use_install_media(@host, :selected_host_group => @hostgroup)
10
+ kickstart_options = kickstart_repository_options(@host, :selected_host_group => @hostgroup)
11
+ end
2
12
  install_media_radio = media_selection ? 'checked="checked"':''
3
13
  synced_content_radio = media_selection ? '' : 'checked="checked"'
4
14
  install_media_disabled = os_media.empty? ? 'disabled = true' : ''
5
-
6
- kickstart_options = using_hostgroups_page? ? kickstart_repository_options(@hostgroup) : kickstart_repository_options(@host, :selected_host_group => @hostgroup)
7
15
  synced_content_disabled = kickstart_options.empty? ? 'disabled = true' : ''
8
16
  %>
9
17
 
@@ -1,11 +1,19 @@
1
1
  <%
2
- kickstart_repo_id = using_hostgroups_page? ? kickstart_repository_id(@hostgroup) : kickstart_repository_id(@host, :selected_host_group => @hostgroup)
3
- kickstart_repo_id = 'unset' if kickstart_repo_id.blank?
4
- host = using_hostgroups_page? ? @hostgroup : @host
5
- kickstart_options = kickstart_repository_options(host, :selected_host_group => @hostgroup)
6
- ks_repo_select_id = using_hostgroups_page? ? :host_group_kickstart_repository_id : :host_kickstart_repository_id
7
- ks_repo_select_name = using_hostgroups_page? ? 'hostgroup[kickstart_repository_id]' : 'host[content_facet_attributes][kickstart_repository_id]'
8
- ks_repo_select_attr = using_hostgroups_page? ? 'kickstart_repository' : 'content_facet.kickstart_repository'
2
+ if using_discovered_hosts_page?
3
+ kickstart_repo_id = kickstart_repository_id(@host, :selected_host_group => @host&.hostgroup)
4
+ kickstart_options = kickstart_repository_options(@host, :selected_host_group => @host&.hostgroup)
5
+ elsif using_hostgroups_page?
6
+ kickstart_repo_id = kickstart_repository_id(@host, :selected_host_group => @host&.hostgroup)
7
+ kickstart_options = kickstart_repository_options(@hostgroup)
8
+ else
9
+ kickstart_repo_id = kickstart_repository_id(@host, :selected_host_group => @hostgroup)
10
+ kickstart_options = kickstart_repository_options(@host, :selected_host_group => @hostgroup)
11
+ end
12
+
13
+ kickstart_repo_id = 'unset' if kickstart_repo_id.blank?
14
+ ks_repo_select_id = using_hostgroups_page? ? :host_group_kickstart_repository_id : :host_kickstart_repository_id
15
+ ks_repo_select_name = using_hostgroups_page? ? 'hostgroup[kickstart_repository_id]' : 'host[content_facet_attributes][kickstart_repository_id]'
16
+ ks_repo_select_attr = using_hostgroups_page? ? 'kickstart_repository' : 'content_facet.kickstart_repository'
9
17
  %>
10
18
 
11
19
  <% spinner_path = asset_path('spinner.gif') %>
@@ -1,3 +1,3 @@
1
1
  module Katello
2
- VERSION = "4.10.0.rc1".freeze
2
+ VERSION = "4.10.0.rc2".freeze
3
3
  end
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.10.0.rc1
4
+ version: 4.10.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - N/A
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-06 00:00:00.000000000 Z
11
+ date: 2023-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails