katello 3.6.0 → 3.6.0.1.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 +4 -4
- data/app/models/katello/host/subscription_facet.rb +3 -13
- data/app/models/katello/rhsm_fact_importer.rb +17 -2
- data/app/models/setting/content.rb +0 -2
- data/app/services/katello/registration_manager.rb +0 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-errata-modal.controller.js +1 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-details.html +1 -1
- data/lib/katello/engine.rb +2 -2
- data/lib/katello/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fef4964b5d77e0a6f601ceb21771e60d669f6ea6
|
4
|
+
data.tar.gz: 7869cc0cd7e1430ea04c54145c3027b5ffb65986
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2007080abb9a0a5ed941452bd794c3452a243b7a584bc3e2c4cf9d37de7284b81d79e00b1b739a797c26249f8191ca8367ab24846184cafdef4b345ce924a9d8
|
7
|
+
data.tar.gz: a753b6c0ba880b00ffc60c9d21a51cea36e907ee37445e1d5dc2b464afb7c015fa71d5b6c46fdc2e2499578d871c9473f2a76b3fd6ec0506fb70dee99af5a2b0
|
@@ -165,20 +165,10 @@ module Katello
|
|
165
165
|
end
|
166
166
|
end
|
167
167
|
|
168
|
-
def self.propose_custom_fact(facts)
|
169
|
-
setting_fact = Setting[:register_hostname_fact]
|
170
|
-
only_use_custom_fact = Setting[:register_hostname_fact_strict_match]
|
171
|
-
|
172
|
-
if !setting_fact.blank? && !facts[setting_fact].blank?
|
173
|
-
if only_use_custom_fact || ::Host.where(:name => setting_fact.downcase).any?
|
174
|
-
facts[setting_fact]
|
175
|
-
end
|
176
|
-
end
|
177
|
-
end
|
178
|
-
|
179
168
|
def self.propose_existing_hostname(facts)
|
180
|
-
|
181
|
-
|
169
|
+
setting_fact = Setting[:register_hostname_fact]
|
170
|
+
if !setting_fact.blank? && !facts[setting_fact].blank? && ::Host.where(:name => setting_fact.downcase).any?
|
171
|
+
name = facts[setting_fact]
|
182
172
|
elsif ::Host.where(:name => facts['network.hostname'].downcase).any?
|
183
173
|
name = facts['network.hostname']
|
184
174
|
elsif !facts['network.fqdn'].blank? && ::Host.where(:name => facts['network.fqdn'].downcase).any?
|
@@ -4,9 +4,24 @@ module Katello
|
|
4
4
|
Katello::RhsmFactName
|
5
5
|
end
|
6
6
|
|
7
|
-
def normalize(
|
7
|
+
def normalize(_facts)
|
8
|
+
facts = super
|
8
9
|
facts = change_separator(facts)
|
9
|
-
|
10
|
+
add_compose_facts(facts)
|
11
|
+
end
|
12
|
+
|
13
|
+
def add_compose_facts(facts)
|
14
|
+
additional_keys = []
|
15
|
+
facts.each_key do |fact_name|
|
16
|
+
parts = fact_name.split(RhsmFactName::SEPARATOR)
|
17
|
+
additional_keys += parts[0..-2].reduce([]) { |memo, part| memo << [memo.last, part].compact.join(RhsmFactName::SEPARATOR) }
|
18
|
+
end
|
19
|
+
|
20
|
+
# add the facts hierarchy to facts hash
|
21
|
+
additional_keys.uniq.each do |key|
|
22
|
+
facts[key] = nil
|
23
|
+
end
|
24
|
+
facts
|
10
25
|
end
|
11
26
|
|
12
27
|
def change_separator(facts)
|
@@ -65,8 +65,6 @@ class Setting::Content < Setting
|
|
65
65
|
false, N_('Delete Host upon unregister')),
|
66
66
|
self.set('register_hostname_fact', N_("When registering a host via subscription-manager, force use the specified fact (in the form of 'fact.fact')"),
|
67
67
|
'', N_('Subscription manager name registration fact'), nil),
|
68
|
-
self.set('register_hostname_fact_strict_match', N_('If true, and register_hostname_fact is set and provided, registration will look for a new host by name only '\
|
69
|
-
'using that fact, and will skip all hostname matching'), false, N_('Subscription manager name registration fact strict matching'), nil),
|
70
68
|
self.set('erratum_install_batch_size', N_("Errata installed via katello-agent will be triggered in batches of this size. Set to 0 to install all errata in one batch."),
|
71
69
|
0, N_('Erratum Install Batch Size')),
|
72
70
|
self.set('default_location_subscribed_hosts',
|
@@ -53,7 +53,6 @@ module Katello
|
|
53
53
|
host.content_facet = populate_content_facet(host, content_view_environment, host_uuid)
|
54
54
|
host.subscription_facet = populate_subscription_facet(host, activation_keys, consumer_params, host_uuid)
|
55
55
|
host.save! # the host has content and subscription facets at this point
|
56
|
-
create_initial_subscription_status(host)
|
57
56
|
|
58
57
|
User.as_anonymous_admin do
|
59
58
|
begin
|
@@ -95,10 +94,6 @@ module Katello
|
|
95
94
|
destroy_host_record(host.id)
|
96
95
|
end
|
97
96
|
|
98
|
-
def create_initial_subscription_status(host)
|
99
|
-
::Katello::SubscriptionStatus.create!(:host => host, :status => ::Katello::SubscriptionStatus::UNKNOWN)
|
100
|
-
end
|
101
|
-
|
102
97
|
def create_in_cp_and_pulp(host, content_view_environment, consumer_params, activation_keys)
|
103
98
|
# if CP fails, nothing to clean up yet w.r.t. backend services
|
104
99
|
cp_create = ::Katello::Resources::Candlepin::Consumer.create(content_view_environment.cp_id, consumer_params, activation_keys.map(&:cp_name))
|
@@ -102,9 +102,7 @@ angular.module('Bastion.content-hosts').controller('ContentHostsBulkErrataModalC
|
|
102
102
|
formData.authenticityToken = $window.AUTH_TOKEN.replace(/"/g, '');
|
103
103
|
formData.remoteAction = 'errata_install';
|
104
104
|
formData.errata = errataIds.join(',');
|
105
|
-
|
106
|
-
formData.hostIds = selectedHosts.included.ids.join(',');
|
107
|
-
}
|
105
|
+
formData.hostIds = selectedHosts.included.ids.join(',');
|
108
106
|
formData.search = selectedHosts.included.search;
|
109
107
|
formData.customize = customize;
|
110
108
|
|
data/lib/katello/engine.rb
CHANGED
@@ -11,7 +11,7 @@ module Katello
|
|
11
11
|
)
|
12
12
|
end
|
13
13
|
|
14
|
-
initializer 'katello.mount_engine', :
|
14
|
+
initializer 'katello.mount_engine', :after => :build_middleware_stack do |app|
|
15
15
|
app.routes_reloader.paths << "#{Katello::Engine.root}/config/routes/mount_engine.rb"
|
16
16
|
end
|
17
17
|
|
@@ -141,7 +141,7 @@ module Katello
|
|
141
141
|
app.config.autoload_paths += Dir["#{config.root}/app/views/foreman"]
|
142
142
|
end
|
143
143
|
|
144
|
-
initializer "katello.paths"
|
144
|
+
initializer "katello.paths" do |app|
|
145
145
|
app.routes_reloader.paths << "#{Katello::Engine.root}/config/routes/api/v2.rb"
|
146
146
|
app.routes_reloader.paths << "#{Katello::Engine.root}/config/routes/api/rhsm.rb"
|
147
147
|
app.routes_reloader.paths.unshift("#{Katello::Engine.root}/config/routes/overrides.rb")
|
data/lib/katello/version.rb
CHANGED
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: 3.6.0
|
4
|
+
version: 3.6.0.1.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: 2018-
|
11
|
+
date: 2018-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -2190,12 +2190,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
2190
2190
|
version: '0'
|
2191
2191
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
2192
2192
|
requirements:
|
2193
|
-
- - "
|
2193
|
+
- - ">"
|
2194
2194
|
- !ruby/object:Gem::Version
|
2195
|
-
version:
|
2195
|
+
version: 1.3.1
|
2196
2196
|
requirements: []
|
2197
2197
|
rubyforge_project:
|
2198
|
-
rubygems_version: 2.6
|
2198
|
+
rubygems_version: 2.4.6
|
2199
2199
|
signing_key:
|
2200
2200
|
specification_version: 4
|
2201
2201
|
summary: ''
|