foreman_scc_manager 1.8.13 → 1.8.15

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: 18d3ef9cc3c2af2f26b0da68c6abbb88491361ff689ddeb66061dc574f9604b6
4
- data.tar.gz: f4a1152c05a14eab317d058f551a738c2e2f676d570e1810b747e05192382c3a
3
+ metadata.gz: 4d5ff33d39add7e5f2977ff1a48e4cf80ff7dbdf2975362c8c53c67a3f7259a7
4
+ data.tar.gz: aeefb0d7ef8ea9d83bd617335781dadf90c5f17eea8ae5bc1322b6659460bdfe
5
5
  SHA512:
6
- metadata.gz: a5f96e7074f6372e072b99c6a49ec300d151e9f0c9b013b254f70ed1f92011849adbe3c5fa9b2c84658f9919030784ced02116682d5f77ca38b316c17bcb8665
7
- data.tar.gz: 39d1e30b2ac55968f70fe1653e2f0e32127e5cec6cb3f5072e8c5936980f0df4c53b7fde847c00f0d5f5961d72b8207e43fe2df0d56f77137a38881d47ce2bc4
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
- @selectable_gpg_keys = ::Katello::GpgKey.where(organization: org).collect { |p| [p.name, p.id] }.unshift ['None', nil]
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
- product.gpg_key = ::Katello::GpgKey.find_by(id: input[:gpg_key], organization: input[:organization_id])
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, null: true
4
- add_foreign_key :scc_accounts, :katello_gpg_keys, column: :katello_gpg_key_id, on_delete: :nullify
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
@@ -1,3 +1,3 @@
1
1
  module ForemanSccManager
2
- VERSION = '1.8.13'.freeze
2
+ VERSION = '1.8.15'.freeze
3
3
  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.13
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-30 00:00:00.000000000 Z
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
@@ -1,5 +0,0 @@
1
- class AddProductClassToSccProduct < ActiveRecord::Migration[6.0]
2
- def change
3
- add_column :scc_products, :product_class, :string
4
- end
5
- end