katello 3.3.1.1 → 3.3.2

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: 65fd921479387a4448f64459f4bcb9a4841fb1fc
4
- data.tar.gz: 97b99adf9023236ed49eed8180a2021022ad860a
3
+ metadata.gz: 1aafb92d51f13eb142a3d6336be8e73f13fc70f3
4
+ data.tar.gz: f2d506e35428a7e34ab70860dfe1b4d2b46a64da
5
5
  SHA512:
6
- metadata.gz: 25ddf04e66b2045ad4c774429cfc3452ee3bea5213ecd5f75a021d59c0091790df849ea3cde02bb71a51de7503d20fdd83401a26f8b7eb75e0b070b38ec3073d
7
- data.tar.gz: 71a0bdc2008295a4730389e19b39831ad958caf4493d274ce87c7a9cd79f1e0081a7ff6a000477cf129fad6f3bd6c998ccdac914edcb5d1a923182737ca22193
6
+ metadata.gz: 65f5203e595cebe8d47f169443ea88e5d84cc83bee0c4a998eaf19f2099dffa1afc9724e55840dcfe21b4d5258c85ff406718b96765698967cb4fb5038612d5f
7
+ data.tar.gz: 93580eae8da88bf7513fe39c613479a44dc0b3322c2948d6e10296fd5c61c8f2707aa98544c41810fde07880c1af5688e28e75fcf3b5cdd91bc06f36ff073951
@@ -258,7 +258,8 @@ module Katello
258
258
  end
259
259
 
260
260
  def facts
261
- sync_task(::Actions::Katello::Host::Update, @host, rhsm_params)
261
+ User.current = User.anonymous_admin
262
+ async_task(::Actions::Katello::Host::Update, @host, rhsm_params)
262
263
  update_host_registered_through(@host, request.headers)
263
264
  render :json => {:content => _("Facts successfully updated.")}, :status => 200
264
265
  end
@@ -111,7 +111,10 @@ module Katello
111
111
  custom_sort = ->(sort_query) { sort_query.order('author, name, sortable_version DESC') }
112
112
  sorted_records = scoped_search(query, nil, nil, :resource_class => PuppetModule, :custom_sort => custom_sort)
113
113
  if params[:name]
114
- sorted_records[:results] = add_use_latest_records(sorted_records[:results].to_a, selected_latest_versions)
114
+ sorted_records_with_use_latest = add_use_latest_records(sorted_records[:results].to_a, selected_latest_versions)
115
+ sorted_records[:results] = sorted_records_with_use_latest
116
+ sorted_records[:total] = sorted_records_with_use_latest.count
117
+ sorted_records[:subtotal] = sorted_records_with_use_latest.count
115
118
  end
116
119
  respond_for_index :template => 'puppet_modules', :collection => sorted_records
117
120
  end
@@ -31,6 +31,9 @@ module Actions
31
31
  importer,
32
32
  distributors,
33
33
  display_name: input[:name])
34
+ rescue RestClient::Conflict
35
+ Rails.logger.warn("Tried to add repository #{input[:pulp_id]} that already exists.")
36
+ []
34
37
  end
35
38
 
36
39
  def importer
@@ -39,9 +39,10 @@ module Katello
39
39
  :through => :capsule_lifecycle_environments,
40
40
  :source => :lifecycle_environment
41
41
 
42
- has_many :hosts, :class_name => "::Host::Managed", :foreign_key => :content_source_id,
43
- :inverse_of => :content_source
44
- has_many :hostgroups, :class_name => "::Hostgroup", :foreign_key => :content_source_id,
42
+ has_many :content_facets, :class_name => "::Katello::Host::ContentFacet", :foreign_key => :content_source_id,
43
+ :inverse_of => :content_source
44
+
45
+ has_many :hostgroups, :class_name => "::Hostgroup", :foreign_key => :content_source_id,
45
46
  :inverse_of => :content_source
46
47
 
47
48
  validates :download_policy, inclusion: {
@@ -7,7 +7,7 @@ module Katello
7
7
  belongs_to :kickstart_repository, :class_name => "::Katello::Repository", :foreign_key => :kickstart_repository_id, :inverse_of => :kickstart_content_facets
8
8
  belongs_to :content_view, :inverse_of => :content_facets, :class_name => "Katello::ContentView"
9
9
  belongs_to :lifecycle_environment, :inverse_of => :content_facets, :class_name => "Katello::KTEnvironment"
10
- belongs_to :content_source, :class_name => "::SmartProxy", :foreign_key => :content_source_id, :inverse_of => :hosts
10
+ belongs_to :content_source, :class_name => "::SmartProxy", :foreign_key => :content_source_id, :inverse_of => :content_facets
11
11
 
12
12
  has_many :applicable_errata, :through => :content_facet_errata, :class_name => "Katello::Erratum", :source => :erratum
13
13
  has_many :content_facet_errata, :class_name => "Katello::ContentFacetErratum", :dependent => :destroy, :inverse_of => :content_facet
@@ -0,0 +1,32 @@
1
+ class FillInContentViewComponents < ActiveRecord::Migration
2
+ class FakeContentView < ActiveRecord::Base
3
+ self.table_name = 'katello_content_views'
4
+
5
+ has_many :content_view_components, :class_name => "FakeContentViewVersion", :dependent => :destroy,
6
+ :inverse_of => :composite_content_view, :foreign_key => :composite_content_view_id
7
+ end
8
+
9
+ class FakeContentViewVersion < ActiveRecord::Base
10
+ self.table_name = 'katello_content_view_versions'
11
+
12
+ has_many :content_view_components, :inverse_of => :content_view_version, :dependent => :destroy, :class_name => 'FakeContentViewComponent'
13
+ end
14
+
15
+ class FakeContentViewComponent < ActiveRecord::Base
16
+ self.table_name = 'katello_content_view_components'
17
+
18
+ belongs_to :content_view_version, :class_name => "FakeContentViewVersion",
19
+ :inverse_of => :content_view_components
20
+ belongs_to :content_view, :class_name => "FakeContentView",
21
+ :inverse_of => :component_composites
22
+ end
23
+
24
+ def up
25
+ FakeContentViewComponent.find_each do |cvc|
26
+ if cvc.content_view_id.nil? && cvc.content_view_version_id
27
+ cvc.content_view_id = cvc.content_view_version.content_view_id
28
+ cvc.save!
29
+ end
30
+ end
31
+ end
32
+ end
@@ -37,7 +37,10 @@
37
37
 
38
38
  <tbody>
39
39
  <tr bst-table-row ng-repeat-start="(name, subscriptions) in groupedSubscriptions">
40
- {{ name }}
40
+ <td class="row-select"></td>
41
+ <td colspan="8">
42
+ {{ name }}
43
+ </td>
41
44
  </tr>
42
45
  <tr bst-table-row
43
46
  ng-repeat-end
@@ -36,7 +36,10 @@
36
36
 
37
37
  <tbody>
38
38
  <tr bst-table-row ng-repeat-start="(name, subscriptions) in groupedSubscriptions | groupedFilter: subscriptionSearch">
39
- {{ name }}
39
+ <td class="row-select"></td>
40
+ <td colspan="8">
41
+ {{ name }}
42
+ </td>
40
43
  </tr>
41
44
  <tr class="grey-table-row" bst-table-row ng-repeat-end ng-repeat="subscription in subscriptions" row-select="subscription">
42
45
  <td bst-table-cell>{{ subscription | subscriptionAttachAmountFilter }}</td>
@@ -42,7 +42,6 @@
42
42
  <td colspan="8">
43
43
  {{ name }}
44
44
  </td>
45
- <td bst-table-cell colspan="8"></td>
46
45
  </tr>
47
46
  <tr class="grey-table-row" bst-table-row ng-repeat-end ng-repeat="subscription in subscriptions" row-select="subscription">
48
47
  <td bst-table-cell>
@@ -50,10 +50,10 @@
50
50
 
51
51
  <tbody>
52
52
  <tr bst-table-row ng-repeat-start="(name, subscriptions) in groupedSubscriptions | groupedFilter: subscriptionSearch">
53
- <td class="row-select">
54
- {{ name }}
53
+ <td class="row-select"></td>
54
+ <td colspan="8">
55
+ {{ name }}
55
56
  </td>
56
- <td bst-table-cell colspan="8"></td>
57
57
  </tr>
58
58
  <tr class="grey-table-row" bst-table-row ng-repeat-end ng-repeat="subscription in subscriptions" row-select="subscription">
59
59
  <td bst-table-cell>{{ subscription.quantity_consumed }}</td>
@@ -19,7 +19,8 @@ angular.module('Bastion.content-views').controller('ContentViewPuppetModuleVersi
19
19
 
20
20
  params = {
21
21
  name: $scope.$stateParams.moduleName,
22
- id: $scope.$stateParams.contentViewId
22
+ id: $scope.$stateParams.contentViewId,
23
+ 'full_result': true
23
24
  };
24
25
 
25
26
  nutupane = new Nutupane(ContentView, params, 'availablePuppetModules');
@@ -234,7 +234,7 @@ Foreman::Plugin.register :katello do
234
234
 
235
235
  add_controller_action_scope(HostsController, :index) do |base_scope|
236
236
  base_scope
237
- .includes(:content_view, :lifecycle_environment, :subscription_facet, :applicable_errata)
238
- .includes(content_facet: [:bound_repositories, :applicable_errata, :content_view, :lifecycle_environment])
237
+ .preload(:content_view, :lifecycle_environment, :subscription_facet, :applicable_errata)
238
+ .preload(content_facet: [:bound_repositories, :applicable_errata, :content_view, :lifecycle_environment])
239
239
  end
240
240
  end
@@ -14,7 +14,7 @@ namespace :katello do
14
14
  if host.content_facet.try(:uuid)
15
15
  test_method { Katello.pulp_server.extensions.consumer.retrieve(host.content_facet.uuid) }
16
16
  else
17
- test_method { false }
17
+ false
18
18
  end
19
19
  end
20
20
 
@@ -22,9 +22,9 @@ namespace :katello do
22
22
  if host.subscription_facet && host.subscription_facet.uuid
23
23
  test_method { ::Katello::Resources::Candlepin::Consumer.get(host.subscription_facet.uuid) }
24
24
  elsif host.subscription_facet
25
- test_method { true }
25
+ true
26
26
  else
27
- test_method { false }
27
+ false
28
28
  end
29
29
  end
30
30
 
@@ -1,3 +1,3 @@
1
1
  module Katello
2
- VERSION = "3.3.1.1".freeze
2
+ VERSION = "3.3.2".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.3.1.1
4
+ version: 3.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - N/A
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-14 00:00:00.000000000 Z
11
+ date: 2017-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -136,6 +136,20 @@ dependencies:
136
136
  - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: dynflow
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "<"
144
+ - !ruby/object:Gem::Version
145
+ version: 0.8.24
146
+ type: :runtime
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "<"
151
+ - !ruby/object:Gem::Version
152
+ version: 0.8.24
139
153
  - !ruby/object:Gem::Dependency
140
154
  name: runcible
141
155
  requirement: !ruby/object:Gem::Requirement
@@ -1395,6 +1409,7 @@ files:
1395
1409
  - db/migrate/20161102194100_create_content_view_docker_filter_rules.rb
1396
1410
  - db/migrate/20161214151548_move_content_source_id_to_content_facets.rb
1397
1411
  - db/migrate/20170220679403_remove_system_permissions.rb
1412
+ - db/migrate/20170321012632_fill_in_content_view_components.rb
1398
1413
  - db/seeds.d/101-locations.rb
1399
1414
  - db/seeds.d/102-organizations.rb
1400
1415
  - db/seeds.d/103-provisioning_templates.rb