electrolyt.entry_point
¶
Module Contents¶
Classes¶
Plan Entry point. |
|
Machine entry point. |
Functions¶
|
Entry point decorator. |
- class electrolyt.entry_point.EntryPoint(db: dict[str, EntryPoint], fun: collections.abc.Callable[[], None], kind: str, name: str | None = None, description: str | None = None)¶
Plan Entry point.
The class represent a valid entry point in an electrolyt plan. It’s used also to annotate a given entry point with some additional metadata.
- execute() None ¶
Execute an entry point.
- class electrolyt.entry_point.Machine(db: dict[str, EntryPoint], fun: collections.abc.Callable[[], None], kind: str, platform: str, version: str, site: str | None = None, name: str | None = None, description: str | None = None, secure_control_plane: bool = False)¶
Bases:
EntryPoint
Machine entry point.
The class is used to declare an entry point which will be the default function executed on a given server. It also add some information such as the platform and the OS version in order to be able to simulate a plan execution.
- electrolyt.entry_point.entry_point(db: dict[str, EntryPoint], cls: collections.abc.Callable[Ellipsis, EntryPoint], kind: str, *args: Any, **kwargs: Any) collections.abc.Callable ¶
Entry point decorator.
Declare an electrolyt entry point (e.g. a machine name, a mailserver preset).
This returns the function with the following new attributes: kind, name, description, is_entry_point=True, and executed. Executed is a boolean set to False by default and changed to True when the entry point has been executed.
- Parameters:
db – dictionary where to register the entry point
cls – class of entry point
kind – entry point kind (machine name, mailserver preset, …)
args – additional information to store with the entry point
kwargs – additional information to store with the entry point