foreman_scc_manager 1.8.16 → 1.8.19
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94924eef8de5143907ca81d9ea6c41915d51c931d394356497e7168b8ffbe09e
|
4
|
+
data.tar.gz: 49d822f0d3c70abd53a0d818c3dc7c2102c9e12e8c325a3580f9e966bf50dd61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c26c8d840bd3a97a3cbc99e84dc53bc17c48a8175dd026cfd618d5597cbf934373ed048c978e5805db1942ef0b3b4ef9283ee60b8e36b26e5d3a886e48f20067
|
7
|
+
data.tar.gz: 6599cad1358b63afba7824ca2d8f7328d30c8f2d851814b681be2b7ec4de42116e9e3160680cd814f960cb49b65fd09edda863a7383e5fabd93925791bd6600e
|
@@ -84,9 +84,13 @@ module Actions
|
|
84
84
|
:unprotected => unprotected,
|
85
85
|
:gpg_key => gpg_key,
|
86
86
|
:arch => input[:arch],
|
87
|
-
:download_policy =>
|
87
|
+
:download_policy => Setting[:default_download_policy] }
|
88
88
|
repository = product.add_repo(repo_param)
|
89
|
-
repository.mirror_on_sync
|
89
|
+
if repository.has_attribute?('mirror_on_sync')
|
90
|
+
repository.mirror_on_sync = true
|
91
|
+
else
|
92
|
+
repository.mirroring_policy = ::Katello::RootRepository::MIRRORING_POLICY_CONTENT
|
93
|
+
end
|
90
94
|
repository.verify_ssl_on_sync = true
|
91
95
|
trigger(::Actions::Katello::Repository::CreateRoot, repository).tap do
|
92
96
|
output[:katello_root_repository_id] = repository.id
|
data/app/models/scc_product.rb
CHANGED
@@ -58,7 +58,11 @@ class SccProduct < ApplicationRecord
|
|
58
58
|
gpg_key = new_product.gpg_key
|
59
59
|
new_repo = new_product.add_repo(label, uniq_repo_name, repo.full_url, 'yum', unprotected, gpg_key)
|
60
60
|
new_repo.arch = arch || 'noarch'
|
61
|
-
new_repo.mirror_on_sync
|
61
|
+
if new_repo.has_attribute?('mirror_on_sync')
|
62
|
+
new_repo.mirror_on_sync = true
|
63
|
+
else
|
64
|
+
new_repo.mirroring_policy = ::Katello::RootRepository::MIRRORING_POLICY_CONTENT
|
65
|
+
end
|
62
66
|
new_repo.verify_ssl_on_sync = true
|
63
67
|
ForemanTasks.sync_task(::Actions::Katello::Repository::Create, new_repo, false, false)
|
64
68
|
end
|
@@ -22,10 +22,15 @@ class SccRepository < ApplicationRecord
|
|
22
22
|
|
23
23
|
def token_changed_callback
|
24
24
|
User.current ||= User.anonymous_admin
|
25
|
-
repo = self.katello_root_repository
|
26
|
-
return if repo.nil? || repo.url == full_url
|
27
25
|
|
28
|
-
|
29
|
-
|
26
|
+
# get all Katello repos that were derived from this SCC repo
|
27
|
+
# as uniq_name was changed, we need to look for repo labels that end with the repo name
|
28
|
+
katello_repos = Katello::RootRepository.where('label like ?', "%#{::Katello::Util::Model.labelize(self.description)}%")
|
29
|
+
katello_repos.each do |repo|
|
30
|
+
unless repo.url == full_url
|
31
|
+
::Foreman::Logging.logger('foreman_scc_manager').info "Update URL-token for repository '#{repo.name}'."
|
32
|
+
ForemanTasks.async_task(::Actions::Katello::Repository::Update, repo, url: full_url)
|
33
|
+
end
|
34
|
+
end
|
30
35
|
end
|
31
36
|
end
|
@@ -25,7 +25,7 @@
|
|
25
25
|
display_link_if_authorized(_("Sync"), hash_for_sync_scc_account_path(:id => scc_account).merge(:auth_object => scc_account, :authorizer => authorizer),
|
26
26
|
:method => :put),
|
27
27
|
display_delete_if_authorized(hash_for_scc_account_path(:id => scc_account).merge(:auth_object => scc_account, :authorizer => authorizer, :permission => 'delete_scc_accounts'),
|
28
|
-
:data => { :confirm => _("
|
28
|
+
:data => { :confirm => _("WARNING: If you want to switch SCC accounts and retain the synchronized content, DO NOT delete your old SCC account, even if it is expired. Please change the login and password of your SCC account, instead.\n\nIf you delete your old SCC account, you CANNOT reuse existing repositories, products, content views, and composite content views.\n\nReally delete SCC account %s?") % scc_account.to_s })
|
29
29
|
|
30
30
|
) %>
|
31
31
|
</td>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_scc_manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ATIX AG
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rdoc
|
@@ -220,21 +220,21 @@ signing_key:
|
|
220
220
|
specification_version: 4
|
221
221
|
summary: Suse Customer Center plugin for Foreman
|
222
222
|
test_files:
|
223
|
+
- test/support/fixtures_support.rb
|
223
224
|
- test/unit/foreman_scc_manager_test.rb
|
224
|
-
- test/
|
225
|
+
- test/actions/sync_test.rb
|
226
|
+
- test/test_plugin_helper.rb
|
227
|
+
- test/factories/foreman_scc_manager_factories.rb
|
225
228
|
- test/models/scc_product_test.rb
|
226
229
|
- test/models/scc_account_test.rb
|
227
|
-
- test/
|
228
|
-
- test/controllers/api/v2/scc_accounts_test.rb
|
229
|
-
- test/controllers/api/v2/scc_products_test.rb
|
230
|
-
- test/controllers/scc_accounts_controller_test.rb
|
231
|
-
- test/actions/sync_test.rb
|
232
|
-
- test/support/fixtures_support.rb
|
233
|
-
- test/fixtures/models/scc_accounts.yml
|
230
|
+
- test/features/sync_test.rb
|
234
231
|
- test/fixtures/models/scc_repositories.yml
|
232
|
+
- test/fixtures/models/scc_accounts.yml
|
235
233
|
- test/fixtures/models/scc_products.yml
|
236
|
-
- test/fixtures/files/data_products_page2.json
|
237
234
|
- test/fixtures/files/data_products_page1.json
|
238
235
|
- test/fixtures/files/data_subscriptions.json
|
236
|
+
- test/fixtures/files/data_products_page2.json
|
239
237
|
- test/fixtures/files/data_repositories.json
|
240
|
-
- test/
|
238
|
+
- test/controllers/scc_accounts_controller_test.rb
|
239
|
+
- test/controllers/api/v2/scc_products_test.rb
|
240
|
+
- test/controllers/api/v2/scc_accounts_test.rb
|