foreman_maintain 0.7.8 → 0.7.9
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: 87bde0596489f26881bb8ee92b9cec10df4aead0e72fb3411a6dc80916949efe
|
4
|
+
data.tar.gz: 0da057d0f9f7b6aaa0e5a2e0484a7adb66ed41eb09f0ef9f7fa32949640d7f92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76b77f3b03a65565e8cc4264ce27b9e172bfc1f84c2f9819718e359551f7906c42783e1cd2f50f3a5ad4601445274c92e8fa734c90141da993f7a6777c39d4a6
|
7
|
+
data.tar.gz: 9b1dd4c293088f06b87584857123e74e17f2b7802408a0086d1889b159ef69a904af0b7eb16bc8f9f5a84bca7281d44fa30c4c9c4726853a854ea42f8f81365a
|
@@ -25,9 +25,10 @@ class Features::Service < ForemanMaintain::Feature
|
|
25
25
|
select(&:exist?)
|
26
26
|
end
|
27
27
|
|
28
|
-
def filtered_services(options)
|
28
|
+
def filtered_services(options, action = '')
|
29
29
|
services = include_unregistered_services(existing_services, options[:include])
|
30
|
-
services = filter_services(services, options)
|
30
|
+
services = filter_services(services, options, action)
|
31
|
+
|
31
32
|
raise 'No services found matching your parameters' unless services.any?
|
32
33
|
return services unless options[:reverse]
|
33
34
|
|
@@ -61,7 +62,7 @@ class Features::Service < ForemanMaintain::Feature
|
|
61
62
|
def run_action_on_services(action, options, spinner)
|
62
63
|
status = 0
|
63
64
|
failed_services = []
|
64
|
-
filtered_services(options).each_value do |group|
|
65
|
+
filtered_services(options, action).each_value do |group|
|
65
66
|
fork_threads_for_services(action, group, spinner).each do |service, status_and_output|
|
66
67
|
spinner.update("#{action_noun(action)} #{service}") if action == 'status'
|
67
68
|
item_status, output = status_and_output
|
@@ -115,7 +116,8 @@ class Features::Service < ForemanMaintain::Feature
|
|
115
116
|
service_list + socket_list
|
116
117
|
end
|
117
118
|
|
118
|
-
|
119
|
+
# rubocop:disable Metrics/AbcSize
|
120
|
+
def filter_services(service_list, options, action)
|
119
121
|
if options[:only] && options[:only].any?
|
120
122
|
service_list = service_list.select do |service|
|
121
123
|
options[:only].any? { |opt| service.matches?(opt) }
|
@@ -128,8 +130,17 @@ class Features::Service < ForemanMaintain::Feature
|
|
128
130
|
end
|
129
131
|
|
130
132
|
service_list = extend_service_list_with_sockets(service_list, options)
|
133
|
+
service_list = filter_disabled_services!(action, service_list)
|
131
134
|
service_list.group_by(&:priority).to_h
|
132
135
|
end
|
136
|
+
# rubocop:enable Metrics/AbcSize
|
137
|
+
|
138
|
+
def filter_disabled_services!(action, service_list)
|
139
|
+
if %w[start stop restart status].include?(action)
|
140
|
+
service_list.select!(&:enabled?)
|
141
|
+
end
|
142
|
+
service_list
|
143
|
+
end
|
133
144
|
|
134
145
|
def include_unregistered_services(service_list, services_filter)
|
135
146
|
return service_list unless services_filter
|
@@ -19,8 +19,11 @@ module Procedures::Content
|
|
19
19
|
puts execute!('foreman-rake katello:pulp3_content_switchover')
|
20
20
|
puts 'Re-running the installer to switch specified content over to pulp3'
|
21
21
|
args = ['--foreman-proxy-content-proxy-pulp-isos-to-pulpcore=true',
|
22
|
+
'--foreman-proxy-content-proxy-pulp-yum-to-pulpcore=true',
|
23
|
+
'--foreman-proxy-content-proxy-pulp-deb-to-pulpcore=true',
|
22
24
|
'--katello-use-pulp-2-for-file=false',
|
23
25
|
'--katello-use-pulp-2-for-docker=false',
|
26
|
+
'--katello-use-pulp-2-for-deb=false',
|
24
27
|
'--katello-use-pulp-2-for-yum=false']
|
25
28
|
feature(:installer).run(args.join(' '))
|
26
29
|
end
|
@@ -16,7 +16,7 @@ module Procedures
|
|
16
16
|
def run_service_action(action, options)
|
17
17
|
action_noun = feature(:service).action_noun(action).capitalize
|
18
18
|
puts "\n#{action_noun} the following service(s):"
|
19
|
-
services = feature(:service).filtered_services(options)
|
19
|
+
services = feature(:service).filtered_services(options, action)
|
20
20
|
print_services(services)
|
21
21
|
with_spinner('') do |spinner|
|
22
22
|
feature(:service).handle_services(spinner, action, options)
|
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.7.
|
4
|
+
version: 0.7.9
|
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: 2021-03-
|
11
|
+
date: 2021-03-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: clamp
|
@@ -418,7 +418,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
418
418
|
- !ruby/object:Gem::Version
|
419
419
|
version: '0'
|
420
420
|
requirements: []
|
421
|
-
rubygems_version: 3.
|
421
|
+
rubygems_version: 3.0.9
|
422
422
|
signing_key:
|
423
423
|
specification_version: 4
|
424
424
|
summary: Foreman maintenance tool belt
|