foreman_scc_manager 3.1.1 → 4.0.0
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: b29c4b97a8544a564b8a29e145d3ea818ab6a59f4bf0fcd4c6bbd322028aaddf
|
4
|
+
data.tar.gz: b778dd3e956f9246d0f19e1dc88b19e0a06d0d01d091fa4046fa1ba719da3e6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 474687d7b4181867f0a00cfe6a576c84198e4cf8784a4bd94119cb18cb2b3870cd8fc1e3f6a63207731f31321405260b49d00fb0999bf8255138a268accb012f
|
7
|
+
data.tar.gz: dce03a040429f9202de34c3861bd32cc349aed0ded288d10899e4933efb1889d8dea3466d574d3e5e58e7ec665266491e699525ff4d8f99c95f5bad80d7d9384
|
data/README.md
CHANGED
@@ -26,14 +26,11 @@ foreman-installer
|
|
26
26
|
|
27
27
|
| Foreman Version | Katello Version | Plugin Version |
|
28
28
|
| --------------- | --------------- | -------------- |
|
29
|
+
| 3.13 | 4.15 | ~> 4.0.0 |
|
30
|
+
| 3.7 | 4.9 | ~> 3.0.0 |
|
29
31
|
| 3.3 | 4.5 | ~> 2.0.0 |
|
30
32
|
| 3.1 | 4.3 | ~> 1.8.20\* |
|
31
33
|
| 3.0 | 4.2 | ~> 1.8.20 |
|
32
|
-
| 2.5 | 4.1 | ~> 1.8.20 |
|
33
|
-
| 2.3 | 3.18 | ~> 1.8.9 |
|
34
|
-
| 2.1 | 3.16 | ~> 1.8.5 |
|
35
|
-
| 2.0 | 3.16 | ~> 1.8.4 |
|
36
|
-
| 1.24 | 3.14 | ~> 1.8.0 |
|
37
34
|
|
38
35
|
\* If you are using foreman_scc_manager in version 1.8.20 and then upgrade to Katello 4.3, you need to manually run the following rake task on your Foreman instance: `foreman-rake foreman_scc_manager:setup_authentication_tokens`.
|
39
36
|
|
@@ -51,7 +48,7 @@ Fork and send a Pull Request. Thanks!
|
|
51
48
|
|
52
49
|
## Copyright
|
53
50
|
|
54
|
-
Copyright (c)
|
51
|
+
Copyright (c) 2024 ATIX AG - https://atix.de
|
55
52
|
|
56
53
|
This program is free software: you can redistribute it and/or modify
|
57
54
|
it under the terms of the GNU General Public License as published by
|
@@ -1,9 +1,7 @@
|
|
1
|
-
module
|
2
|
-
|
3
|
-
extend ActiveSupport::Concern
|
1
|
+
module RecurringLogicExtensions
|
2
|
+
extend ActiveSupport::Concern
|
4
3
|
|
5
|
-
|
6
|
-
|
7
|
-
end
|
4
|
+
included do
|
5
|
+
has_one :scc_account, :inverse_of => :foreman_tasks_recurring_logic, :class_name => 'SccAccount'
|
8
6
|
end
|
9
7
|
end
|
@@ -4,13 +4,8 @@ module ForemanSccManager
|
|
4
4
|
class Engine < ::Rails::Engine
|
5
5
|
engine_name 'foreman_scc_manager'
|
6
6
|
|
7
|
-
config.autoload_paths += Dir["#{config.root}/app/controllers/concerns"]
|
8
|
-
config.autoload_paths += Dir["#{config.root}/app/helpers/concerns"]
|
9
|
-
config.autoload_paths += Dir["#{config.root}/app/models/concerns"]
|
10
|
-
config.autoload_paths += Dir["#{config.root}/app/overrides"]
|
11
|
-
|
12
7
|
config.to_prepare do
|
13
|
-
ForemanTasks::RecurringLogic.include
|
8
|
+
ForemanTasks::RecurringLogic.include RecurringLogicExtensions
|
14
9
|
end
|
15
10
|
|
16
11
|
# Add any db migrations
|
@@ -20,84 +15,86 @@ module ForemanSccManager
|
|
20
15
|
end
|
21
16
|
end
|
22
17
|
|
23
|
-
initializer 'foreman_scc_manager.register_plugin', :before => :finisher_hook do |
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
:
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
:
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
:
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
:
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
:
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
:
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
:
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
:
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
:
|
78
|
-
|
18
|
+
initializer 'foreman_scc_manager.register_plugin', :before => :finisher_hook do |app|
|
19
|
+
app.reloader.to_prepare do
|
20
|
+
Foreman::Plugin.register :foreman_scc_manager do
|
21
|
+
requires_foreman '>= 3.13'
|
22
|
+
requires_foreman_plugin 'katello', '>= 3.16.0'
|
23
|
+
register_gettext
|
24
|
+
|
25
|
+
precompile_assets 'foreman_scc_manager/scc_accounts.js'
|
26
|
+
|
27
|
+
apipie_documented_controllers ["#{ForemanSccManager::Engine.root}/app/controllers/api/v2/*.rb"]
|
28
|
+
|
29
|
+
# Add permissions
|
30
|
+
security_block :foreman_scc_manager do
|
31
|
+
permission :view_scc_accounts,
|
32
|
+
{ :scc_accounts => [:show, :index, :auto_complete_search],
|
33
|
+
:'api/v2/scc_accounts' => [:show, :index, :auto_complete_search] },
|
34
|
+
:resource_type => 'SccAccount'
|
35
|
+
|
36
|
+
permission :use_scc_accounts,
|
37
|
+
{ :scc_accounts => [:bulk_subscribe],
|
38
|
+
:'api/v2/scc_accounts' => [:bulk_subscribe, :bulk_subscribe_with_repos] },
|
39
|
+
:resource_type => 'SccAccount'
|
40
|
+
|
41
|
+
permission :new_scc_accounts,
|
42
|
+
{ :scc_accounts => [:new, :create],
|
43
|
+
:'api/v2/scc_accounts' => [:create] },
|
44
|
+
:resource_type => 'SccAccount'
|
45
|
+
|
46
|
+
permission :edit_scc_accounts,
|
47
|
+
{ :scc_accounts => [:edit, :update],
|
48
|
+
:'api/v2/scc_accounts' => [:update] },
|
49
|
+
:resource_type => 'SccAccount'
|
50
|
+
|
51
|
+
permission :delete_scc_accounts,
|
52
|
+
{ :scc_accounts => [:destroy],
|
53
|
+
:'api/v2/scc_accounts' => [:destroy] },
|
54
|
+
:resource_type => 'SccAccount'
|
55
|
+
|
56
|
+
permission :sync_scc_accounts,
|
57
|
+
{ :scc_accounts => [:sync],
|
58
|
+
:'api/v2/scc_accounts' => [:sync] },
|
59
|
+
:resource_type => 'SccAccount'
|
60
|
+
|
61
|
+
permission :test_connection_scc_accounts,
|
62
|
+
{ :scc_accounts => [:test_connection],
|
63
|
+
:'api/v2/scc_accounts' => [:test_connection] },
|
64
|
+
:resource_type => 'SccAccount'
|
65
|
+
|
66
|
+
permission :view_scc_products,
|
67
|
+
{ :scc_products => [:index, :show],
|
68
|
+
:'api/v2/scc_products' => [:index, :show] },
|
69
|
+
:resource_type => 'SccProduct'
|
70
|
+
|
71
|
+
permission :subscribe_scc_products,
|
72
|
+
{ :scc_products => [:subscribe, :unsubscribe],
|
73
|
+
:'api/v2/scc_products' => [:subscribe, :unsibscribe] },
|
74
|
+
:resource_type => 'SccProduct'
|
75
|
+
end
|
76
|
+
|
77
|
+
# Add a new role called 'SccManager' if it doesn't exist
|
78
|
+
role 'SccManager',
|
79
|
+
%i[view_scc_accounts use_scc_accounts new_scc_accounts edit_scc_accounts
|
80
|
+
delete_scc_accounts sync_scc_accounts test_connection_scc_accounts
|
81
|
+
view_scc_products subscribe_scc_products],
|
82
|
+
'Role granting permissons to manage SUSE Subscriptions'
|
83
|
+
|
84
|
+
role 'SccViewer',
|
85
|
+
%i[view_scc_accounts use_scc_accounts sync_scc_accounts
|
86
|
+
create_products view_products subscribe_scc_products view_scc_products],
|
87
|
+
'Role granting permissons to view and use SUSE Subscriptions'
|
88
|
+
|
89
|
+
add_all_permissions_to_default_roles
|
90
|
+
|
91
|
+
# add menu entry
|
92
|
+
menu :top_menu, :scc_manager,
|
93
|
+
url_hash: { controller: :scc_accounts, action: :index },
|
94
|
+
caption: _('SUSE Subscriptions'),
|
95
|
+
parent: :content_menu,
|
96
|
+
after: :red_hat_subscriptions
|
79
97
|
end
|
80
|
-
|
81
|
-
# Add a new role called 'SccManager' if it doesn't exist
|
82
|
-
role 'SccManager',
|
83
|
-
%i[view_scc_accounts use_scc_accounts new_scc_accounts edit_scc_accounts
|
84
|
-
delete_scc_accounts sync_scc_accounts test_connection_scc_accounts
|
85
|
-
view_scc_products subscribe_scc_products],
|
86
|
-
'Role granting permissons to manage SUSE Subscriptions'
|
87
|
-
|
88
|
-
role 'SccViewer',
|
89
|
-
%i[view_scc_accounts use_scc_accounts sync_scc_accounts
|
90
|
-
create_products view_products subscribe_scc_products view_scc_products],
|
91
|
-
'Role granting permissons to view and use SUSE Subscriptions'
|
92
|
-
|
93
|
-
add_all_permissions_to_default_roles
|
94
|
-
|
95
|
-
# add menu entry
|
96
|
-
menu :top_menu, :scc_manager,
|
97
|
-
url_hash: { controller: :scc_accounts, action: :index },
|
98
|
-
caption: _('SUSE Subscriptions'),
|
99
|
-
parent: :content_menu,
|
100
|
-
after: :red_hat_subscriptions
|
101
98
|
end
|
102
99
|
end
|
103
100
|
|
@@ -251,7 +251,7 @@ class Api::V2::SccAccountsControllerTest < ActionController::TestCase
|
|
251
251
|
put :update, params: { id: account.id, scc_account: { :base_url => '', :sync_date => Time.now, :interval => 'weekly' } }
|
252
252
|
|
253
253
|
assert_response :unprocessable_entity
|
254
|
-
assert_error_message "Base
|
254
|
+
assert_error_message "Base URL can't be blank"
|
255
255
|
end
|
256
256
|
|
257
257
|
test 'new account SCC server connection-test' do
|
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:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ATIX AG
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rdoc
|
@@ -58,6 +58,20 @@ dependencies:
|
|
58
58
|
- - ">="
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '0'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: coffee-rails
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: 5.0.0
|
68
|
+
type: :runtime
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: 5.0.0
|
61
75
|
- !ruby/object:Gem::Dependency
|
62
76
|
name: katello
|
63
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -223,7 +237,7 @@ homepage: https://www.orcharhino.com/
|
|
223
237
|
licenses:
|
224
238
|
- GPL-3.0
|
225
239
|
metadata: {}
|
226
|
-
post_install_message:
|
240
|
+
post_install_message:
|
227
241
|
rdoc_options: []
|
228
242
|
require_paths:
|
229
243
|
- lib
|
@@ -239,7 +253,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
239
253
|
version: '0'
|
240
254
|
requirements: []
|
241
255
|
rubygems_version: 3.3.27
|
242
|
-
signing_key:
|
256
|
+
signing_key:
|
243
257
|
specification_version: 4
|
244
258
|
summary: Suse Customer Center plugin for Foreman
|
245
259
|
test_files:
|