foreman_maintain 0.0.6 → 0.0.7
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/README.md +75 -3
- data/config/foreman_maintain.yml.example +6 -0
- data/config/foreman_maintain.yml.packaging +6 -0
- data/definitions/checks/disk_speed_minimal.rb +1 -1
- data/definitions/checks/foreman_proxy/verify_dhcp_config_syntax.rb +17 -0
- data/definitions/checks/system_registration.rb +1 -1
- data/definitions/features/downstream.rb +31 -0
- data/definitions/features/foreman_1_7_x.rb +33 -0
- data/definitions/features/foreman_proxy.rb +72 -0
- data/definitions/features/sync_plans.rb +14 -20
- data/definitions/features/upstream.rb +4 -0
- data/definitions/procedures/foreman_tasks/delete.rb +2 -1
- data/definitions/procedures/hammer_setup.rb +4 -4
- data/definitions/procedures/installer/upgrade.rb +19 -0
- data/definitions/procedures/maintenance_mode/disable.rb +13 -0
- data/definitions/procedures/maintenance_mode/enable.rb +13 -0
- data/definitions/procedures/packages/install.rb +20 -0
- data/definitions/procedures/packages/update.rb +20 -0
- data/definitions/procedures/repositories/setup.rb +18 -0
- data/definitions/procedures/sync_plans/disable.rb +4 -0
- data/definitions/procedures/sync_plans/enable.rb +5 -0
- data/definitions/scenarios/upgrade_to_satellite_6_2.rb +77 -0
- data/lib/foreman_maintain.rb +5 -2
- data/lib/foreman_maintain/check.rb +11 -4
- data/lib/foreman_maintain/cli.rb +23 -0
- data/lib/foreman_maintain/cli/advanced/procedure/abstract_by_tag_command.rb +38 -0
- data/lib/foreman_maintain/cli/advanced/procedure/abstract_procedure_command.rb +17 -0
- data/lib/foreman_maintain/cli/advanced/procedure/by_tag_command.rb +32 -0
- data/lib/foreman_maintain/cli/advanced/procedure/run_command.rb +17 -0
- data/lib/foreman_maintain/cli/advanced/procedure_command.rb +11 -0
- data/lib/foreman_maintain/cli/advanced_command.rb +9 -0
- data/lib/foreman_maintain/cli/base.rb +52 -7
- data/lib/foreman_maintain/cli/health_command.rb +0 -12
- data/lib/foreman_maintain/cli/transform_clamp_options.rb +66 -0
- data/lib/foreman_maintain/cli/upgrade_command.rb +45 -33
- data/lib/foreman_maintain/concerns/metadata.rb +28 -2
- data/lib/foreman_maintain/concerns/scenario_metadata.rb +44 -0
- data/lib/foreman_maintain/concerns/system_helpers.rb +27 -5
- data/lib/foreman_maintain/config.rb +10 -5
- data/lib/foreman_maintain/core_ext.rb +5 -1
- data/lib/foreman_maintain/csv_parser.rb +81 -0
- data/lib/foreman_maintain/dependency_graph.rb +10 -48
- data/lib/foreman_maintain/error.rb +4 -0
- data/lib/foreman_maintain/executable.rb +64 -13
- data/lib/foreman_maintain/param.rb +1 -0
- data/lib/foreman_maintain/reporter.rb +84 -3
- data/lib/foreman_maintain/reporter/cli_reporter.rb +57 -21
- data/lib/foreman_maintain/runner.rb +80 -21
- data/lib/foreman_maintain/runner/execution.rb +29 -4
- data/lib/foreman_maintain/runner/stored_execution.rb +23 -0
- data/lib/foreman_maintain/scenario.rb +90 -7
- data/lib/foreman_maintain/upgrade_runner.rb +194 -0
- data/lib/foreman_maintain/utils.rb +1 -0
- data/lib/foreman_maintain/utils/curl_response.rb +21 -0
- data/lib/foreman_maintain/version.rb +1 -1
- metadata +24 -14
- data/definitions/checks/sync_plans/with_disabled_status.rb +0 -18
- data/definitions/checks/sync_plans/with_enabled_status.rb +0 -19
- data/definitions/procedures/install_package.rb +0 -17
- data/definitions/scenarios/pre_upgrade_check_foreman_1_14.rb +0 -13
- data/definitions/scenarios/pre_upgrade_check_satellite_6_0_z.rb +0 -14
- data/definitions/scenarios/pre_upgrade_check_satellite_6_1.rb +0 -14
- data/definitions/scenarios/pre_upgrade_check_satellite_6_1_z.rb +0 -14
- data/definitions/scenarios/pre_upgrade_check_satellite_6_2.rb +0 -14
- data/definitions/scenarios/pre_upgrade_check_satellite_6_2_z.rb +0 -14
- data/definitions/scenarios/pre_upgrade_check_satellite_6_3.rb +0 -14
- data/lib/foreman_maintain/object_cache.rb +0 -34
@@ -0,0 +1,194 @@
|
|
1
|
+
module ForemanMaintain
|
2
|
+
class UpgradeRunner < Runner
|
3
|
+
include Concerns::Finders
|
4
|
+
|
5
|
+
# Phases of the upgrade, see README.md for more info
|
6
|
+
PHASES = [:pre_upgrade_checks,
|
7
|
+
:pre_migrations,
|
8
|
+
:migrations,
|
9
|
+
:post_migrations,
|
10
|
+
:post_upgrade_checks].freeze
|
11
|
+
|
12
|
+
class << self
|
13
|
+
include Concerns::Finders
|
14
|
+
|
15
|
+
def available_targets
|
16
|
+
versions_to_tags.inject([]) do |available_targets, (version, tag)|
|
17
|
+
if !find_scenarios(:tags => [tag]).empty?
|
18
|
+
available_targets << version
|
19
|
+
else
|
20
|
+
available_targets
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def versions_to_tags
|
26
|
+
@versions_to_tags ||= {}
|
27
|
+
end
|
28
|
+
|
29
|
+
# registers target version to specific tag
|
30
|
+
def register_version(version, tag)
|
31
|
+
if versions_to_tags.key?(version) && versions_to_tags[version] != tag
|
32
|
+
raise "Version #{version} already registered to tag #{versions_to_tags[version]}"
|
33
|
+
end
|
34
|
+
@versions_to_tags[version] = tag
|
35
|
+
end
|
36
|
+
|
37
|
+
def clear_register
|
38
|
+
versions_to_tags.lear
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
attr_reader :version, :tag, :phase
|
43
|
+
|
44
|
+
def initialize(version, reporter, options = {})
|
45
|
+
super(reporter, [], options)
|
46
|
+
@tag = self.class.versions_to_tags[version]
|
47
|
+
raise "Unknown version #{version}" unless tag
|
48
|
+
@version = version
|
49
|
+
@scenario_cache = {}
|
50
|
+
self.phase = :pre_upgrade_checks
|
51
|
+
end
|
52
|
+
|
53
|
+
def scenario(phase)
|
54
|
+
return @scenario_cache[phase] if @scenario_cache.key?(phase)
|
55
|
+
condition = { :tags => [tag, phase] }
|
56
|
+
matching_scenarios = find_scenarios(condition)
|
57
|
+
raise "Too many scenarios match #{condition.inspect}" if matching_scenarios.size > 1
|
58
|
+
@scenario_cache[phase] = matching_scenarios.first
|
59
|
+
end
|
60
|
+
|
61
|
+
def run
|
62
|
+
PHASES.each do |phase|
|
63
|
+
return run_rollback if quit?
|
64
|
+
if skip?(phase)
|
65
|
+
skip_phase(phase)
|
66
|
+
else
|
67
|
+
run_phase(phase)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
def run_rollback
|
73
|
+
# we only are able to rollback from pre_migrations phase
|
74
|
+
if phase == :pre_migrations
|
75
|
+
rollback_pre_migrations
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
def storage
|
80
|
+
ForemanMaintain.storage("upgrade_#{version}")
|
81
|
+
end
|
82
|
+
|
83
|
+
# serializes the state of the run to storage
|
84
|
+
def save
|
85
|
+
storage[:serialized] = to_hash
|
86
|
+
storage.save
|
87
|
+
end
|
88
|
+
|
89
|
+
# deserializes the state of the run from the storage
|
90
|
+
def load
|
91
|
+
return unless storage[:serialized]
|
92
|
+
load_from_hash(storage[:serialized])
|
93
|
+
end
|
94
|
+
|
95
|
+
def run_phase(phase)
|
96
|
+
with_non_empty_scenario(phase) do |scenario|
|
97
|
+
confirm_scenario(scenario)
|
98
|
+
return if quit?
|
99
|
+
self.phase = phase
|
100
|
+
run_scenario(scenario, false)
|
101
|
+
# if we started from the :pre_upgrade_checks, ensure to ask before
|
102
|
+
# continuing with the rest of the upgrade
|
103
|
+
@ask_to_confirm_upgrade = phase == :pre_upgrade_checks
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
def skip_phase(skipped_phase)
|
108
|
+
with_non_empty_scenario(skipped_phase) do |scenario|
|
109
|
+
@reporter.before_scenario_starts(scenario)
|
110
|
+
@reporter.puts <<-MESSAGE.strip_heredoc
|
111
|
+
Skipping #{skipped_phase} phase as it was already run before.
|
112
|
+
To enforce to run the phase, use `upgrade advanced run --phase #{phase}`
|
113
|
+
MESSAGE
|
114
|
+
@reporter.after_scenario_finishes(scenario)
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
private
|
119
|
+
|
120
|
+
# rubocop:disable Metrics/AbcSize
|
121
|
+
def rollback_pre_migrations
|
122
|
+
raise "Unexpected phase #{phase}, expecting pre_migrations" unless phase == :pre_migrations
|
123
|
+
rollback_needed = scenario(:pre_migrations).steps.any? { |s| s.executed? && s.success? }
|
124
|
+
if rollback_needed
|
125
|
+
@quit = false
|
126
|
+
@last_scenario = nil # to prevent the unnecessary confirmation questions
|
127
|
+
[:post_migrations, :post_upgrade_checks].each do |phase|
|
128
|
+
if quit? && phase == :post_upgrade_checks
|
129
|
+
self.phase = :pre_migrations
|
130
|
+
return # rubocop:disable Lint/NonLocalExitFromIterator
|
131
|
+
end
|
132
|
+
run_phase(phase)
|
133
|
+
end
|
134
|
+
end
|
135
|
+
self.phase = :pre_upgrade_checks # rollback finished
|
136
|
+
@reporter.puts <<-MESSAGE.strip_heredoc
|
137
|
+
The upgrade failed and system was restored to pre-upgrade state.
|
138
|
+
MESSAGE
|
139
|
+
end
|
140
|
+
|
141
|
+
def with_non_empty_scenario(phase)
|
142
|
+
next_scenario = scenario(phase)
|
143
|
+
unless next_scenario.nil? || next_scenario.steps.empty?
|
144
|
+
yield next_scenario
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
def to_hash
|
149
|
+
ret = { :phase => phase, :scenarios => {} }
|
150
|
+
@scenario_cache.each do |key, scenario|
|
151
|
+
ret[:scenarios][key] = scenario.to_hash
|
152
|
+
end
|
153
|
+
ret
|
154
|
+
end
|
155
|
+
|
156
|
+
def load_from_hash(hash)
|
157
|
+
unless @scenario_cache.empty?
|
158
|
+
raise "Some scenarios are already initialized: #{@scenario_cache.keys}"
|
159
|
+
end
|
160
|
+
self.phase = hash[:phase]
|
161
|
+
hash[:scenarios].each do |key, scenario_hash|
|
162
|
+
@scenario_cache[key] = Scenario.new_from_hash(scenario_hash)
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
def confirm_scenario(scenario)
|
167
|
+
decision = super(scenario)
|
168
|
+
# we have not asked the user already about next steps
|
169
|
+
if decision.nil? && @ask_to_confirm_upgrade
|
170
|
+
response = reporter.ask_decision(<<-MESSAGE.strip_heredoc.strip)
|
171
|
+
The pre-upgrade checks indicate that the system is ready for upgrade.
|
172
|
+
It's recommended to perform a backup at this stage.
|
173
|
+
Confirm to continue with the the modification part of the upgrade
|
174
|
+
MESSAGE
|
175
|
+
if [:no, :quit].include?(response)
|
176
|
+
ask_to_quit
|
177
|
+
end
|
178
|
+
end
|
179
|
+
response
|
180
|
+
ensure
|
181
|
+
@ask_to_confirm_upgrade = false
|
182
|
+
end
|
183
|
+
|
184
|
+
def skip?(next_phase)
|
185
|
+
# the next_phase was run before the current phase
|
186
|
+
PHASES.index(next_phase) < PHASES.index(phase)
|
187
|
+
end
|
188
|
+
|
189
|
+
def phase=(phase)
|
190
|
+
raise "Unknown phase #{phase}" unless PHASES.include?(phase)
|
191
|
+
@phase = phase
|
192
|
+
end
|
193
|
+
end
|
194
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module ForemanMaintain
|
2
|
+
module Utils
|
3
|
+
class CurlResponse
|
4
|
+
attr_reader :result, :http_code, :error_msg
|
5
|
+
|
6
|
+
def initialize(response, http_code, http_error_msg)
|
7
|
+
@result = response || ''
|
8
|
+
@http_code = http_code
|
9
|
+
@error_msg = generate_error_msg(http_error_msg)
|
10
|
+
end
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
def generate_error_msg(msg_string)
|
15
|
+
<<-EOF
|
16
|
+
\n#{msg_string} #{http_code}. Response: #{result.inspect}
|
17
|
+
EOF
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_maintain
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Nečas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: clamp
|
@@ -110,18 +110,18 @@ files:
|
|
110
110
|
- config/foreman_maintain.yml.example
|
111
111
|
- config/foreman_maintain.yml.packaging
|
112
112
|
- definitions/checks/disk_speed_minimal.rb
|
113
|
+
- definitions/checks/foreman_proxy/verify_dhcp_config_syntax.rb
|
113
114
|
- definitions/checks/foreman_tasks/invalid/check_old.rb
|
114
115
|
- definitions/checks/foreman_tasks/invalid/check_pending_state.rb
|
115
116
|
- definitions/checks/foreman_tasks/invalid/check_planning_state.rb
|
116
117
|
- definitions/checks/foreman_tasks/not_paused.rb
|
117
118
|
- definitions/checks/foreman_tasks/not_running.rb
|
118
|
-
- definitions/checks/sync_plans/with_disabled_status.rb
|
119
|
-
- definitions/checks/sync_plans/with_enabled_status.rb
|
120
119
|
- definitions/checks/system_registration.rb
|
121
120
|
- definitions/features/downstream.rb
|
122
121
|
- definitions/features/foreman_1_11_x.rb
|
123
122
|
- definitions/features/foreman_1_7_x.rb
|
124
123
|
- definitions/features/foreman_database.rb
|
124
|
+
- definitions/features/foreman_proxy.rb
|
125
125
|
- definitions/features/foreman_tasks.rb
|
126
126
|
- definitions/features/sync_plans.rb
|
127
127
|
- definitions/features/upstream.rb
|
@@ -129,45 +129,55 @@ files:
|
|
129
129
|
- definitions/procedures/foreman_tasks/resume.rb
|
130
130
|
- definitions/procedures/foreman_tasks/ui_investigate.rb
|
131
131
|
- definitions/procedures/hammer_setup.rb
|
132
|
-
- definitions/procedures/
|
132
|
+
- definitions/procedures/installer/upgrade.rb
|
133
|
+
- definitions/procedures/maintenance_mode/disable.rb
|
134
|
+
- definitions/procedures/maintenance_mode/enable.rb
|
135
|
+
- definitions/procedures/packages/install.rb
|
136
|
+
- definitions/procedures/packages/update.rb
|
137
|
+
- definitions/procedures/repositories/setup.rb
|
133
138
|
- definitions/procedures/sync_plans/disable.rb
|
134
139
|
- definitions/procedures/sync_plans/enable.rb
|
135
|
-
- definitions/scenarios/
|
136
|
-
- definitions/scenarios/pre_upgrade_check_satellite_6_0_z.rb
|
137
|
-
- definitions/scenarios/pre_upgrade_check_satellite_6_1.rb
|
138
|
-
- definitions/scenarios/pre_upgrade_check_satellite_6_1_z.rb
|
139
|
-
- definitions/scenarios/pre_upgrade_check_satellite_6_2.rb
|
140
|
-
- definitions/scenarios/pre_upgrade_check_satellite_6_2_z.rb
|
141
|
-
- definitions/scenarios/pre_upgrade_check_satellite_6_3.rb
|
140
|
+
- definitions/scenarios/upgrade_to_satellite_6_2.rb
|
142
141
|
- lib/foreman_maintain.rb
|
143
142
|
- lib/foreman_maintain/check.rb
|
144
143
|
- lib/foreman_maintain/cli.rb
|
144
|
+
- lib/foreman_maintain/cli/advanced/procedure/abstract_by_tag_command.rb
|
145
|
+
- lib/foreman_maintain/cli/advanced/procedure/abstract_procedure_command.rb
|
146
|
+
- lib/foreman_maintain/cli/advanced/procedure/by_tag_command.rb
|
147
|
+
- lib/foreman_maintain/cli/advanced/procedure/run_command.rb
|
148
|
+
- lib/foreman_maintain/cli/advanced/procedure_command.rb
|
149
|
+
- lib/foreman_maintain/cli/advanced_command.rb
|
145
150
|
- lib/foreman_maintain/cli/base.rb
|
146
151
|
- lib/foreman_maintain/cli/health_command.rb
|
152
|
+
- lib/foreman_maintain/cli/transform_clamp_options.rb
|
147
153
|
- lib/foreman_maintain/cli/upgrade_command.rb
|
148
154
|
- lib/foreman_maintain/concerns/finders.rb
|
149
155
|
- lib/foreman_maintain/concerns/hammer.rb
|
150
156
|
- lib/foreman_maintain/concerns/logger.rb
|
151
157
|
- lib/foreman_maintain/concerns/metadata.rb
|
158
|
+
- lib/foreman_maintain/concerns/scenario_metadata.rb
|
152
159
|
- lib/foreman_maintain/concerns/system_helpers.rb
|
153
160
|
- lib/foreman_maintain/config.rb
|
154
161
|
- lib/foreman_maintain/core_ext.rb
|
162
|
+
- lib/foreman_maintain/csv_parser.rb
|
155
163
|
- lib/foreman_maintain/dependency_graph.rb
|
156
164
|
- lib/foreman_maintain/detector.rb
|
157
165
|
- lib/foreman_maintain/error.rb
|
158
166
|
- lib/foreman_maintain/executable.rb
|
159
167
|
- lib/foreman_maintain/feature.rb
|
160
|
-
- lib/foreman_maintain/object_cache.rb
|
161
168
|
- lib/foreman_maintain/param.rb
|
162
169
|
- lib/foreman_maintain/procedure.rb
|
163
170
|
- lib/foreman_maintain/reporter.rb
|
164
171
|
- lib/foreman_maintain/reporter/cli_reporter.rb
|
165
172
|
- lib/foreman_maintain/runner.rb
|
166
173
|
- lib/foreman_maintain/runner/execution.rb
|
174
|
+
- lib/foreman_maintain/runner/stored_execution.rb
|
167
175
|
- lib/foreman_maintain/scenario.rb
|
168
176
|
- lib/foreman_maintain/top_level_modules.rb
|
177
|
+
- lib/foreman_maintain/upgrade_runner.rb
|
169
178
|
- lib/foreman_maintain/utils.rb
|
170
179
|
- lib/foreman_maintain/utils/command_runner.rb
|
180
|
+
- lib/foreman_maintain/utils/curl_response.rb
|
171
181
|
- lib/foreman_maintain/utils/disk.rb
|
172
182
|
- lib/foreman_maintain/utils/disk/device.rb
|
173
183
|
- lib/foreman_maintain/utils/disk/io.rb
|
@@ -197,7 +207,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
197
207
|
version: '0'
|
198
208
|
requirements: []
|
199
209
|
rubyforge_project:
|
200
|
-
rubygems_version: 2.5
|
210
|
+
rubygems_version: 2.4.5
|
201
211
|
signing_key:
|
202
212
|
specification_version: 4
|
203
213
|
summary: Foreman maintenance tool belt
|
@@ -1,18 +0,0 @@
|
|
1
|
-
module Checks::SyncPlans
|
2
|
-
class WithDisabledStatus < ForemanMaintain::Check
|
3
|
-
include ForemanMaintain::Concerns::Hammer
|
4
|
-
|
5
|
-
metadata do
|
6
|
-
for_feature :sync_plans
|
7
|
-
description 'check for disabled sync plans'
|
8
|
-
tags :post_upgrade
|
9
|
-
end
|
10
|
-
|
11
|
-
def run
|
12
|
-
disabled_plans_count = feature(:sync_plans).disabled_plans_count
|
13
|
-
assert(disabled_plans_count == 0,
|
14
|
-
"There are #{disabled_plans_count} disabled sync plans which needs to be enabled",
|
15
|
-
:next_steps => Procedures::SyncPlans::Enable.new)
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
module Checks::SyncPlans
|
2
|
-
class WithEnabledStatus < ForemanMaintain::Check
|
3
|
-
include ForemanMaintain::Concerns::Hammer
|
4
|
-
|
5
|
-
metadata do
|
6
|
-
for_feature :sync_plans
|
7
|
-
description 'check for enabled sync plans'
|
8
|
-
tags :pre_upgrade
|
9
|
-
before :disk_io
|
10
|
-
end
|
11
|
-
|
12
|
-
def run
|
13
|
-
active_sync_plans_count = feature(:sync_plans).active_sync_plans_count
|
14
|
-
assert(active_sync_plans_count == 0,
|
15
|
-
"There are total #{active_sync_plans_count} active sync plans in the system",
|
16
|
-
:next_steps => Procedures::SyncPlans::Disable.new)
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
class Procedures::InstallPackage < ForemanMaintain::Procedure
|
2
|
-
metadata do
|
3
|
-
param :packages, 'List of packages to install', :array => true
|
4
|
-
end
|
5
|
-
|
6
|
-
def run
|
7
|
-
install_packages(@packages, :assumeyes => assumeyes?)
|
8
|
-
end
|
9
|
-
|
10
|
-
def necessary?
|
11
|
-
@packages.any? { |package| package_version(package).nil? }
|
12
|
-
end
|
13
|
-
|
14
|
-
def description
|
15
|
-
"Install package(s) #{@packages.join(', ')}"
|
16
|
-
end
|
17
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
class Scenarios::PreUpgradeCheckForeman_1_14 < ForemanMaintain::Scenario
|
2
|
-
metadata do
|
3
|
-
description 'checks before upgrading to Foreman 1.14'
|
4
|
-
tags :pre_upgrade_check
|
5
|
-
confine do
|
6
|
-
feature(:upstream)
|
7
|
-
end
|
8
|
-
end
|
9
|
-
|
10
|
-
def compose
|
11
|
-
add_steps(find_checks(:default))
|
12
|
-
end
|
13
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
class Scenarios::PreUpgradeCheckSatellite_6_0_z < ForemanMaintain::Scenario
|
2
|
-
metadata do
|
3
|
-
tags :pre_upgrade_check, :satellite_6_0_z
|
4
|
-
description 'checks before upgrading to Satellite 6.0'
|
5
|
-
confine do
|
6
|
-
feature(:downstream) && feature(:downstream).current_version.to_s.start_with?('6.0.')
|
7
|
-
end
|
8
|
-
end
|
9
|
-
|
10
|
-
def compose
|
11
|
-
add_steps(find_checks(:default))
|
12
|
-
add_steps(find_checks(:pre_upgrade))
|
13
|
-
end
|
14
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
class Scenarios::PreUpgradeCheckSatellite_6_1 < ForemanMaintain::Scenario
|
2
|
-
metadata do
|
3
|
-
description 'checks before upgrading to Satellite 6.1'
|
4
|
-
tags :pre_upgrade_check, :satellite_6_1
|
5
|
-
confine do
|
6
|
-
feature(:downstream) && feature(:downstream).current_version.to_s.start_with?('6.0.')
|
7
|
-
end
|
8
|
-
end
|
9
|
-
|
10
|
-
def compose
|
11
|
-
add_steps(find_checks(:default))
|
12
|
-
add_steps(find_checks(:pre_upgrade))
|
13
|
-
end
|
14
|
-
end
|