Refactor(cli/list_machines): rename to list_full_machines

This makes it clear that this should be used with care
It is potentially more expensive to create the full object, therefore it should be discouraged by its longer name
This listing is implemented based on the basic listing, where each item is turned into the bigger machine class
This commit is contained in:
Johannes Kirschbauer
2025-06-09 13:40:46 +02:00
parent 0b6bc81efe
commit 665b2095b2
7 changed files with 23 additions and 21 deletions

View File

@@ -21,7 +21,7 @@ from clan_lib.templates import (
)
from clan_cli.completions import add_dynamic_completer, complete_tags
from clan_cli.machines.list import list_machines
from clan_cli.machines.list import list_full_machines
log = logging.getLogger(__name__)
@@ -71,7 +71,7 @@ def create_machine(
log.info(f"Found template '{template.name}' in '{template.input_variant}'")
machine_name = opts.machine.get("name")
if opts.template_name in list_machines(
if opts.template_name in list_full_machines(
Flake(str(clan_dir))
) and not opts.machine.get("name"):
msg = f"{opts.template_name} is already defined in {clan_dir}"