Class: Zypper::Service

Inherits:
Object
  • Object
show all
Includes:
ZypperUtils
Defined in:
lib/zypper/service.rb

Constant Summary

Constants included from ZypperUtils

ZypperUtils::ATTRIBUTE_STARTS_WITH, ZypperUtils::PARAMS_FOR_TYPES, ZypperUtils::XML_COMMANDS_GET

Instance Attribute Summary

Attributes included from ZypperUtils

#config, #last_error_message, #last_exit_status, #last_message

Instance Method Summary collapse

Methods included from ZypperUtils

#initialize

Instance Method Details

#all(options = {}) ⇒ Object

Lists all known services



13
14
15
16
# File 'lib/zypper/service.rb', line 13

def all(options = {})
  out = xml_run build_command('services', options.merge(:get => XML_COMMANDS_GET))
  convert_output(out.fetch(:stream, {}).fetch(:service_list, {}).fetch(:service, []), :service)
end

#refresh(options = {}) ⇒ Object

Refreshes services



8
9
10
# File 'lib/zypper/service.rb', line 8

def refresh(options = {})
  run build_command('refresh-services', options)
end