clan-core/pkgs/clan-cli/clan_cli/vms/__init__.py

19 lines
535 B
Python
Raw Normal View History

2023-09-28 16:27:06 +00:00
import argparse
from .inspect import register_inspect_parser
2023-11-24 13:52:38 +00:00
from .run import register_run_parser
2023-09-28 16:27:06 +00:00
def register_parser(parser: argparse.ArgumentParser) -> None:
subparser = parser.add_subparsers(
title="command",
description="command to execute",
help="the command to execute",
required=True,
)
2023-11-24 13:52:38 +00:00
register_inspect_parser(
subparser.add_parser("inspect", help="inspect the vm configuration")
2023-09-28 16:27:06 +00:00
)
2023-11-24 13:52:38 +00:00
register_run_parser(subparser.add_parser("run", help="run a VM from a machine"))