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:
@@ -16,7 +16,7 @@ from clan_lib.nix import (
|
||||
nix_metadata,
|
||||
)
|
||||
|
||||
from clan_cli.machines.list import list_machines
|
||||
from clan_cli.machines.list import list_full_machines
|
||||
from clan_cli.vms.inspect import VmConfig, inspect_vm
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ def inspect_flake(flake_url: str | Path, machine_name: str) -> FlakeConfig:
|
||||
system = config["system"]
|
||||
|
||||
# Check if the machine exists
|
||||
machines: dict[str, Machine] = list_machines(Flake(str(flake_url)))
|
||||
machines: dict[str, Machine] = list_full_machines(Flake(str(flake_url)))
|
||||
if machine_name not in machines:
|
||||
msg = f"Machine {machine_name} not found in {flake_url}. Available machines: {', '.join(machines)}"
|
||||
raise ClanError(msg)
|
||||
|
||||
Reference in New Issue
Block a user