Class: Babushka::SuseSystemProfile

Inherits:
LinuxSystemProfile show all
Defined in:
lib/babushka/system_profile.rb

Instance Method Summary collapse

Methods inherited from LinuxSystemProfile

#cpus, #public_ip, #system_str, #total_memory

Methods inherited from SystemProfile

#bsd?, #codename, #codename_str, #cpu_type, #cpus, #definition, #description, #differentiator_for, #flavour, #hostname, #library_ext, #linux?, #match_list, #matcher, #matches?, #osx?, #pkg_helper_key, #pkg_helper_str, #public_ip, #system, #system_description, #total_memory, #version_info

Methods included from ShellHelpers

cmd_dir, current_username, log_shell, login_shell, raw_shell, shell, shell!, shell?, shell_cmd, sudo, which

Methods included from LogHelpers

debug, deprecated!, log, log_block, log_error, log_ok, log_stderr, log_warn, removed!

Instance Method Details

#flavour_strObject


201
# File 'lib/babushka/system_profile.rb', line 201

def flavour_str; 'openSUSE' end

#get_version_infoObject


210
# File 'lib/babushka/system_profile.rb', line 210

def get_version_info; File.read('/etc/SuSE-release') end

#pkg_helperObject


211
# File 'lib/babushka/system_profile.rb', line 211

def pkg_helper; ZypperHelper end

#releaseObject


206
207
208
# File 'lib/babushka/system_profile.rb', line 206

def release
  version[/^(\d+)/, 1]
end

#versionObject


203
204
205
# File 'lib/babushka/system_profile.rb', line 203

def version
  version_info[/([\d\.]+)/i, 1]
end