Class: ForemanMaintain::Feature

Inherits:
Object
  • Object
show all
Includes:
Concerns::Finders, Concerns::Hammer, Concerns::Logger, Concerns::Metadata, Concerns::Reporter, Concerns::SystemHelpers, Concerns::SystemService
Defined in:
lib/foreman_maintain/feature.rb

Constant Summary

Constants included from Concerns::Metadata

Concerns::Metadata::MAX_PREPARATION_STEPS_DEPTH

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Concerns::Hammer

included

Methods included from Concerns::Finders

#check, #detector, #feature, #find_all_scenarios, #find_checks, #find_procedures, #find_scenarios, #procedure

Methods included from Concerns::Metadata

#advanced_run?, #description, included, #label, #label_dashed, #metadata, #params, #preparation_steps, #run_once?, #runtime_message, #tags

Methods included from Concerns::SystemService

#system_service, #valid_sys_service?

Methods included from Concerns::SystemHelpers

#check_max_version, #check_min_version, #command_present?, #create_lv_snapshot, #directory_empty?, #execute, #execute!, #execute?, #execute_runner, #execute_with_status, #file_exists?, #file_nonzero?, #find_dir_containing_file, #find_package, #find_symlinks, #format_shell_args, #get_lv_info, #get_lv_path, #hostname, included, #package_manager, #package_version, #packages_action, #parse_csv, #parse_json, #rpm_version, #server?, #shellescape, #systemd_installed?, #version

Methods included from Concerns::Logger

#logger

Methods included from Concerns::Reporter

#reporter

Class Method Details

.inspectObject



11
12
13
# File 'lib/foreman_maintain/feature.rb', line 11

def self.inspect
  "Feature Class #{[:label]}<#{name}>"
end

Instance Method Details

#additional_featuresObject

Override to generate additional feature instances that can’t be autodetected directly



30
31
32
# File 'lib/foreman_maintain/feature.rb', line 30

def additional_features
  []
end

#config_filesObject

list of config files the feature uses



35
36
37
# File 'lib/foreman_maintain/feature.rb', line 35

def config_files
  []
end

#config_files_exclude_for_onlineObject



45
46
47
# File 'lib/foreman_maintain/feature.rb', line 45

def config_files_exclude_for_online
  []
end

#config_files_to_excludeObject

list of config files to be excluded from the list of config files. Can be used to exclude subdir from whole config directory



41
42
43
# File 'lib/foreman_maintain/feature.rb', line 41

def config_files_to_exclude
  []
end

#inspectObject



15
16
17
# File 'lib/foreman_maintain/feature.rb', line 15

def inspect
  "#{self.class.[:label]}<#{self.class.name}>"
end

#servicesObject

Override method with list of applicable services for feature. Services have a number for priority in order to ensure they are started and stopped in the correct order. example:

system_service(‘foo’, 10), system_service(‘bar’, 20)


24
25
26
# File 'lib/foreman_maintain/feature.rb', line 24

def services
  []
end