foreman_maintain 0.1.1 → 0.1.2

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
  SHA1:
3
- metadata.gz: f75255e3cc2bff1d23e4a0196d6e2826913a6ace
4
- data.tar.gz: cdde5ab706e9252c19483b449e9c05ee559e270a
3
+ metadata.gz: c76360569117ea968a720fbb493d1348a396b01b
4
+ data.tar.gz: 746747370c85d10ad6f0dec6dfe7123085485e3a
5
5
  SHA512:
6
- metadata.gz: 345d0af963d00eeda71989191017c47ca85702dcab3953eb35234f11fb48fca9dba51474beace95c4bfde91b76811fd935a5deacff025a353d25a407f2b4f6b8
7
- data.tar.gz: fd1ebfc2ac3910d269420a7e6cd434ed1618f3b90366b91fc17288b5d7ebe34f231bbdce0592b9d35f5e0edd0c9f69f107d1bfcaa96e53478ccd125837fd3505
6
+ metadata.gz: 276ab0eadfd9ac48178a4650aab47e54d215d9504f164f5b8a0342dc4271bea01718a27e49e50ac4fe6768c1e50772d296e493223da8b87d2ec2b468dba12ce4
7
+ data.tar.gz: 94cce0df009844faad60bb89d81a792a563a9850897d949c2722e35227700d21e554b8ffd1f9321eab243c1b45ef3537ee963d7aeab440b0cd3e168e18ee4bb4
@@ -0,0 +1,9 @@
1
+ class Features::Pulp < ForemanMaintain::Feature
2
+ metadata do
3
+ label :pulp
4
+
5
+ confine do
6
+ find_package('pulp-server')
7
+ end
8
+ end
9
+ end
@@ -5,7 +5,9 @@ module Procedures::Repositories
5
5
  confine do
6
6
  feature(:downstream) || feature(:upstream)
7
7
  end
8
- param :version, :required => true
8
+ param :version,
9
+ 'Version for which repositories needs to be setup',
10
+ :required => true
9
11
  run_once
10
12
  end
11
13
 
@@ -4,6 +4,10 @@ module Procedures::SyncPlans
4
4
  for_feature :sync_plans
5
5
  description 'disable active sync plans'
6
6
  tags :pre_migrations
7
+
8
+ confine do
9
+ feature(:katello)
10
+ end
7
11
  end
8
12
 
9
13
  def run
@@ -5,6 +5,10 @@ module Procedures::SyncPlans
5
5
  description 're-enable sync plans'
6
6
  tags :post_migrations
7
7
  before :disk_io
8
+
9
+ confine do
10
+ feature(:katello)
11
+ end
8
12
  end
9
13
 
10
14
  def run
@@ -122,6 +122,7 @@ module ForemanMaintain
122
122
  end
123
123
  present_feature
124
124
  end
125
+ # rubocop:enable Metrics/AbcSize
125
126
 
126
127
  def autodetect_features
127
128
  @autodetect_features ||= Feature.sub_classes.reduce({}) do |hash, feature_class|
@@ -82,6 +82,7 @@ module ForemanMaintain
82
82
  execution.status = :warning
83
83
  execution.output << message
84
84
  end
85
+ # rubocop:enable Naming/AccessorMethodName
85
86
 
86
87
  # public method to be overriden
87
88
  def run
@@ -36,6 +36,7 @@ module ForemanMaintain
36
36
  end
37
37
  value
38
38
  end
39
+ # rubocop:enable Metrics/PerceivedComplexity,Metrics/CyclomaticComplexity
39
40
 
40
41
  def process_array(value)
41
42
  if value.is_a?(Array)
@@ -105,6 +105,7 @@ module ForemanMaintain
105
105
  end
106
106
  end
107
107
  end
108
+ # rubocop:enable Metrics/MethodLength,Metrics/AbcSize
108
109
 
109
110
  # loop over the block until it returns some non-false value
110
111
  def until_valid_decision
@@ -224,6 +224,7 @@ module ForemanMaintain
224
224
  ensure
225
225
  clear_line
226
226
  end
227
+ # rubocop:enable Metrics/MethodLength,Metrics/AbcSize
227
228
 
228
229
  # loop over the block until it returns some non-false value
229
230
  def until_valid_decision
@@ -269,6 +270,7 @@ module ForemanMaintain
269
270
 
270
271
  private
271
272
 
273
+ # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
272
274
  def scenario_failure_message(scenario)
273
275
  return if scenario.passed?
274
276
  message = []
@@ -306,6 +308,7 @@ module ForemanMaintain
306
308
  end
307
309
  puts((message + recommend).join("\n"))
308
310
  end
311
+ # rubocop:enable Metrics/MethodLength, Metrics/AbcSize
309
312
 
310
313
  def format_steps(steps, join_with = ', ', indent = 0)
311
314
  steps.map { |s| "#{' ' * indent}[#{s.label_dashed}]" }.join(join_with)
@@ -32,7 +32,7 @@ module ForemanMaintain
32
32
  end
33
33
  end
34
34
 
35
- # rubocop:disable Metrics/MethodLength, Metrics/AbcSize, Metrics/CyclomaticComplexity
35
+ # rubocop:disable Metrics/CyclomaticComplexity
36
36
  def run_scenario(scenario, confirm = true)
37
37
  return if scenario.steps.empty?
38
38
  raise 'The runner is already in quit state' if quit?
@@ -47,6 +47,7 @@ module ForemanMaintain
47
47
  @last_scenario = scenario unless scenario.steps.empty?
48
48
  @exit_code = 1 if scenario.failed?
49
49
  end
50
+ # rubocop:enable Metrics/CyclomaticComplexity
50
51
 
51
52
  def whitelisted_step?(step)
52
53
  @whitelist.include?(step.label_dashed.to_s)
@@ -121,6 +122,7 @@ module ForemanMaintain
121
122
  end
122
123
  end
123
124
 
125
+ # rubocop:disable Metrics/MethodLength, Metrics/AbcSize, Metrics/CyclomaticComplexity
124
126
  def ask_about_offered_steps(step)
125
127
  if assumeyes? && rerun_check?(step)
126
128
  @reporter.puts 'Check still failing after attempt to fix. Skipping'
@@ -141,6 +143,7 @@ module ForemanMaintain
141
143
  end
142
144
  end
143
145
  end
146
+ # rubocop:enable Metrics/MethodLength, Metrics/AbcSize, Metrics/CyclomaticComplexity
144
147
 
145
148
  def rerun_check?(step)
146
149
  @last_decision_step == step
@@ -175,6 +175,7 @@ module ForemanMaintain
175
175
  The upgrade failed and system was restored to pre-upgrade state.
176
176
  MESSAGE
177
177
  end
178
+ # rubocop:enable Metrics/AbcSize, Lint/NonLocalExitFromIterator
178
179
 
179
180
  def with_non_empty_scenario(phase)
180
181
  next_scenario = scenario(phase)
@@ -75,6 +75,7 @@ module ForemanMaintain
75
75
  log_file.close
76
76
  exit_file.close
77
77
  end
78
+ # rubocop:enable Metrics/AbcSize
78
79
 
79
80
  def run_non_interactively
80
81
  IO.popen(full_command, 'r+') do |f|
@@ -28,6 +28,7 @@ module ForemanMaintain
28
28
  ready? && default_config_file
29
29
  end
30
30
  end
31
+ # rubocop:enable Metrics/AbcSize
31
32
 
32
33
  def setup_from_answers(username = nil, password = nil)
33
34
  save_config(:foreman => { :username => username, :password => password })
@@ -1,3 +1,3 @@
1
1
  module ForemanMaintain
2
- VERSION = '0.1.1'.freeze
2
+ VERSION = '0.1.2'.freeze
3
3
  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.1.1
4
+ version: 0.1.2
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-12-06 00:00:00.000000000 Z
11
+ date: 2018-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: clamp
@@ -99,6 +99,7 @@ description: Provides various features that helps keeping the Foreman/Satellite
99
99
  email: inecas@redhat.com
100
100
  executables:
101
101
  - foreman-maintain
102
+ - passenger-recycler
102
103
  extensions: []
103
104
  extra_rdoc_files:
104
105
  - LICENSE
@@ -129,6 +130,7 @@ files:
129
130
  - definitions/features/hammer.rb
130
131
  - definitions/features/katello.rb
131
132
  - definitions/features/katello_service.rb
133
+ - definitions/features/pulp.rb
132
134
  - definitions/features/sync_plans.rb
133
135
  - definitions/features/upstream.rb
134
136
  - definitions/procedures/foreman_tasks/delete.rb
@@ -221,7 +223,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
221
223
  version: '0'
222
224
  requirements: []
223
225
  rubyforge_project:
224
- rubygems_version: 2.5.2.1
226
+ rubygems_version: 2.6.12
225
227
  signing_key:
226
228
  specification_version: 4
227
229
  summary: Foreman maintenance tool belt