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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d939b0f76999c8b4811105c3b8357f5298ffe7fa
4
- data.tar.gz: 1fa1c0d78c2d7ce024b3c8e640325d1c1bd53f4d
3
+ metadata.gz: fef4964b5d77e0a6f601ceb21771e60d669f6ea6
4
+ data.tar.gz: 7869cc0cd7e1430ea04c54145c3027b5ffb65986
5
5
  SHA512:
6
- metadata.gz: a0cb319515bb5a1d43219315259d27960b816dc5b25e7b24728976d070d906a07a5c8cb793e1b116084782544e52531154369f58ffc2135a55434f783adfb934
7
- data.tar.gz: 0567cfcd54cfaa33133c1bdc999c7d2588c5dd9a1f7571d67dc48e1be34ef9816fbb8eadf2c6266c0b1aa42dd84d69dff50b4de02ab47a81dfd39208e2e249b1
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
- if propose_custom_fact(facts)
181
- name = propose_custom_fact(facts)
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(facts)
7
+ def normalize(_facts)
8
+ facts = super
8
9
  facts = change_separator(facts)
9
- super(facts)
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(/&quot;/g, '');
103
103
  formData.remoteAction = 'errata_install';
104
104
  formData.errata = errataIds.join(',');
105
- if (selectedHosts.included.ids) {
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
 
@@ -108,7 +108,7 @@
108
108
  <ul uib-dropdown-menu>
109
109
  <li>
110
110
  <a ui-sref="content-host.packages.actions" translate>
111
- Actions
111
+ Yum Actions
112
112
  </a>
113
113
  </li>
114
114
  <li>
@@ -11,7 +11,7 @@ module Katello
11
11
  )
12
12
  end
13
13
 
14
- initializer 'katello.mount_engine', :before => :sooner_routes_load, :after => :build_middleware_stack do |app|
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", :before => :sooner_routes_load do |app|
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")
@@ -1,3 +1,3 @@
1
1
  module Katello
2
- VERSION = "3.6.0".freeze
2
+ VERSION = "3.6.0.1.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: 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-04-10 00:00:00.000000000 Z
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: '0'
2195
+ version: 1.3.1
2196
2196
  requirements: []
2197
2197
  rubyforge_project:
2198
- rubygems_version: 2.6.14.1
2198
+ rubygems_version: 2.4.6
2199
2199
  signing_key:
2200
2200
  specification_version: 4
2201
2201
  summary: ''