chore: add migrate cli command
This commit is contained in:
@@ -39,6 +39,31 @@ def add(
|
||||
service_creator.add_service(name=name)
|
||||
|
||||
|
||||
# TODO: remove
|
||||
@service.command(no_args_is_help=True)
|
||||
def migrate(
|
||||
name: str = typer.Option(..., "--name", "-n"),
|
||||
user: str = typer.Option(..., "--user", "-u"),
|
||||
ioc_description: str = typer.Option(
|
||||
..., "--ioc-description", "-d", help="See <repo-root>/docs/ioc/ioc_overview.md for examples"
|
||||
),
|
||||
ui_filename: str = typer.Option(
|
||||
...,
|
||||
"--ui-filename",
|
||||
"-f",
|
||||
help="The <ui-filename> in 'A_BD_<ui-filename>.ui'; See <repo-root>/qt/A_BD_ServiceManager.ui for examples",
|
||||
),
|
||||
):
|
||||
init_logging()
|
||||
service_creator = ServiceCreator(
|
||||
user=user, # TODO: read from 'whoami'?
|
||||
ioc_description=ioc_description,
|
||||
ui_name="",
|
||||
ui_filename=ui_filename, # TODO: make this standard?
|
||||
)
|
||||
service_creator.add_service(name=name)
|
||||
|
||||
|
||||
@service.command(no_args_is_help=True)
|
||||
def list():
|
||||
registry = ServiceRegistry.read_from_config()
|
||||
|
||||
Reference in New Issue
Block a user