Commit Graph

44 Commits

Author SHA1 Message Date
Qubasa
2b5cdd66f9 clan-cli: Make run_vm_in_thread fail fast. Fix generate_flake to support machine_id 2024-09-06 18:53:02 +02:00
Jörg Thalheim
659e5b37dd use pathlib everywhere 2024-09-02 18:26:13 +02:00
Jörg Thalheim
e9a266001c enable comprehensions linting rules 2024-09-02 13:35:52 +02:00
Jörg Thalheim
1585afc8b3 fix users in VM again 2024-08-24 19:19:24 +02:00
Qubasa
6c4d7494f6 clan-cli: Fix some type errors in tests 2024-08-21 15:48:43 +02:00
Jörg Thalheim
fe66a740b5 add fixture to capture output in tests less fragile
Now we always remove previous output before capturing.
2024-08-15 18:45:03 +02:00
DavHau
b2646aa0fe tests: improve testing framework for impure vm tests
Also fix computet sops secret paths for vars
2024-08-04 13:40:12 +07:00
DavHau
8086f70b79 clan-cli/tests: improve test helpers for VMs 2024-08-03 15:26:53 +07:00
Jörg Thalheim
0d6e2539e3 Revert "clan-cli: deprecate nix_shell() in favor of run_cmd()"
This reverts commit 37e6ca7a30.
2024-07-17 14:04:49 +02:00
DavHau
37e6ca7a30 clan-cli: deprecate nix_shell() in favor of run_cmd() 2024-07-16 14:03:17 +07:00
DavHau
0e335f7ecc impure-checks: improve performance by disabling dynamic deps 2024-07-16 12:42:45 +07:00
DavHau
e7908c2af5 clan-cli: simplify cli helper 2024-07-10 18:14:06 +07:00
DavHau
0367fc1e90 clan-cli tests: remove dynamic inclusion of helpers module
Dynamically extending the python path at runtime is bad for developer experience, as this is not understood by the text editor and therefore jump to definition etc. does not work.

-> Better to remove the dynamic inclusion and force developers to specify the import correctly.
2024-07-05 16:38:22 +07:00
DavHau
313db5643f refactor: rename clanCore -> clan.core 2024-06-18 18:32:40 +07:00
Jörg Thalheim
f0f97baa65 drop global argparse flags
They get shadowed by subargparser options.
2024-05-29 10:21:35 +02:00
Qubasa
8ab9d20342 clan-vm-manager: Working pytest skeleton. clan-cli: Fixing devshell depending on itself 2024-03-24 23:36:00 +01:00
clan-bot
36b20f18d4 Merge pull request 'add option to set defaultGroups for secrets' (#858) from Mic92-target_host into main 2024-02-16 16:29:28 +00:00
Jörg Thalheim
57e9b27ff8 add option to set defaultGroups for secrets 2024-02-16 17:26:20 +01:00
Qubasa
280bee0861 clan-vm-manager: Fixing vm starting. 2024-02-16 16:10:49 +07:00
Qubasa
4f7f34f9b4 clan-vm-manager: Added clan icon to trayicon 2024-02-16 12:25:06 +07:00
clan-bot
1cc6e74297 Merge pull request 'clan_vm_manager: --debug enables debug mode in clan_cli too' (#840) from Qubasa-add_spinner into main 2024-02-14 08:43:14 +00:00
Qubasa
30850eef22 clan_cli: Added longer timeout for test 2024-02-14 15:40:03 +07:00
Jörg Thalheim
b15c21f800 drop check for /var/lib/nixos 2024-02-13 12:44:22 +01:00
Qubasa
03b9183e04 clan_cli: Added lazy qmp 2024-02-13 16:44:09 +07:00
Qubasa
92ec3fb9f9 test_vms_cli: Trying new way of testing 2024-02-13 16:44:09 +07:00
Qubasa
87dbc99cab clan_cli: Made qmp implementation lazy 2024-02-13 16:44:09 +07:00
DavHau
02dd132e08 vms: init graceful shutdown for GUI
- add python modules for qemu protocols: QMP (hardware interactions) and QGA (guest service interaction)
- refactor state directory: remove name from path (already contains url)
- add impure vm test for basic qmp interaction
- simplify existing vm persistance test (factor out shared code)
- integrate graceful shutdown into GUI

the GUI integration still needs to be improved later:
- add fallback in case system doesn't react to powerdown button
- shutdown GUI switch fails if VM hasn't been started yet, and then remains in a wrong position
2024-02-09 19:55:18 +07:00
Jörg Thalheim
3538cf2e46 rename deployment address to target address
This is a prepares having a build server for deployment
2024-02-02 16:39:29 +07:00
DavHau
56b6907740 qemu: init python modules for qmp and qga 2024-02-01 12:32:21 +07:00
DavHau
59fa63eba9 Reapply "vm-state: fix and improve testing"
This reverts commit 99092f6e76.

vm-state: revert sysusers, improve testing

zerotier: enable persistence

vm-state: cleanup tests
2024-01-31 11:02:16 +07:00
DavHau
99092f6e76 Revert "vm-state: fix and improve testing"
This reverts commit 6adc68a354.
2024-01-29 15:16:10 +07:00
DavHau
6adc68a354 vm-state: fix and improve testing
Also adds qemu qga protocol implementation to execute commands
2024-01-26 19:41:05 +07:00
lassulus
9cf670ee29 test_vm_persistance: substitute clan-core repo 2024-01-24 15:49:12 +01:00
lassulus
de885c3010 test_vm_persistance: add age keys 2024-01-24 15:49:12 +01:00
DavHau
520ff0b334 VMs: ensure state dirs don't collide between clans 2024-01-09 17:22:48 +07:00
DavHau
17390fc392 VMs: port vm_persistence test to python 2024-01-09 14:47:33 +07:00
Jörg Thalheim
884c200061 rename vms create to vms run 2023-11-24 15:00:08 +01:00
lassulus
1ea13646ea clan_cli: flake_name -> flake_dir 2023-11-15 16:23:28 +01:00
Jörg Thalheim
54ede8a0ff vms/create: drop extra flake argument and make it work with local flakes 2023-11-10 13:43:14 +01:00
lassulus
7b3d3e20b4 clan-cli secrets: flake_name -> flake_dir 2023-11-05 16:58:48 +01:00
Qubasa
c1b4fa6d55 nix fmt 2023-10-27 19:21:50 +02:00
Qubasa
3581e0c9a8 Fixing a multitude of tests 2023-10-27 19:21:50 +02:00
lassulus
bdb0a6484a tests: add fixtures to test_vms_cli 2023-10-05 15:56:15 +02:00
Jörg Thalheim
2502422bc1 add test for vm cli 2023-10-03 17:24:08 +02:00