foreman_leapp 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/routes.rb +2 -1
- data/db/seeds.d/10_leapp_preupgrade.rb +8 -0
- data/lib/foreman_leapp/engine.rb +29 -20
- data/lib/foreman_leapp/version.rb +1 -1
- metadata +6 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0dfdafe8cfd66270ad9e3fa8b26b14318eeb3c335c63aaad854c5fb3514c7fdf
|
4
|
+
data.tar.gz: 8c2066dbfeeb373aa8989ba401fb2b39c25e0896373c2d6b4ddcba17ddf6fe7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77551a97d10c13a751b4f3d03954e6f359e53e980f933c402c5045bd173c35514b8dbd0555425fb3cef85dd6c6c542879167d4e4be789c6c342dfc92fba1bf25
|
7
|
+
data.tar.gz: 944be997316144646e4c1f993679467779a65fda006f07606acae2650e87dadc2cbf9c9fa1c68aa625a5f0451dbe26b72b949ec3cdae04436f000690b445f2cb
|
data/config/routes.rb
CHANGED
@@ -4,7 +4,8 @@ Rails.application.routes.draw do
|
|
4
4
|
resources :preupgrade_reports, :only => %i[index]
|
5
5
|
|
6
6
|
namespace :api, defaults: { format: 'json' } do
|
7
|
-
scope '(:apiv)', module: :v2, defaults: { apiv: 'v2' }, apiv: /v2/,
|
7
|
+
scope '(:apiv)', module: :v2, defaults: { apiv: 'v2' }, apiv: /v2/,
|
8
|
+
constraints: ApiConstraints.new( version: 2, default: true) do
|
8
9
|
resources :preupgrade_reports, only: %i[index show]
|
9
10
|
get 'job_invocations/:id/preupgrade_reports', to: 'preupgrade_reports#job_invocation'
|
10
11
|
end
|
@@ -4,6 +4,14 @@ organizations = Organization.unscoped.all
|
|
4
4
|
locations = Location.unscoped.all
|
5
5
|
User.as_anonymous_admin do
|
6
6
|
RemoteExecutionFeature.without_auditing do
|
7
|
+
if Rails.env.test? || Foreman.in_rake?
|
8
|
+
# If this file tries to import a template with a REX feature in a SeedsTest,
|
9
|
+
# it will fail - the REX feature isn't registered on SeedsTest because
|
10
|
+
# DatabaseCleaner truncates the db before every test.
|
11
|
+
# During db:seed, we also want to know the feature is registered before
|
12
|
+
# seeding the template
|
13
|
+
ForemanLeapp::Engine.register_rex_features
|
14
|
+
end
|
7
15
|
JobTemplate.without_auditing do
|
8
16
|
Dir[File.join("#{ForemanLeapp::Engine.root}/app/views/foreman_leapp/"\
|
9
17
|
'job_templates/**/*.erb')].each do |template|
|
data/lib/foreman_leapp/engine.rb
CHANGED
@@ -36,6 +36,11 @@ module ForemanLeapp
|
|
36
36
|
::Helpers::JobHelper.correct_feature?(subject, 'leapp_remediation_plan')
|
37
37
|
}
|
38
38
|
end
|
39
|
+
|
40
|
+
security_block :foreman_leapp do
|
41
|
+
permission :view_job_invocations, { :preupgrade_reports => %i[index show job_invocation],
|
42
|
+
'api/v2/preupgrade_reports' => %i[index show job_invocation] }
|
43
|
+
end
|
39
44
|
end
|
40
45
|
end
|
41
46
|
|
@@ -48,26 +53,7 @@ module ForemanLeapp
|
|
48
53
|
Rails.logger.warn "ForemanLeapp: skipping engine hook (#{e})"
|
49
54
|
end
|
50
55
|
|
51
|
-
|
52
|
-
:leapp_preupgrade,
|
53
|
-
N_('Preupgrade check with Leapp'),
|
54
|
-
description: N_('Upgradeability check for RHEL 7 host'),
|
55
|
-
host_action_button: false
|
56
|
-
)
|
57
|
-
|
58
|
-
RemoteExecutionFeature.register(
|
59
|
-
:leapp_upgrade,
|
60
|
-
N_('Upgrade with Leapp'),
|
61
|
-
description: N_('Run Leapp upgrade job for RHEL 7 host'),
|
62
|
-
host_action_button: false
|
63
|
-
)
|
64
|
-
|
65
|
-
RemoteExecutionFeature.register(
|
66
|
-
:leapp_remediation_plan,
|
67
|
-
N_('Remediation plan'),
|
68
|
-
description: N_('Run Remediation plan with Leapp'),
|
69
|
-
host_action_button: false
|
70
|
-
)
|
56
|
+
ForemanLeapp::Engine.register_rex_features
|
71
57
|
end
|
72
58
|
|
73
59
|
rake_tasks do
|
@@ -97,5 +83,28 @@ module ForemanLeapp
|
|
97
83
|
initializer 'foreman_leapp.apipie' do
|
98
84
|
Apipie.configuration.checksum_path += ['/api/']
|
99
85
|
end
|
86
|
+
|
87
|
+
def self.register_rex_features
|
88
|
+
RemoteExecutionFeature.register(
|
89
|
+
:leapp_preupgrade,
|
90
|
+
N_('Preupgrade check with Leapp'),
|
91
|
+
description: N_('Upgradeability check for RHEL 7 host'),
|
92
|
+
host_action_button: false
|
93
|
+
)
|
94
|
+
|
95
|
+
RemoteExecutionFeature.register(
|
96
|
+
:leapp_upgrade,
|
97
|
+
N_('Upgrade with Leapp'),
|
98
|
+
description: N_('Run Leapp upgrade job for RHEL 7 host'),
|
99
|
+
host_action_button: false
|
100
|
+
)
|
101
|
+
|
102
|
+
RemoteExecutionFeature.register(
|
103
|
+
:leapp_remediation_plan,
|
104
|
+
N_('Remediation plan'),
|
105
|
+
description: N_('Run Remediation plan with Leapp'),
|
106
|
+
host_action_button: false
|
107
|
+
)
|
108
|
+
end
|
100
109
|
end
|
101
110
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_leapp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Foreman Leapp team
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: foreman_remote_execution
|
@@ -17,9 +17,6 @@ dependencies:
|
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '3.2'
|
20
|
-
- - "<"
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '5.0'
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -27,9 +24,6 @@ dependencies:
|
|
27
24
|
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '3.2'
|
30
|
-
- - "<"
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: '5.0'
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
28
|
name: foreman_ansible
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,20 +52,6 @@ dependencies:
|
|
58
52
|
- - "~>"
|
59
53
|
- !ruby/object:Gem::Version
|
60
54
|
version: '6.2'
|
61
|
-
- !ruby/object:Gem::Dependency
|
62
|
-
name: rubocop
|
63
|
-
requirement: !ruby/object:Gem::Requirement
|
64
|
-
requirements:
|
65
|
-
- - "~>"
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: '0.80'
|
68
|
-
type: :development
|
69
|
-
prerelease: false
|
70
|
-
version_requirements: !ruby/object:Gem::Requirement
|
71
|
-
requirements:
|
72
|
-
- - "~>"
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
version: '0.80'
|
75
55
|
description: A Foreman plugin to support inplace RHEL 7 -> RHEL 8 upgrades with Leapp
|
76
56
|
utility.
|
77
57
|
email:
|
@@ -203,7 +183,7 @@ homepage: https://github.com/oamg/foreman_leapp
|
|
203
183
|
licenses:
|
204
184
|
- GPL-3.0
|
205
185
|
metadata: {}
|
206
|
-
post_install_message:
|
186
|
+
post_install_message:
|
207
187
|
rdoc_options: []
|
208
188
|
require_paths:
|
209
189
|
- lib
|
@@ -218,8 +198,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
218
198
|
- !ruby/object:Gem::Version
|
219
199
|
version: '0'
|
220
200
|
requirements: []
|
221
|
-
rubygems_version: 3.1.
|
222
|
-
signing_key:
|
201
|
+
rubygems_version: 3.1.6
|
202
|
+
signing_key:
|
223
203
|
specification_version: 4
|
224
204
|
summary: A Foreman plugin for Leapp utility.
|
225
205
|
test_files:
|