clan-cli: Move clan machines import to clan machines create

This commit is contained in:
Qubasa
2024-09-23 17:11:48 +02:00
parent 26f8779787
commit d4e8f88185
12 changed files with 235 additions and 250 deletions

View File

@@ -10,7 +10,7 @@ from clan_cli.inventory import (
load_inventory_json,
set_inventory,
)
from clan_cli.machines.create import create_machine
from clan_cli.machines.create import CreateOptions, create_machine
from clan_cli.nix import nix_eval, run_no_stdout
from fixtures_flakes import FlakeForTest
@@ -53,13 +53,15 @@ def test_add_module_to_inventory(
age_keys[0].pubkey,
]
)
create_machine(
FlakeId(str(base_path)),
Machine(
opts = CreateOptions(
clan_dir=FlakeId(str(base_path)),
machine=Machine(
name="machine1", tags=[], system="x86_64-linux", deploy=MachineDeploy()
),
)
create_machine(opts)
inventory = load_inventory_json(base_path)
inventory.services = {