Class: ForemanMaintain::Utils::MongoCoreInstalled

Inherits:
MongoCore
  • Object
show all
Includes:
Concerns::SystemHelpers
Defined in:
lib/foreman_maintain/utils/mongo_core.rb

Constant Summary

Constants included from Concerns::OsFacts

Concerns::OsFacts::FALLBACK_OS_RELEASE_FILE, Concerns::OsFacts::OS_RELEASE_FILE

Instance Attribute Summary collapse

Instance Method Summary collapse

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, #foreman_plugin_name, #format_shell_args, #get_lv_info, #get_lv_path, #hammer_package, #hammer_plugin_name, #hostname, included, #package_manager, #package_version, #packages_action, #parse_csv, #parse_json, #proxy_plugin_name, #repository_manager, #ruby_prefix, #server?, #shellescape, #systemd_installed?, #version

Methods included from Concerns::OsFacts

#centos?, #cpu_cores, #deb_major_version, #debian?, #debian_or_ubuntu?, #el7?, #el8?, #el?, #el_major_version, #el_short_name, #facts, #memory, #os_id, #os_id_like_list, #os_name, #os_release_file, #os_version, #os_version_codename, #os_version_id, #rhel?, #ubuntu?, #ubuntu_major_version

Methods included from Concerns::Finders

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

Methods included from Concerns::Logger

#logger

Methods inherited from MongoCore

#restore_command

Constructor Details

#initializeMongoCoreInstalled

Returns a new instance of MongoCoreInstalled.



51
52
53
54
55
56
57
58
# File 'lib/foreman_maintain/utils/mongo_core.rb', line 51

def initialize
  @services = {}
  @server_config_files = []

  detect_mongo_default
  detect_mongo_34
  raise ForemanMaintain::Error::Fail, 'Mongo client was not found' unless @client_command
end

Instance Attribute Details

#client_commandObject (readonly)

Returns the value of attribute client_command.



49
50
51
# File 'lib/foreman_maintain/utils/mongo_core.rb', line 49

def client_command
  @client_command
end

#dump_commandObject (readonly)

Returns the value of attribute dump_command.



49
50
51
# File 'lib/foreman_maintain/utils/mongo_core.rb', line 49

def dump_command
  @dump_command
end

#server_config_filesObject (readonly)

Returns the value of attribute server_config_files.



49
50
51
# File 'lib/foreman_maintain/utils/mongo_core.rb', line 49

def server_config_files
  @server_config_files
end

#servicesObject (readonly)

Returns the value of attribute services.



49
50
51
# File 'lib/foreman_maintain/utils/mongo_core.rb', line 49

def services
  @services
end