Astmetad

Astmetad is responsible for:

See Distribution metadata for more information on this state manager.

Metadata Disk Lifecycle

When a metadata drive is inserted, it follows a lifecycle.

There can only be one metadata drive at any given time. Additional drives are ignored.

Once the drive has had its data loaded and validated, it will be added as a high priority Metadata Source.

Astmetad Data Structures and Classes

class astoria.common.ipc.MetadataManagerMessage(**data)[source]

Status message for Metadata Manager.

Published to /astoria/astmetad

metadata: Metadata
class astoria.common.metadata.Metadata(**data)[source]

Astoria Metadata.

As the metadata is passed into a templating engine for initial log lines, please do not add nested fields to this schema.

class Config[source]

Pydantic config.

validate_assignment = True
arch: str
arena: str
astoria_version: str
game_timeout: Optional[int]
classmethod get_macos_release_info()[source]

Get the release information for MacOS.

Return type:

Dict[str, str]

Returns:

An os-release style dictionary of OS info.

classmethod get_os_release_info(os_release_path=None)[source]

Reads OS version information from /etc/os-release.

See man page os-release(5) for more information. :rtype: Dict[str, str] :returns: dict OS release values

classmethod get_os_version_info()[source]

Reads OS version information.

Return type:

Dict[str, str]

Returns:

dict OS release values

classmethod init(config)[source]

Initialise the metadata and populate with data.

Based on information from software and the astoria configuration.

Return type:

Metadata

kernel_version: str
libc_ver: str
marker_offset: int
mode: RobotMode
os_name: Optional[str]
os_pretty_name: Optional[str]
os_version: Optional[str]
python_version: str
usercode_entrypoint: str
wifi_enabled: bool
wifi_psk: Optional[str]
wifi_region: Optional[str]
wifi_ssid: Optional[str]
zone: int
class astoria.common.metadata.RobotMode(value)[source]

Running Status of the manager daemon.

COMP = 'COMP'
DEV = 'DEV'