:py:mod:`electrolyt.entry_point` ================================ .. py:module:: electrolyt.entry_point .. autoapi-nested-parse:: Plan entry point management for electrolyt. Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: electrolyt.entry_point.EntryPoint electrolyt.entry_point.Machine Functions ~~~~~~~~~ .. autoapisummary:: electrolyt.entry_point.entry_point .. py:class:: 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. .. py:method:: execute() -> None Execute an entry point. .. py:class:: 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: :py:obj:`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. .. py:function:: 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. :param db: dictionary where to register the entry point :param cls: class of entry point :param kind: entry point kind (machine name, mailserver preset, ...) :param args: additional positional arguments to pass to the entry point class :param kwargs: additional keyword arguments to pass to the entry point class :return: decorator function that wraps the entry point function