Skip to content

Commit

Permalink
[WIP] Add a Systemd library description
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs committed Sep 3, 2018
1 parent 833f102 commit 88cbecc
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .yardopts
@@ -1 +1 @@
--no-private --markup markdown --protected library/*/src/**/*.rb --readme README.md --output-dir ./doc/autodocs - library/cwm/doc/CWM.md library/systemd/doc/services_and_sockets.md
--no-private --markup markdown --protected library/*/src/**/*.rb --readme README.md --output-dir ./doc/autodocs - library/cwm/doc/CWM.md library/systemd/doc/services_and_sockets.md library/system/doc/system_services.md
Binary file added library/system/doc/services_widget.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions library/system/doc/system_services.md
@@ -0,0 +1,31 @@
# System Services Library

The system services library offers an API to interact with system services, allowing the user to
perform typical operations like querying the services, starting or stopping them, etc.

The set of classes which are included in this library can be divided into:

* A high level API which offers some abstractions on top of Systemd.
* A low level one to talk closely to Systemd units (including services and sockets).

Additionally, a widget that can be used in YaST modules (like yast2-dns-server) is included.

## High Level API

The high level API is composed by these classes:

* {Yast2::SystemService}: represents a service (like `cups` or `dbus`) from a high level point of
view. Systemd concepts like *units* or *sockets* are abstracted by this class.
* {Yast2::CompoundService}: groups a set of related services that might be handled together.
Think, for instance, about `iscsi`, `iscsid` and `iscsiuio` services in `yast2-iscsi-client`.
This class offers basically the same API than {Yast2::SystemService}.

## Low Level API

The low level API can be more convenient in some situations and it is basically composed of a set of
classes that map to Systemd concepts: {Yast2::Systemd::Unit}, {Yast2::Systemd::Service},
{Yast2::Systemd::Socket} and {Yast2::Systemd::Target}.

## Service Widget

Additionally to the classes to interact with system services, this library offers a widget...
2 changes: 1 addition & 1 deletion library/systemd/src/lib/yast2/system_service.rb
Expand Up @@ -32,7 +32,7 @@ module Yast2
# See also {file:library/systemd/doc/services_and_sockets.md}.
#
# @note All changes performed over an object of this class are not applied into the
# underlying system until the {#save} method is called.
# underlying system until the {#save} method is called.
#
# @example Enabling a service
# cups = SystemService.find("cups")
Expand Down

0 comments on commit 88cbecc

Please sign in to comment.