foreman_scc_manager 1.8.17 → 1.8.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/scc_repository.rb +9 -4
- data/lib/foreman_scc_manager/version.rb +1 -1
- metadata +12 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f77d244f737115eb2552b190ea4254a2174f46f71ee143996f5bc48f1eb3280
|
4
|
+
data.tar.gz: 8145e4a47459a01adc9f4ea1c737e7ffae351d8fd2120be41317f793ce5bce0a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 104e4dfe92004751c3a74b2fa4e06e134ec053a84cbd960ad025dd46504a4b3a5bb36c2fc5e00da381b7d247b1039c99be661c4a7e76f9bc2d38055927d75fa9
|
7
|
+
data.tar.gz: 1b0f1f14f32533461071e68ba485639d9a377413121586b93f8f7ede4388caf935aeeb9a7e3135f058d74390a7f1a6ff92f642f3ef0dea7c7dd9bada61a9060d
|
@@ -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
|
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.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ATIX AG
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-04-22 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
|