Project

General

Profile

« Previous | Next » 

Revision f9b002c7

Added by Kavita Gaikwad over 6 years ago

Fixes #20974 - procedures for Katello-Service stop and start

View differences:

definitions/features/katello_service.rb
services = find_services_for_only_filter(running_services, options)
if services.empty?
spinner.update 'No katello service running'
yield
yield if block_given?
else
begin
filters = "--only #{services.join(',')}"
spinner.update 'Stopping katello running services..'
execute!("katello-service stop #{filters}")
yield
yield if block_given?
ensure
spinner.update 'Starting katello services..'
execute("katello-service start #{filters}")
start_stopped_services_using_filters(spinner, filters) if block_given?
end
end
end
......
filters
end
def start_stopped_services_using_filters(spinner, filters)
spinner.update 'Starting katello services..'
execute("katello-service start #{filters}")
end
def find_services_for_only_filter(curr_services, options)
defaults = { :only => [], :exclude => [] }
options = defaults.merge(options)

Also available in: Unified diff