orangeqs.juice.cli#

CLI for OrangeQS Juice.

Submodules#

Package Contents#

Classes#

JuiceGroup

Click group that shows failed systemd units without a traceback.

Functions#

format_unit_failure

Format a UnitFailedError as a message for the user.

main

Run CLI, should be called as entrypoint.

API#

orangeqs.juice.cli.format_unit_failure(error: orangeqs.juice.orchestration.systemd.UnitFailedError) → str#

Format a UnitFailedError as a message for the user.

For each failed unit, the message has the last lines of its log. At the end, the message has the journalctl commands to read the full logs.

Parameters#

  • error (UnitFailedError): The error to format.

Returns#

  • (str): The message, without a trailing newline.

class orangeqs.juice.cli.JuiceGroup(name: str | None = None, commands: collections.abc.MutableMapping[str, click.core.Command] | collections.abc.Sequence[click.core.Command] | None = None, invoke_without_command: bool = False, no_args_is_help: bool | None = None, subcommand_metavar: str | None = None, chain: bool = False, result_callback: Callable[..., Any] | None = None, **kwargs: Any)#

Bases: click.Group

Click group that shows failed systemd units without a traceback.

invoke(ctx: click.Context) → Any#

Invoke the command and turn UnitFailedError into a clean exit.

orangeqs.juice.cli.main() → None#

Run CLI, should be called as entrypoint.