Data Classes
The core objects used by Exosphere are mostly Host and Update objects.
Host is the high level object, providing functionality to interact with the host and perform operations on it, such as discovery or refreshing package updates.
The only mandatory fields for a Host are defined by the HostInfo dataclass, listed below.
- class exosphere.data.HostInfo(os: str, version: str | None, flavor: str | None, package_manager: str | None, is_supported: bool)
Bases:
objectData class to hold platform information about a host. This includes the operating system, version, and package manager. Used for discovery and setup module results.
- flavor: str | None
- is_supported: bool
- os: str
- package_manager: str | None
- version: str | None
- class exosphere.data.Update(name: str, current_version: str | None, new_version: str, security: bool = False, source: str | None = None)
Bases:
objectData class to hold information about a software update. Includes the name of the software, the current version, new version, and optionally a source.
- current_version: str | None
- name: str
- new_version: str
- security: bool = False
- source: str | None = None
- class exosphere.data.HostState(os: str | None, version: str | None, flavor: str | None, package_manager: str | None, supported: bool, online: bool, updates: tuple[Update, ...], last_refresh: datetime | None, schema_version: int = 1)
Bases:
objectData class to hold the state of a host. Used mainly for serialization to disk.
Contains a schema_version field to help with compatibility checks when loading cache from an earlier version of exosphere.
It is not intended for this field to be specified directly, but instead to be incremented via its default value whenever the structure changes, to allow for easy migrations in load_or_create.
Updates list is stored as a tuple to ensure container immutability.
- flavor: str | None
- last_refresh: datetime | None
- online: bool
- os: str | None
- package_manager: str | None
- schema_version: int = 1
- supported: bool
- version: str | None