foreman_scc_manager 1.8.13 → 1.8.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/scc_accounts_controller.rb +5 -1
- data/app/lib/actions/scc_manager/subscribe_product.rb +5 -1
- data/db/migrate/20201119084201_add_gpg_key_to_scc_account.rb +6 -2
- data/lib/foreman_scc_manager/version.rb +1 -1
- metadata +2 -19
- data/db/migrate/20211022100718_add_product_class_to_scc_product.rb +0 -5
- data/locale/de/foreman_scc_manager.edit.po +0 -571
- data/locale/de/foreman_scc_manager.po.time_stamp +0 -0
- data/locale/en/foreman_scc_manager.edit.po +0 -562
- data/locale/en/foreman_scc_manager.po.time_stamp +0 -0
- data/test/controllers/scc_accounts_controller_test2.rb +0 -53
- data/test/fixtures/models/katello_products.yml.bak +0 -10
- data/test/fixtures/models/scc_extendings.yml +0 -6
- data/test/models/katello_products.rb +0 -10
- data/test/test_controller_helper.rb +0 -19
- data/test/unit/access_permissions_test.rb +0 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d5ff33d39add7e5f2977ff1a48e4cf80ff7dbdf2975362c8c53c67a3f7259a7
|
4
|
+
data.tar.gz: aeefb0d7ef8ea9d83bd617335781dadf90c5f17eea8ae5bc1322b6659460bdfe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6016a5bec42de9c7a09fc3b03267ff53f48e5ad9f065d367faf599f2a36dc7fa5060ce20555ef5d92c986cb333c051989603fdbbf98843c2c7a51b5fd7cbcc64
|
7
|
+
data.tar.gz: 0ccb001c57fcdedb3a343878f033761a854349e1f1a66a38cd0183b2b286e7b70beb576ce067803452122ffe4480fb055705d5ad46bcda170700e69a894a37b9
|
@@ -101,7 +101,11 @@ class SccAccountsController < ApplicationController
|
|
101
101
|
|
102
102
|
def find_available_gpg_keys
|
103
103
|
@scc_account ? org = @scc_account.organization : org = @organization
|
104
|
-
|
104
|
+
if ::Katello.const_defined?(:ContentCredential)
|
105
|
+
@selectable_gpg_keys = ::Katello::ContentCredential.where(organization: org).collect { |p| [p.name, p.id] }.unshift ['None', nil]
|
106
|
+
else
|
107
|
+
@selectable_gpg_keys = ::Katello::GpgKey.where(organization: org).collect { |p| [p.name, p.id] }.unshift ['None', nil]
|
108
|
+
end
|
105
109
|
end
|
106
110
|
|
107
111
|
def find_organization
|
@@ -54,7 +54,11 @@ module Actions
|
|
54
54
|
def create_sub_plans
|
55
55
|
product = ::Katello::Product.new
|
56
56
|
product.name = input[:product_name]
|
57
|
-
|
57
|
+
if ::Katello.const_defined?(:ContentCredential)
|
58
|
+
product.gpg_key = ::Katello::ContentCredential.find_by(id: input[:gpg_key], organization: input[:organization_id])
|
59
|
+
else
|
60
|
+
product.gpg_key = ::Katello::GpgKey.find_by(id: input[:gpg_key], organization: input[:organization_id])
|
61
|
+
end
|
58
62
|
product.description = input[:product_description]
|
59
63
|
trigger(::Actions::Katello::Product::Create,
|
60
64
|
product,
|
@@ -1,6 +1,10 @@
|
|
1
1
|
class AddGpgKeyToSccAccount < ActiveRecord::Migration[5.2]
|
2
2
|
def change
|
3
|
-
add_column :scc_accounts, :katello_gpg_key_id, :integer,
|
4
|
-
|
3
|
+
add_column :scc_accounts, :katello_gpg_key_id, :integer, null: true
|
4
|
+
if ::Katello.const_defined?(:ContentCredential)
|
5
|
+
add_foreign_key :scc_accounts, :katello_content_credentials, column: :katello_gpg_key_id, on_delete: :nullify
|
6
|
+
else
|
7
|
+
add_foreign_key :scc_accounts, :katello_gpg_keys, column: :katello_gpg_key_id, on_delete: :nullify
|
8
|
+
end
|
5
9
|
end
|
6
10
|
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.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ATIX AG
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rdoc
|
@@ -165,7 +165,6 @@ files:
|
|
165
165
|
- db/migrate/20210210104407_add_root_repository_id_to_scc_repository.rb
|
166
166
|
- db/migrate/20210224095050_connect_katello_root_repository_to_scc_repository.rb
|
167
167
|
- db/migrate/20210713092440_add_permissions.rb
|
168
|
-
- db/migrate/20211022100718_add_product_class_to_scc_product.rb
|
169
168
|
- lib/foreman_scc_manager.rb
|
170
169
|
- lib/foreman_scc_manager/engine.rb
|
171
170
|
- lib/foreman_scc_manager/version.rb
|
@@ -174,38 +173,28 @@ files:
|
|
174
173
|
- locale/Makefile
|
175
174
|
- locale/action_names.rb
|
176
175
|
- locale/de/LC_MESSAGES/foreman_scc_manager.mo
|
177
|
-
- locale/de/foreman_scc_manager.edit.po
|
178
176
|
- locale/de/foreman_scc_manager.po
|
179
|
-
- locale/de/foreman_scc_manager.po.time_stamp
|
180
177
|
- locale/en/LC_MESSAGES/foreman_scc_manager.mo
|
181
|
-
- locale/en/foreman_scc_manager.edit.po
|
182
178
|
- locale/en/foreman_scc_manager.po
|
183
|
-
- locale/en/foreman_scc_manager.po.time_stamp
|
184
179
|
- locale/foreman_scc_manager.pot
|
185
180
|
- locale/gemspec.rb
|
186
181
|
- test/actions/sync_test.rb
|
187
182
|
- test/controllers/api/v2/scc_accounts_test.rb
|
188
183
|
- test/controllers/api/v2/scc_products_test.rb
|
189
184
|
- test/controllers/scc_accounts_controller_test.rb
|
190
|
-
- test/controllers/scc_accounts_controller_test2.rb
|
191
185
|
- test/factories/foreman_scc_manager_factories.rb
|
192
186
|
- test/features/sync_test.rb
|
193
187
|
- test/fixtures/files/data_products_page1.json
|
194
188
|
- test/fixtures/files/data_products_page2.json
|
195
189
|
- test/fixtures/files/data_repositories.json
|
196
190
|
- test/fixtures/files/data_subscriptions.json
|
197
|
-
- test/fixtures/models/katello_products.yml.bak
|
198
191
|
- test/fixtures/models/scc_accounts.yml
|
199
|
-
- test/fixtures/models/scc_extendings.yml
|
200
192
|
- test/fixtures/models/scc_products.yml
|
201
193
|
- test/fixtures/models/scc_repositories.yml
|
202
|
-
- test/models/katello_products.rb
|
203
194
|
- test/models/scc_account_test.rb
|
204
195
|
- test/models/scc_product_test.rb
|
205
196
|
- test/support/fixtures_support.rb
|
206
|
-
- test/test_controller_helper.rb
|
207
197
|
- test/test_plugin_helper.rb
|
208
|
-
- test/unit/access_permissions_test.rb
|
209
198
|
- test/unit/foreman_scc_manager_test.rb
|
210
199
|
homepage: https://www.orcharhino.com/
|
211
200
|
licenses:
|
@@ -231,25 +220,19 @@ signing_key:
|
|
231
220
|
specification_version: 4
|
232
221
|
summary: Suse Customer Center plugin for Foreman
|
233
222
|
test_files:
|
234
|
-
- test/unit/access_permissions_test.rb
|
235
223
|
- test/unit/foreman_scc_manager_test.rb
|
236
|
-
- test/test_controller_helper.rb
|
237
224
|
- test/features/sync_test.rb
|
238
225
|
- test/models/scc_product_test.rb
|
239
|
-
- test/models/katello_products.rb
|
240
226
|
- test/models/scc_account_test.rb
|
241
227
|
- test/factories/foreman_scc_manager_factories.rb
|
242
228
|
- test/controllers/api/v2/scc_accounts_test.rb
|
243
229
|
- test/controllers/api/v2/scc_products_test.rb
|
244
|
-
- test/controllers/scc_accounts_controller_test2.rb
|
245
230
|
- test/controllers/scc_accounts_controller_test.rb
|
246
231
|
- test/actions/sync_test.rb
|
247
232
|
- test/support/fixtures_support.rb
|
248
233
|
- test/fixtures/models/scc_accounts.yml
|
249
|
-
- test/fixtures/models/katello_products.yml.bak
|
250
234
|
- test/fixtures/models/scc_repositories.yml
|
251
235
|
- test/fixtures/models/scc_products.yml
|
252
|
-
- test/fixtures/models/scc_extendings.yml
|
253
236
|
- test/fixtures/files/data_products_page2.json
|
254
237
|
- test/fixtures/files/data_products_page1.json
|
255
238
|
- test/fixtures/files/data_subscriptions.json
|