forked from clan/clan-core
Merge pull request 'clan: machines --help
add examples to help output' (#1468) from a-kenji-clan/cli/machines-examples into main
This commit is contained in:
commit
dbaa26ccaa
@ -17,7 +17,26 @@ def register_parser(parser: argparse.ArgumentParser) -> None:
|
|||||||
required=True,
|
required=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
update_parser = subparser.add_parser("update", help="Update a machine")
|
update_parser = subparser.add_parser(
|
||||||
|
"update",
|
||||||
|
help="Update a machine",
|
||||||
|
epilog=(
|
||||||
|
"""
|
||||||
|
This subcommand provides an interface to update machines managed by clan.
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
$ clan machines update [MACHINES]
|
||||||
|
Will update the specified machine [MACHINE], if [MACHINE] is omitted, the command
|
||||||
|
will attempt to update every configured machine.
|
||||||
|
To exclude machines being updated `clan.deployment.requireExplicitUpdate = true;`
|
||||||
|
can be set in the machine config.
|
||||||
|
|
||||||
|
For more detailed information, visit: https://docs.clan.lol/getting-started/deploy
|
||||||
|
"""
|
||||||
|
),
|
||||||
|
formatter_class=argparse.RawTextHelpFormatter,
|
||||||
|
)
|
||||||
register_update_parser(update_parser)
|
register_update_parser(update_parser)
|
||||||
|
|
||||||
create_parser = subparser.add_parser("create", help="Create a machine")
|
create_parser = subparser.add_parser("create", help="Create a machine")
|
||||||
@ -26,7 +45,21 @@ def register_parser(parser: argparse.ArgumentParser) -> None:
|
|||||||
delete_parser = subparser.add_parser("delete", help="Delete a machine")
|
delete_parser = subparser.add_parser("delete", help="Delete a machine")
|
||||||
register_delete_parser(delete_parser)
|
register_delete_parser(delete_parser)
|
||||||
|
|
||||||
list_parser = subparser.add_parser("list", help="List machines")
|
list_parser = subparser.add_parser(
|
||||||
|
"list",
|
||||||
|
help="List machines",
|
||||||
|
epilog=(
|
||||||
|
"""
|
||||||
|
This subcommand lists all machines managed by this clan.
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
$ clan machines list
|
||||||
|
Lists all the machines and their descriptions.
|
||||||
|
"""
|
||||||
|
),
|
||||||
|
formatter_class=argparse.RawTextHelpFormatter,
|
||||||
|
)
|
||||||
register_list_parser(list_parser)
|
register_list_parser(list_parser)
|
||||||
|
|
||||||
install_parser = subparser.add_parser(
|
install_parser = subparser.add_parser(
|
||||||
@ -37,5 +70,23 @@ def register_parser(parser: argparse.ArgumentParser) -> None:
|
|||||||
The target must be a Linux based system reachable via SSH.
|
The target must be a Linux based system reachable via SSH.
|
||||||
Installing a machine means overwriting the target's disk.
|
Installing a machine means overwriting the target's disk.
|
||||||
""",
|
""",
|
||||||
|
epilog=(
|
||||||
|
"""
|
||||||
|
This subcommand provides an interface to install machines managed by clan.
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
$ clan machines install [MACHINE] [TARGET_HOST]
|
||||||
|
Will install the specified machine [MACHINE], to the specified [TARGET_HOST].
|
||||||
|
|
||||||
|
$ clan machines install [MACHINE] --json [JSON]
|
||||||
|
Will install the specified machine [MACHINE] to the host exposed by
|
||||||
|
the deployment information of the [JSON] deployment string.
|
||||||
|
|
||||||
|
For information on how to set up the installer see: https://docs.clan.lol/getting-started/installer/
|
||||||
|
For more detailed information, visit: https://docs.clan.lol/getting-started/deploy
|
||||||
|
"""
|
||||||
|
),
|
||||||
|
formatter_class=argparse.RawTextHelpFormatter,
|
||||||
)
|
)
|
||||||
register_install_parser(install_parser)
|
register_install_parser(install_parser)
|
||||||
|
Loading…
Reference in New Issue
Block a user