katello 3.11.1 → 3.11.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
  SHA256:
3
- metadata.gz: b9cf1e3fb4076039f50b51d4f980f244ffb5734c57a81e3333573368e2bd6d3b
4
- data.tar.gz: 83cf29642598dca1622d0813e607a377a220ec87f85cc54ff9783b3cec488bbb
3
+ metadata.gz: c6bc74e910b6619e481c98639a8c35762b2a190950dd08105741c148fa67e625
4
+ data.tar.gz: 97d7a845754bb44a742c2d3179daedee6a3efb4dbb2678b2cb533c359564a6e2
5
5
  SHA512:
6
- metadata.gz: 48c26149a3886a3f02ec6abeda2706c195958254fb4751078fddcf7187613badadfff71328fc19570bae5e79dbf85250978cfca8fb902fd3124bea1071c7e871
7
- data.tar.gz: 1b01c2da357fcdf719a6207854df618c1bb7654832a06612abc084a718661e3388e52a27d85a40e730811c7f3f1e100ed2286642c951afbf6faa2e51ec45b0c4
6
+ metadata.gz: 83be864e4e5b9d12b9dd148b45640742c5d6754f058e5f8f7ee602a5822af4836308ee39c6ab828256aa67acb2d87f8d6677dfb75bf0c59bbbeb8a2dc4409a10
7
+ data.tar.gz: 3b74fc7608493a0bea334ee4e508edf1dec92800fa2d438defe2f417624e6fd9a866d2da5d59094b92a70e326007cfbe02edcdd5b54d0eb1127255b3b2f985a3
@@ -12,8 +12,9 @@ module Katello
12
12
  JSON.parse(content_json).with_indifferent_access
13
13
  end
14
14
 
15
- def all(owner_label)
16
- content_json = Candlepin::CandlepinResource.get(path(owner_label), self.default_headers).body
15
+ def all(owner_label, include_only: nil)
16
+ includes = include_only ? "?#{included_list(include_only)}" : ""
17
+ content_json = Candlepin::CandlepinResource.get(path(owner_label) + includes, self.default_headers).body
17
18
  JSON.parse(content_json)
18
19
  end
19
20
 
@@ -28,7 +28,7 @@ module Katello
28
28
  'label' => host.content_view.try(:label),
29
29
  'latest-version' => host.content_view.try(:latest_version),
30
30
  'version' => content_version.try(:version),
31
- 'published' => content_version.try(:created_at).try(:time),
31
+ 'published' => content_version.try(:created_at).try(:time).to_s,
32
32
  'components' => content_view_components
33
33
  }
34
34
 
@@ -43,7 +43,7 @@ module Katello
43
43
  cv_label = cv.component_version.content_view.label
44
44
  components[cv_label] = {}
45
45
  components[cv_label]['version'] = cv.component_version.try(:version)
46
- components[cv_label]['published'] = cv.component_version.try(:created_at).try(:time)
46
+ components[cv_label]['published'] = cv.component_version.try(:created_at).try(:time).to_s
47
47
  end
48
48
  components
49
49
  end
@@ -6,9 +6,9 @@ UpgradeTask.define_tasks(:katello) do
6
6
  {:name => 'katello:upgrades:3.8:clear_checksum_type'},
7
7
  {:name => 'katello:upgrades:3.9:migrate_sync_plans'},
8
8
  {:name => 'katello:upgrades:3.10:clear_invalid_repo_credentials'},
9
+ {:name => 'katello:upgrades:3.10:update_gpg_key_urls'},
9
10
  {:name => 'katello:upgrades:3.11:import_yum_metadata'},
10
11
  {:name => 'katello:upgrades:3.11:update_puppet_repos'},
11
12
  {:name => 'katello:upgrades:3.11:clear_checksum_type', :task_name => 'katello:upgrades:3.8:clear_checksum_type'}
12
-
13
13
  ]
14
14
  end
@@ -0,0 +1,32 @@
1
+ namespace :katello do
2
+ namespace :upgrades do
3
+ namespace '3.10' do
4
+ desc "Update repositories with API V1 GPG URLs"
5
+ task :update_gpg_key_urls => ["environment", "katello:check_ping"] do
6
+ User.current = User.anonymous_admin
7
+
8
+ ::Organization.all.each do |org|
9
+ org_contents = Katello::Resources::Candlepin::Content.all(org.label, include_only: [:id, :gpgUrl])
10
+
11
+ org_contents.each do |cp_content|
12
+ gpg_url = cp_content['gpgUrl']
13
+ if gpg_url && gpg_url.match(/katello\/api\/repositories/)
14
+ content = Katello::Content.where(cp_content_id: cp_content['id'], organization: org).first
15
+
16
+ if content.nil?
17
+ Rails.logger.warn("Candlepin Content id=#{cp_content['id']} isn't in our DB. Try running 'rake katello:reimport' first.")
18
+ else
19
+ root_repo = Katello::RootRepository.in_organization(org).where(content_id: content.cp_content_id).first
20
+ new_gpg_url = root_repo.library_instance.yum_gpg_key_url
21
+ cp_content['gpgUrl'] = new_gpg_url
22
+ Katello::Resources::Candlepin::Content.update(org.label, cp_content)
23
+ content.gpg_url = new_gpg_url
24
+ content.save!
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -1,3 +1,3 @@
1
1
  module Katello
2
- VERSION = "3.11.1".freeze
2
+ VERSION = "3.11.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.11.1
4
+ version: 3.11.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: 2019-04-24 00:00:00.000000000 Z
11
+ date: 2019-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -2238,6 +2238,7 @@ files:
2238
2238
  - lib/katello/tasks/update_subscription_facet_backend_data.rake
2239
2239
  - lib/katello/tasks/upgrade_check.rake
2240
2240
  - lib/katello/tasks/upgrades/3.10/clear_invalid_repo_credentials.rake
2241
+ - lib/katello/tasks/upgrades/3.10/update_gpg_key_urls.rake
2241
2242
  - lib/katello/tasks/upgrades/3.11/import_yum_metadata_file.rake
2242
2243
  - lib/katello/tasks/upgrades/3.11/update_puppet_repos.rake
2243
2244
  - lib/katello/tasks/upgrades/3.8/clear_checksum_type.rake
@@ -2674,7 +2675,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
2674
2675
  version: '0'
2675
2676
  requirements: []
2676
2677
  rubyforge_project:
2677
- rubygems_version: 2.7.6
2678
+ rubygems_version: 2.7.6.2
2678
2679
  signing_key:
2679
2680
  specification_version: 4
2680
2681
  summary: ''