smah.settings.system.system

Classes

System([config_data])

Represents the system configuration and status.

class smah.settings.system.system.System(config_data=None)[source]

Bases: object

Represents the system configuration and status.

CONFIG_VSN

The version of the YAML format config section.

Type:

str

disk

Disk statistics.

Type:

DiskStats

cpu

CPU statistics.

Type:

CpuStats

memory

Memory statistics.

Type:

MemoryStats

operating_system

Operating System Details

Type:

OperatingSystem

vsn

Version string.

Type:

str

CONFIG_VSN: str = '0.0.1'
static config_vsn() str[source]

Returns the version of the configuration.

Returns:

The version of the configuration.

Return type:

str

cpu: CpuStats
disk: DiskStats
is_configured()[source]

Checks if the system is configured.

Returns:

True if the system is configured, False otherwise.

Return type:

bool

memory: MemoryStats
operating_system: OperatingSystem
shell: str
show(options=None)[source]
to_yaml(options=None)[source]

Converts the system configuration to a YAML-compatible dictionary.

Returns:

The system configuration in YAML format.

Return type:

dict

static version_supported(version) bool[source]

Checks if the given version is supported.

Parameters:

version (str) – The version to check.

Returns:

True if the version is supported, False otherwise.

Return type:

bool

vsn: str | None