Enums
All enums are StrEnum (Python 3.11+). They work as plain strings in comparisons, f-strings, and JSON serialization.
ActiveState
systemd_client.enums.ActiveState
Bases: StrEnum
Systemd unit active states.
Source code in src/systemd_client/enums.py
| class ActiveState(StrEnum):
"""Systemd unit active states."""
ACTIVE = "active"
INACTIVE = "inactive"
FAILED = "failed"
ACTIVATING = "activating"
DEACTIVATING = "deactivating"
RELOADING = "reloading"
MAINTENANCE = "maintenance"
|
LoadState
systemd_client.enums.LoadState
Bases: StrEnum
Systemd unit load states.
Source code in src/systemd_client/enums.py
| class LoadState(StrEnum):
"""Systemd unit load states."""
LOADED = "loaded"
NOT_FOUND = "not-found"
BAD_SETTING = "bad-setting"
ERROR = "error"
MASKED = "masked"
|
UnitFileState
systemd_client.enums.UnitFileState
Bases: StrEnum
Systemd unit file states.
Source code in src/systemd_client/enums.py
| class UnitFileState(StrEnum):
"""Systemd unit file states."""
ENABLED = "enabled"
DISABLED = "disabled"
STATIC = "static"
MASKED = "masked"
LINKED = "linked"
INDIRECT = "indirect"
GENERATED = "generated"
TRANSIENT = "transient"
BAD = "bad"
ALIAS = "alias"
ENABLED_RUNTIME = "enabled-runtime"
LINKED_RUNTIME = "linked-runtime"
MASKED_RUNTIME = "masked-runtime"
|
SubState
systemd_client.enums.SubState
Bases: StrEnum
Systemd unit sub-states.
Source code in src/systemd_client/enums.py
| class SubState(StrEnum):
"""Systemd unit sub-states."""
RUNNING = "running"
DEAD = "dead"
EXITED = "exited"
FAILED = "failed"
START_PRE = "start-pre"
START = "start"
START_POST = "start-post"
STOP = "stop"
STOP_SIGTERM = "stop-sigterm"
STOP_SIGKILL = "stop-sigkill"
STOP_POST = "stop-post"
FINAL_SIGTERM = "final-sigterm"
FINAL_SIGKILL = "final-sigkill"
WAITING = "waiting"
ELAPSED = "elapsed"
MOUNTED = "mounted"
MOUNTING = "mounting"
UNMOUNTING = "unmounting"
LISTENING = "listening"
ACTIVE = "active"
INACTIVE = "inactive"
PLUGGED = "plugged"
TENTATIVE = "tentative"
AUTO_RESTART = "auto-restart"
CONDITION = "condition"
|
UnitType
systemd_client.enums.UnitType
Bases: StrEnum
Systemd unit types.
Source code in src/systemd_client/enums.py
| class UnitType(StrEnum):
"""Systemd unit types."""
SERVICE = "service"
SOCKET = "socket"
TARGET = "target"
TIMER = "timer"
PATH = "path"
MOUNT = "mount"
AUTOMOUNT = "automount"
SWAP = "swap"
SLICE = "slice"
SCOPE = "scope"
DEVICE = "device"
|
JournalPriority
systemd_client.enums.JournalPriority
Bases: StrEnum
Journal priority levels (syslog-compatible).
Source code in src/systemd_client/enums.py
| class JournalPriority(StrEnum):
"""Journal priority levels (syslog-compatible)."""
EMERG = "0"
ALERT = "1"
CRIT = "2"
ERR = "3"
WARNING = "4"
NOTICE = "5"
INFO = "6"
DEBUG = "7"
|
BackendType
systemd_client.enums.BackendType
Bases: StrEnum
Available backend types for systemd communication.
Source code in src/systemd_client/enums.py
| class BackendType(StrEnum):
"""Available backend types for systemd communication."""
AUTO = "auto"
SUBPROCESS = "subprocess"
DBUS = "dbus"
|